Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,143,709
0x5983…85cf
The eight checks
7 pools use this hook, the first one 32 d ago.
- 01caution
Permissions that touch your moneyThe address enables before swap returns delta, after swap returns delta, after add returns delta, after remove 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.
- 03pass
LPs can get outLiquidity added and removed in the same block came back whole.
- 04pass
The fee is the feeA fixed fee of 0%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x408AAD1e95327A9B74DB4240F9a96Dac21AF1Bde. Owner-style functions: withdrawAll, setDiscountThreshold, setPaused, claimFees, paused, claimableFees.
- 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 31 days.
Measured at block 93,143,709. 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 & 0x3fff0x05cf · 00010111001111
- 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 / META
fee 0%- Swap USDG → METAno liquidity at the current price
- Swap META → USDGno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0xff36448e0af286f80a7d62a491e32220736694a4f754830ae53f8ad6807c76b3
Read from the bytecode
- Code size
- 23,574 bytes
- Owner
- 0x408AAD1e95327A9B74DB4240F9a96Dac21AF1Bde
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 9
- 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.
- 0x058fc8a3 unknown
- 0x09cae2c8 withdrawAll
- 0x09efd365 unknown
- 0x0b4dc8ca setDiscountThreshold
- 0x13eff23e unknown
- 0x16c38b3c setPaused
- 0x178c1669 unknown
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- After add liquidity. Runs after each deposit.
- After remove liquidity. Runs after each withdrawal.
- 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.
- After add returns delta. Can charge LPs on the way in.
- After remove returns delta. Can take part of what LPs withdraw.
0x19b10771
unknown
0x1cdcbe64 unknown0x1e6460a5 unknown0x211c3f15 unknown0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x25eb2833 unknown0x28043770 unknown0x2930497e unknown0x2c30a9b6 unknown0x2db13630 unknown0x2dbfa735 claimFees0x35126699 unknown0x3824a99a unknown0x3bfa2a36 unknown0x3df9a868 unknown0x46695aba unknown0x46904840 feeRecipient0x46941cdd unknown0x479dfd7b CREATOR_SHARE_BPS0x4b757cb1 unknown0x4d7e6732 authorizedOwners0x54fd4d50 version0x562fc883 unknown0x56d84d90 unknown0x575e24b4 beforeSwap0x57ddf9ac unknown0x582abd12 SIGNER0x5870b8d2 unknown0x595e2d77 unknown0x599131c4 unknown0x5bbfe41f unknown0x5c776046 highGasThreshold0x5c975abb paused0x5d6baaf1 unknown0x5fb439b4 unknown0x6a00c613 unknown0x6c2bbe7e afterRemoveLiquidity0x6d151101 revokeOwner0x6fe7e6eb afterInitialize0x74617b9d unknown0x7673bae2 recipientShareBps0x79ba5097 acceptOwnership0x7ceae43c unknown0x800f399b unknown0x82cee4a9 unknown0x85a58e31 unknown0x8a7d8771 unknown0x8da5cb5b owner0x8dc1632a unknown0x91dd7346 unlockCallback0x949f68ec unknown0x9b180894 unknown0x9c673d54 unknown0x9f063efc afterAddLiquidity0xb47b2fb1 afterSwap0xb4e2ff04 unknown0xb602e392 claimableFees0xb6a8b0fa beforeDonate0xb77b83a5 unknown0xba97ac74 unknown0xbc063e1a MAX_FEE0xc3f909d4 getConfig0xc4e833ce getHookPermissions0xc516c0df unknown0xcab1d8f3 unknown0xcb0856bb discountThreshold0xd31c8d53 unknown0xd9caed12 withdraw0xd9ccaf24 unknown0xdb2ec1d5 unknown0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1a45218 BPS_DENOMINATOR0xe1b4af69 afterDonate0xe30c3978 pendingOwner0xe4fbb609 CREATOR0xe74b981b setFeeRecipient0xe7846481 unknown0xe85acbc1 unknown0xf26ef49d DYNAMIC_FEE_FLAG0xf2fde38b transferOwnership0xf6d79aef unknown0xfbd476d7 unknown0xfe047c2e unknown