Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,922,696
0xC5a1…28cC
The eight checks
68 pools use this hook, the first one 18 d ago.
- 01caution
Permissions that touch your moneyThe address enables before swap returns delta, after swap returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02caution
What it takes from a swapIt takes 4% of each swap on top of the pool fee.
- 03n/a
LPs can get outClosed to outside LPs: only the hook's own liquidity is in the pool.
- 04pass
The fee is the feeA fixed fee of 0%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x3c8A4d94B3219F6633F2cC94094f4765b30c691C. Owner-style functions: collectProtocolFees, setStartTick, setFeeRecipient, transferOwnership, transferFrom, claim.
- 06pass
The code cannot changeNot a proxy, no DELEGATECALL, no SELFDESTRUCT.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record68 pools over 18 days.
Measured at block 92,922,696. A hook with an owner or a dynamic fee can behave differently later; scan again before a large trade.
What the address allows
A v4 hook's permissions are the last fourteen bits of its address. The PoolManager calls only what they switch on.
address & 0x3fff0x28cc · 10100011001100
- bit 13Before initialize
- bit 12After initialize
- bit 11Before add liquidity
- bit 10After add liquidity
- bit 9Before remove liquidity
- bit 8After remove liquidity
- bit 7Before swap
- bit 6After swap
- bit 5Before donate
What it did to a real swap
A small swap each way and a liquidity round trip, run through the PoolManager and this hook inside a call that is never sent. The pool fee is expected; anything else missing is the hook.
IMD / nearcat
fee 0%- Swap IMD → nearcathook takes 4.00%
- Swap nearcat → IMDhook takes 4%
- Add, then remove liquiditydeposit refused: HookNotAllowed
pool 0xf9fb8ac4e909580caaeb94843639e06991d4b11d2df1625e1d997796245a770c
$TESLA / IMD
fee 0%- Swap $TESLA → IMDno liquidity below the price
- Swap IMD → $TESLAhook takes 4.00%
- Add, then remove liquiditydeposit refused: HookNotAllowed
pool 0x9f0095e249b368536f63e7d818ebeb322303831e828a4e70d634c79c1e9f9567
Read from the bytecode
- Code size
- 20,962 bytes
- Owner
- 0x3c8A4d94B3219F6633F2cC94094f4765b30c691C
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 18
- Callbacks open to anyone
- none
Its functions, uncensored
Selectors found in the dispatcher, named from the public signature database. Red ones are what an owner usually keeps for itself.
- 0x08b66372 HOOK_FLAGS
- 0x0ae89127 tokenOfPool
- 0x1f2d8550 launches
- 0x1f69565f getTokenInfo
- 0x1fa4e045 pendingProtocolFees
- 0x21d0ee70 beforeRemoveLiquidity
- 0x249d39e9
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- Before initialize. Runs once, when a pool is created.
- Before add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- Before swap. Runs before every swap. On a dynamic-fee pool it can set the fee each time.
- After swap. Runs after every swap.
- Before swap returns delta. Can take part of what you put into a swap, or change how much is swapped.
- After swap returns delta. Can take part of what you get out of every swap.
BPS
0x259982e5 beforeAddLiquidity0x2a54db01 collectProtocolFees0x2f22b8a2 pendingHolderFees0x46904840 feeRecipient0x46ca626b TICK_SPACING0x494cfc6c getTokens0x4e4563ca launchFor0x53baf861 ethRouter0x55d1cb60 poolKey0x575e24b4 beforeSwap0x5e3f2727 LP_FEE0x634282af allTokens0x6c2bbe7e afterRemoveLiquidity0x6f5b8872 setStartTick0x6fe7e6eb afterInitialize0x79ba5097 acceptOwnership0x79c76e1a flush0x8322fff2 ETH0x87cadba0 startTick0x8da5cb5b owner0x902d55a5 TOTAL_SUPPLY0x91dd7346 unlockCallback0x9f063efc afterAddLiquidity0x9f181b5e tokenCount0xac813916 launch0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xbe378228 PROTOCOL_FEE_BPS0xbf333f2c FEE_BPS0xc4fb32c3 marketCap0xd0abb693 IMD0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xe30c3978 pendingOwner0xe74b981b setFeeRecipient0xf2fde38b transferOwnership0xf887ea40 router0x02d05d3f creator0x06fdde03 name0x0937eb54 accountedBalance0x095ea7b3 approve0x18160ddd totalSupply0x23b872dd transferFrom0x27ce0147 accumulativeDividendOf0x30adf81f PERMIT_TYPEHASH0x313ce567 decimals0x3644e515 DOMAIN_SEPARATOR0x392f37e9 metadata0x3a7960e0 magnifiedDividendPerShare0x4e71d92d claim0x6ade07b0 eligibleSupply0x70a08231 balanceOf0x7ecebe00 nonces0x85a6b3ae totalDividendsDistributed0x9361266c pad0x95d89b41 symbol0x999b93af quote0xa8b9d240 withdrawableDividendOf0xa9059cbb transfer0xb86b0fd0 MIN_ELIGIBLE_SUPPLY0xcba0e996 isExcluded0xd505accf permit0xdd62ed3e allowance0xde3aaf61 withdrawnDividends0xe4fc6b6d distribute