Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,975,638
0x8093…20CC
The eight checks
21 pools use this hook, the first one 19 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.
- 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.
- 04caution
The fee is the feeIts pools use a dynamic fee that the hook sets before every swap. It stands at 0% now and can change.
- 05caution
No one holds the switchOwned by 0x2f7CE7eeF4b091E0827dA1E8C2E10D061d95d180. Owner-style functions: setCreationFees, setPaused, setQuoteAllowed, paused, setPayees, sweeper.
- 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 record21 pools over 19 days.
Measured at block 92,975,638. 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 & 0x3fff0x20cc · 10000011001100
- 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 / SAI
fee dynamic, now 0%- Swap ETH → SAIno liquidity at the current price
- Swap SAI → ETHno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0x9f864f36cc1e94ecdb2460165b14316e42f78a3b876faf09effaf398104bdb31
Read from the bytecode
- Code size
- 13,146 bytes
- Owner
- 0x2f7CE7eeF4b091E0827dA1E8C2E10D061d95d180
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 7
- 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.
- 0x0450ba84 setCreationFees
- 0x0d0126ec devShareBps
- 0x0eab3b55 unknown
- 0x14e048ba FEE_CAP
- 0x16c38b3c setPaused
- 0x1928f54e quoteAllowed
- 0x20787d23 unknown
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 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.
0x2815c0ff
unknown
0x2d39ebac unknown0x2d819906 unknown0x3b01d64d OVERRIDE_FEE_FLAG0x4c4a3c25 stateView0x55e2654d setQuoteAllowed0x575e24b4 beforeSwap0x5c975abb paused0x62d0a1d8 LAUNCH_FEE_CEILING0x651dd5d7 setPayees0x6a53bb64 unknown0x715018a6 renounceOwnership0x73bde1cf creationFeeUsdg0x79ba5097 acceptOwnership0x7dc99a85 unknown0x84327968 unknown0x8b8ee371 vol0x8da5cb5b owner0x900dc937 unknown0x9189a59e sweeper0x91cca3db dev0xa190fff9 feeNow0xa7db9b26 creationFeeEth0xa8d5fd65 share0xadf9719e unknown0xb000ecb3 unknown0xb1f9e7f6 unknown0xb47b2fb1 afterSwap0xb5217bb4 pools0xba635aab unknown0xc12b293c desk0xca2663a7 setDev0xccfb5a81 unknown0xd0582670 moved0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xde72d4f3 unknown0xe30c3978 pendingOwner0xf26ef49d DYNAMIC_FEE_FLAG0xf2fde38b transferOwnership0xf3b1c2ae unknown0xf434c914 PERMISSIONS0xf43da875 unknown0xf5b91b7b usdg0xf8f5ae94 setPoolFee