Custom pricing hook on Base
Uniswap v4 Hook Contract 0x6dde621bc9fc377d48f3527a2d84edc2212dc144 on Base · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 165 (73 traders)
- Total swaps
- 165
What it does
This unverified hook takes an admin-adjustable fee from swaps (with possible whitelist exemptions) and sends it to a set recipient, while LPs withdraw through a callback whose exact behaviour cannot be confirmed.
This read was written for the hook 0x87b6…4144 on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- After each swap, can take a cut of the swap amount (a fee set as a uint24 value by an admin) and send or credit it to a configurable recipient address.
- Checks an external whitelist (isWhitelist) during swaps, possibly exempting or restricting certain addresses.
- Has an admin-set cap value that limits some swap-related amount.
- Runs a check after LPs remove liquidity; the exact logic is unknown from bytecode.
- Includes an admin-only execute function that can unlock the pool manager and move tokens (take, mint, burn, transfer).
- Swap behaviour
- After each swap the hook can adjust the swap result via a return delta, likely deducting a fee set by the admin and taking it to a recipient. Whitelist checks and a cap value also apply, but exact rules cannot be confirmed from bytecode.
- Liquidity behaviour
- The hook runs after LPs remove liquidity and reads the privileged address there; it cannot deduct LP tokens via return deltas, but it could potentially revert withdrawals, which cannot be ruled out from bytecode.
- Fee behaviour
- An admin-settable fee (uint24) is applied to swaps through the afterSwap return delta and sent to a stored recipient; no maximum cap is verifiable from bytecode.
- Owner & admin controls
- A privileged address can change the fee recipient, the swap fee value, and a cap, and can call execute to move tokens via the pool manager. No upper bound on the fee is visible in the decoded bytecode.
Enabled Uniswap v4 callbacks
afterRemoveLiquidity, afterSwap, afterSwapReturnDelta
afterSwap: runs fee/whitelist/cap logic after trades; afterSwapReturnDelta: lets the hook deduct tokens from swap amounts; afterRemoveLiquidity: runs a check after LP withdrawals.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A single stored privileged address controls the fee rate, fee recipient, cap, and a token-moving execute function. Limits on these powers cannot be verified without source.
Risk to user funds: Traders can lose a portion of swap amounts to the admin-set fee, with no verified maximum. LP principal stays in the PoolManager and cannot be deducted via liquidity deltas, though the after-withdrawal callback's behaviour is unverified.
Security findings
- [medium] Admin-set swap fee with unknown cap: The fee is a uint24 set by an admin and taken through the swap return delta; bytecode does not show a hard maximum.
- [medium] Admin execute function moves tokens: An admin-only execute(address,address) unlocks the pool manager and can take, burn, or transfer tokens, likely to sweep accrued fees held by the hook; its exact scope is unverified.
- [low] Callback on LP withdrawals: afterRemoveLiquidity is enabled and reads the admin address; whether it can revert withdrawals cannot be determined from bytecode.
- [low] External whitelist dependency: Swap logic queries an external isWhitelist contract, so treatment of traders depends on that list.
Contract details
- Verified source
- No
- Bytecode size
- 11,689 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, erc6909-claims, moves-currency, return-delta, self-unlock