STRPNKHook on Ethereum
Uniswap v4 Hook Contract 0x384cfe8aa001c26a029dee56414a024f445780cc on Ethereum · Utility · Verified contract
- Volume (24h)
- $22
- Value locked (TVL)
- $16.02K
- All-time volume
- $5.54M
- Pools using this hook
- 1
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 5,913
What it does
A Uniswap v4 hook that takes a fixed 10% fee on swaps in one pool, accrues it to the hook, and lets anyone sweep the fees to a treasury, with a small caller bounty.
How it works step by step
- Binds to a single pool chosen once by the owner via setManagedPool
- Takes a fixed 10% fee on swaps through beforeSwap and afterSwap return deltas
- Holds accrued fees as ERC-6909 claims on the PoolManager and tracks them in owedEth and owedToken
- sweepETH withdraws accrued ETH: 0.25% bounty to the caller, then 80% to treasury and 20% to a fixed dev wallet
- sweepToken withdraws accrued STRPNK: 0.25% bounty to the caller, remainder to treasury
- Has no liquidity callbacks and does not change liquidity provision
- Swap behaviour
- beforeSwap reduces ETH input by 10% on exact-in ETH-to-token swaps. afterSwap takes 10% of the unspecified side on all other swap directions (ETH output on token sells, ETH input on exact-out buys, token input on exact-out sells). Fees are minted as ERC-6909 claims on the PoolManager.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- A fixed 10% (FEE_BPS = 1000) fee is taken on swaps and held as ERC-6909 claims on the PoolManager, recorded in owedEth and owedToken. Exact-in ETH-to-token shaves 10% of ETH input in beforeSwap. Other directions take 10% of ETH or token amounts in afterSwap via return deltas. Fees are later swept: 0.25% bounty to the caller, then the remainder split 80% treasury and 20% devWallet for ETH, or sent entirely to treasury for the token.
- Owner & admin controls
- Owner (Ownable) can call setManagedPool once to bind the hook to a single pool (it cannot be changed after being set), and can transferOwnership or renounceOwnership. The owner has no function to change FEE_BPS, pause swaps, withdraw funds directly, or upgrade the contract (not a proxy). Treasury and devWallet are fixed (treasury immutable, devWallet constant).
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: applies a 10% input reduction on exact-in ETH-to-token swaps via a before-swap delta and mints an ETH fee claim. afterSwap: applies a 10% fee on the unspecified side of the other swap directions via an after-swap return delta and mints ETH or token fee claims. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to alter the swap amounts the pool settles, which is how the fee is taken.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The owner cannot change the fee, pause, or touch pool funds directly; its only power is the one-time pool binding. Treasury receives all fees, so a compromised treasury address would receive funds, but the treasury address is immutable.
Risk to user funds: The hook holds fee value only as ERC-6909 claims on the PoolManager; it does not hold user principal. Users pay the 10% fee on each swap, and the owner cannot block or redirect swaps. Sweeps send ETH to treasury and devWallet and token to treasury, with a 0.25% bounty to whoever calls sweep.
Security findings
- [info] Fixed 10% swap fee via return deltas: Swaps in the managed pool always pay a fixed 10% fee taken through return deltas on the hook's permissions; the rate is hardcoded and cannot be changed.
- [low] One-time pool binding by owner: setManagedPool can be called only once by the owner to bind the hook to one pool; afterwards the pool binding is permanent, and an owner that never sets it leaves the hook non-functional.
- [info] Reentrancy guard on unlock callback: The unlockCallback path sets an _inUnlock guard but resets it only on the success paths; the unrecognized-op branch reverts, so the flag is reset by the revert. Unlocking is restricted to the PoolManager, so external reentry is limited.
- [low] Sweep accounting depends on PoolManager claim balances: ETH fee claims and token fee claims are burned in unlockCallback and paid from PoolManager balances, while owedEth and owedToken are zeroed before unlock; a failed sweep would revert the whole transaction and leave counters intact.
Contract details
- Verified source
- Yes (STRPNKHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 7,882 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, ownable, return-delta, self-unlock
Pools using STRPNKHook
- ETH / STRPNK (0.00% fee) — 24h volume $22, TVL $16.02K, 2 swaps today