SpyTreasuryFeeHook on Robinhood Chain
Uniswap v4 Hook Contract 0xbbcbd97241525086889f0b30bcf383831221e8cc on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $567
- Value locked (TVL)
- $5.49K
- All-time volume
- $774.22K
- Pools using this hook
- 1
- Swaps (24h)
- 27 (22 traders)
- Total swaps
- 7,609
What it does
Charges a fixed 1% fee on every INC buy and sell in the ETH/INC pool, collecting it in native ETH for the treasury, with a short launch guard that caps early buys and rate-limits wallets.
How it works step by step
- Takes up to 1% of every swap in native ETH and stores it on the hook contract for the treasury to withdraw.
- Restricts the pool to ETH as currency0 and INC as currency1 at initialization.
- Limits buys to 0.05 ETH and imposes a 30-second cooldown per tx.origin during a 120-second launch guard window.
- Starts the launch guard at the later of arm() and the owner's first liquidity add, so the guard covers the period when the owner's liquidity is in the pool.
- Allows the owner to set buy and sell fees between 0 and 1%, and to change the treasury address.
- Lets the owner or treasury pull accumulated fees via withdraw().
- Swap behaviour
- On each swap, a fee of up to 1% of the ETH amount (default 100 bps) is taken and sent to the hook contract. Buys during the 120-second launch guard window are limited to 0.05 ETH per buy and 30 seconds of cooldown per signing wallet; sells are never restricted.
- Liquidity behaviour
- beforeAddLiquidity never reverts; it only records the timestamp of the owner's first liquidity add (keyed on tx.origin == owner) to start the launch guard window. No callbacks on remove liquidity.
- Fee behaviour
- A fixed fee of up to 1% (default 100 bps for both buys and sells) is taken in native ETH on every swap in the ETH/INC pool. Buy fees are taken on the ETH leg, and sell fees are taken on the ETH leg via afterSwap. The owner can lower either fee to 0 but cannot exceed 1%. Fees accumulate on the hook and are pulled out via withdraw().
- Owner & admin controls
- Owner (Ownable, transferable and renounceable) can set buyFeeBps and sellFeeBps up to a hard cap of 100 bps (1%), change the treasury address, and call arm() once to start the launch guard. Owner or treasury can call withdraw() to pull accumulated ETH fees to the treasury. No pause switch and no upgradeability; the owner cannot block swaps or sells, and the launch guard only restricts buys during a fixed 120-second window that starts at the later of arm() and the owner's first liquidity add.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts the pool to native ETH as currency0 and INC as currency1. beforeAddLiquidity records the owner's first liquidity add to start the launch guard. beforeSwap applies the buy-side fee on exact-input buys and the sell-side fee on exact-output sells, enforces the launch guard limits on buys, and takes the fee via poolManager.take. afterSwap applies the fee on the ETH leg when it is only known after execution, and enforces the buy cap on exact-output buys. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take its fee as a return delta on the specified or unspecified side.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The owner can set fees to 0 or up to 1%, redirect fee proceeds by changing the treasury, and renounce or transfer ownership. The owner cannot pause swaps, seize pool liquidity, or change the fee above the immutable 1% cap. Ownership is a single EOA or multisig with no timelock; a compromised owner key could redirect the treasury, though withdraw() only sends fees, not liquidity.
Risk to user funds: The hook can take up to 1% of each swap in ETH via poolManager.take and can hold accumulated fee ETH until withdrawn. It cannot move pool liquidity or user tokens and cannot block sells. Buys are limited during the launch guard window, which can revert swaps that exceed the cap or cooldown.
Security findings
- [info] Fee accumulation on hook contract: The hook takes 1% of every buy and sell in native ETH, and fees accumulate on the hook contract until withdraw() is called by the owner or treasury.
- [medium] Owner can redirect fee treasury: setTreasury lets the owner redirect all future withdrawals to any address, so a compromised owner key could route accumulated fees elsewhere.
- [low] Launch guard restricts early buys: For 120 seconds after the guard starts, buys are capped at 0.05 ETH and each tx.origin wallet must wait 30 seconds between buys. This can reject legitimate buys during the window and can be bypassed by using many funded wallets, though it can never block sells.
- [info] Permanent hook with no upgrade path: The hook is immutable and its address is part of the PoolKey, so fee logic cannot be changed without migrating liquidity to a new pool. The contract includes an explicit note that a revert in swap paths would brick the pool permanently, and its design avoids external calls and pauses on those paths.
- [info] Pool currency assumption enforced: Fee logic depends on currency0 being native ETH and currency1 being the INC token, enforced in beforeInitialize. Pools with other currency layouts cannot use this hook.
Contract details
- Verified source
- Yes (SpyTreasuryFeeHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 5,506 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using SpyTreasuryFeeHook
- ETH / INC (0.30% fee) — 24h volume $567, TVL $5.49K, 27 swaps today