TesoroFeeHook
RobinhoodTesoroFeeHook is a Uniswap v4 hook on Robinhood Chain. Live for 3 days. Still in use: 42 trades in the last week, and 1 new pool this week.
- Contract name
- TesoroFeeHook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade, keeps a price record and controls who adds liquidity.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. The fee builds up in the hook until it is collected.
The code that does this (beforeSwap):function _beforeSwap(address sender, PoolKey calldata key, SwapParams calldata params, bytes calldata) internal override returns (bytes4, BeforeSwapDelta, uint24) { if (!_specifiedIsFee(key, params)) return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); PoolId id = key.toId(); (uint256 s, uint256 bps) = _bpsNow(id, _isSell(key, params)); uint256 fee = _specifiedFee(params, bps); if (fee == 0) return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); _feeCurrency(key).take(poolManager, address(this), fee, true); _accrue(id, fee, s, bps); // AUDIT L-22 (LeftClaw I-4): the afterSwap paths emit it; so does this one now. if (_configs[id].feeIsCurrency0) emit HookFee(PoolId.unwrap(id), sender, fee.toUint128(), 0); else emit HookFee(PoolId.unwrap(id), sender, 0, fee.toUint128()); return (this.beforeSwap.selector, toBeforeSwapDelta(fee.toInt128(), 0), 0); }Keeps a price record
It records the pool’s price over time, so other apps can read a fair average price.
The code that does this (afterSwap):function _afterSwap(address sender, PoolKey calldata key, SwapParams calldata params, BalanceDelta delta, bytes calldata hookData) internal override returns (bytes4 sel, int128 fee) { PoolId id = key.toId(); // Same block and direction as the rate the fee was (or is) taken at, so the same rate and the same split. (uint256 s, uint256 bps) = _bpsNow(id, _isSell(key, params)); bool specifiedIsFee = _specifiedIsFee(key, params); if (params.amountSpecified > 0 && !specifiedIsFee) { sel = this.afterSwap.selector; bool unspecifiedIs1 = !params.zeroForOne; // exact-out: the output is specified, the input (zeroForOne → 0) is not int128 raw = unspecifiedIs1 ? delta.amount1() : delta.amount0(); if (raw != 0) { uint256 input = uint256(uint128(raw < 0 ? -raw : raw)); uint256 amt = FullMath.mulDiv(input, bps, 10_000 - bps); if (amt != 0) { Currency c = unspecifiedIs1 ? key.currency1 : key.currency0; c.take(poolManager, address(this), amt, true); if (unspecifiedIs1) emit HookFee(PoolId.unwrap(id), sender, 0, amt.toUint128()); else emit HookFee(PoolId.unwrap(id), sender, amt.toUint128(), 0); fee = amt.toInt128(); } } } else { (sel, fee) = super._afterSwap(sender, key, params, delta, hookData); } if (fee > 0) _accrue(id, uint256(uint128(fee)), s, bps); // AUDIT LeftClaw #1201 L-13, reproduced on testnet (12 Nov 2026): a sell larger than the ETH in a single-sided // pool filled what it could, then ran off the top of the ladder and left slot0 at the caller's price limit — // a displayed price of ~0 and a TWAP pulled after it, at no cost to the seller. A swap that ends with nothing // in range is refused whole, as Uniswap's own quoter refuses it; it also stops anyone moving the price of a // …Rules for adding liquidity
It decides who can add liquidity, or when.
The code that does this (beforeAddLiquidity):function _beforeAddLiquidity(address sender, PoolKey calldata key, ModifyLiquidityParams calldata params, bytes calldata) internal view override returns (bytes4) { address lock = reservedFor[key.toId()]; if (lock != address(0)) { address posm = IMarketLock(lock).positionManager(); if ( sender != posm || !IMarketLock(lock).addingLiquidity() || IPositionOwner(posm).ownerOf(uint256(params.salt)) != lock ) revert LiquidityNotLocked(); } return this.beforeAddLiquidity.selector; }
Who controls it: The hook developer can change: registrar. The hook developer can also call: clear config. Control can be passed on but not given up. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditclearConfigWhat it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
It checks every deposit before it goes in.
It runs when a pool is created, often to lock in that pool’s settings.
It runs when someone donates tokens to the pool’s LPs.
Hook history
- Observation written 27 times
Latest transactions
- 0xe7671eec…acae9b block 122,159,488
- 0xe98406c7…4cc99d block 122,067,492
- 0x3f37b4af…f44376 block 122,066,251
- 0x4ea05962…fecf22 block 122,043,864
- 0x561257c1…3a974d block 122,034,249
- 0xd7132480…d59935 block 122,013,582
- 0xa03d250f…590961 block 122,004,356
- 0xb622408a…7694c4 block 121,997,847
- 0x8210bc61…4a2fc6 block 121,989,142
- 0xf1b52875…973ab5 block 121,986,833
- Started the launch 1 time
Settings changes: settled fees (2 times), set the launch window (1 time), set the settings (1 time).
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it.