Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,144,060
0x39ab…eAa8
The eight checks
7 pools use this hook, the first one 18 d ago.
- 01caution
Permissions that touch your moneyThe address enables before remove liquidity, before swap returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02n/a
What it takes from a swapNo pool with liquidity to swap through yet.
- 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 switchNo owner() but it has setRiskEngine, claimProtocolFees, claimCreatorFees, setLendingManager.
- 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 record7 pools over 17 days.
Measured at block 93,144,060. 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 & 0x3fff0x2aa8 · 10101010101000
- 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.
USDG / usdgtest
fee 0%- Swap USDG → usdgtestno liquidity at the current price
- Swap usdgtest → USDGno liquidity at the current price
- Add, then remove liquiditydeposit refused: SteakHook: no external liquidity
pool 0x8f6454591a7477fc84a2239212e9943b8e3b2c60afb0dd2abe585e3efbd811e2
Read from the bytecode
- Code size
- 23,123 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 20
- 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.
- 0x01399ca6 unknown
- 0x014b0d03 unknown
- 0x08b66372 HOOK_FLAGS
- 0x0d6c8e43 unknown
- 0x1c7e29b7 unknown
- 0x1d8ef3ef currentFeeBps
- 0x21c099c8 poolKeyFor
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 remove liquidity. Can refuse a withdrawal. LPs may not get out.
- Before swap. Runs before every swap. On a dynamic-fee pool it can set the fee each time.
- Before donate. Runs before a donation to LPs.
- Before swap returns delta. Can take part of what you put into a swap, or change how much is swapped.
0x21d0ee70
beforeRemoveLiquidity
0x259982e5 beforeAddLiquidity0x27548629 coverBadDebt0x2dff15a9 unknown0x3d2a74bf unknown0x46ca626b TICK_SPACING0x481cecaa marginManager0x4a1b81ee unknown0x51e91414 unknown0x56f785fc unknown0x575e24b4 beforeSwap0x5c960358 unknown0x61fc63d1 setRiskEngine0x65d7b483 poolIdOfToken0x6999b377 feeController0x69ce6d47 claimProtocolFees0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x759ee908 unknown0x7a462c56 unknown0x7cb6028e unknown0x8de18dfc unknown0x8f15ae9b poolKeyFor0x911727b3 unknown0x91dd7346 unlockCallback0x92b888ae riskEngine0x92ed2329 unknown0x97e8cd4e protocolFeesAccrued0x9e3b77af lendingManager0x9f063efc afterAddLiquidity0xa515fef3 creatorFeesAccrued0xa63729be unknown0xaf8d60b5 claimCreatorFees0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xc283632f unknown0xc45a0155 unknown0xc4e833ce getHookPermissions0xc869d0ed setLendingManager0xd5f39488 deployer0xd9abae79 unknown0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xdd5eda14 spotPrice0xdd68cc7e unknown0xdd8bf98b devBuy0xe1b4af69 afterDonate0xe1f71da5 unknown0xf356f9b1 unknown0xf694fcec unknown0xf6c00927 getPool