STATEHook on Ethereum
Uniswap v4 Hook Contract 0x8739cf883ab6ac67caedafda82d790a18444a0cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
Every swap pays a fee in ETH sent to the project wallet: buys pay a higher fee that decays from launch, and sells pay a flat fee, so early buyers pay the most while the owner can also drain liquidity.
How it works step by step
- Charges a buy fee and a sell fee in ETH on every swap of the STATE/ETH pool and forwards the fee to a project wallet (feeRecipient) via PoolManager take
- Buy fee decays linearly from antiSniperBps at launch down to buyBps over antiSniperSeconds (anti-sniper)
- Exact-ETH buys take the fee from the specified side in beforeSwap; exact-token sells and exact-token buys take it in afterSwap via return deltas
- Restricts pool initialization to one call, through the PositionManager (opener), at the agreed sqrt price, with the pool key fixed to ETH/STATE and this hook
- Owner can open the pool once with the token supply held by the contract, and later collect or burn the LP position NFT
- Swap behaviour
- Buys of ETH-in (exact-input zeroForOne) pay currentBuyBps on the input ETH; exact-token buys pay currentBuyBps on the incoming ETH in afterSwap; sells (ETH out) pay sellBps on the outgoing ETH. Fees are taken as hook return deltas and sent to feeRecipient. Because the buy fee decays over time, buys made later after launch pay less than buys made right after launch; sells pay a flat sellBps.
- Liquidity behaviour
- No liquidity callbacks. The position NFT is minted through the PositionManager during openPool and held by this contract (or sent to 0x...dEaD if burned); the owner can later collect the position (tokens and ETH sent to a recipient chosen in unlockData) or burn it.
- Fee behaviour
- Buy fee starts at antiSniperBps and decays linearly to buyBps over antiSniperSeconds from launch; sell fee is sellBps. Both are set by the owner via setFees and capped at maxBps, which is immutable and at most 2500 bps. Fees are sent to feeRecipient.
- Owner & admin controls
- Single owner (onlyOwner) can: setFees (any value up to immutable maxBps, can be lowered or raised up to the cap), setFeeRecipient (EOA only), transferOwnership, renounceOwnership, openPool (once), collectLiquidity (closes the LP and sends the tokens and ETH to a chosen recipient), burnLiquidity (irreversible), and withdrawTokens (moves reserve tokens held by the contract to any address). No pause or upgrade mechanism found.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts and records pool opening at the agreed price; beforeSwap takes the buy fee on exact-ETH-in swaps by returning a specified-side delta; afterSwap takes the buy fee on exact-token swaps and the sell fee via an unspecified-side return delta; beforeSwapReturnDelta and afterSwapReturnDelta allow these fee deltas.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: A single owner key controls fees (up to 25% cap), the reserve tokens, the LP position (collect or burn) and can renounce or transfer ownership; a compromised owner could drain liquidity and reserve tokens.
Risk to user funds: The hook takes fee deltas in ETH on swaps and can move pool liquidity and reserve tokens held by the contract through owner-only functions; user swap funds are not held by the hook beyond fee deltas.
Security findings
- [high] Owner can drain pool liquidity: collectLiquidity lets the owner close the LP position and send the tokens and ETH to a recipient defined in unlockData, emptying the pool; the owner also controls the reserve via withdrawTokens.
- [medium] Owner can raise fees up to the cap: setFees can set buyBps and sellBps up to maxBps (at most 2500 bps, 25%), so a privileged key can raise the fee on every swap within that bound; the cap is immutable.
- [info] Fee recipient cannot be a contract: setFeeRecipient and the constructor reject contract recipients, which avoids sells freezing if a contract refuses ETH, but the check uses code length and can be bypassed by a contract during construction.
- [info] Position ownership held by hook: The LP NFT is held by this contract and transferFrom is only callable by the owner via burnLiquidity, so liquidity custody depends entirely on the owner key.
Contract details
- Verified source
- Yes (STATEHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 7,877 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, fee-sharing, launchpad, mev-protection, moves-currency, ownable, return-delta
Pools using STATEHook
- ETH / STATE (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today