Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,892,946
0x5668…10c0
The eight checks
405 pools use this hook, the first one 64 d ago.
- 01pass
Permissions that touch your moneyNone of the permissions that let a hook take from swaps or from LPs are switched on.
- 02pass
What it takes from a swapA swap through it pays the pool fee and nothing else.
- 03pass
LPs can get outLiquidity added and removed in the same block came back whole.
- 04pass
The fee is the feeA fixed fee of 1%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has collect.
- 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 record405 pools over 64 days.
Measured at block 92,892,946. 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 & 0x3fff0x10c0 · 01000011000000
- 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.
ETH / 猎鹰
fee 1%- Swap ETH → 猎鹰nothing taken
- Swap 猎鹰 → ETHnothing taken
- Add, then remove liquiditycame back whole
pool 0x835f8a5595a6ad75b1b45468f5e986a7bc6b32b96860e8c3b94439bf211fdb23
ETH / MARY
fee 1%- Swap ETH → MARYnothing taken
- Swap MARY → ETHnothing taken
- Add, then remove liquiditycame back whole
pool 0x225b9a057c93b503f08c264589f58fe8b7e31f6a41e951cc90b988215bd15562
Read from the bytecode
- Code size
- 19,662 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 13
- 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.
- 0x01d8e083 lockPosition
- 0x0520d445 observe
- 0x07edf148 dispatchGraduation
- 0x1029866c gradCrossedAtBlockStart
- 0x12d2f88a POSITION_TICK_LOWER
- 0x18542264 SIDE_SELL
- 0x1bec3a19 POSITION_SALT
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- After initialize. Runs once, right after a pool is created.
- Before swap. Runs before every swap. On a dynamic-fee pool it can set the fee each time.
- After swap. Runs after every swap.
0x20d3e2c4 consumeAttestation0x21c099c8 poolKeyFor0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x2be19446 lockedLiquidity0x30040054 poolIdOf0x3aee922c isLockedForever0x3cd8045e splitter0x4f413237 increaseObservationCardinalityNext0x56397c35 ledger0x575e24b4 beforeSwap0x5aaea8b9 originBought0x64f82064 globalCrankFailures0x672f9b9c rails0x686b9e94 liveLiquidity0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x71a4ee73 nextSweepDay0x761ef67e pendingAttestationEth0x7bddac41 POSITION_TICK_UPPER0x802ee835 lastFlush0x839197e3 collect0x8cf3140e crankFailures0x91dd7346 unlockCallback0x9f063efc afterAddLiquidity0xa5cf8840 observationsById0xb24976dc adapterOf0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xbfc2b781 SIDE_BUY0xc45a0155 unknown0xc4e833ce getHookPermissions0xcbe9e764 locked0xd219c26d positionKey0xdc4c90d3 poolManager0xdc86496c stateById0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xe882016a pendingAttestation0xed0a2a4a crankFromHook0xed380894 originRoom0xfdee5ead standardAdapter0xff04b544 LAUNCH_SQRT_P_X960x06778757 unknown0x252c09d7 observations0x32148f67 increaseObservationCardinalityNext0x3850c7bd slot00x3e0dc34e poolId0x481c6a75 manager0x883bdbfd observe