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,783
0xE692…20CC
The eight checks
95 pools use this hook, the first one 10 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 3.00% of each swap on top of the pool fee.
- 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 switchNo owner() but it has burn, setTokenFactory, setKeeper, updateTax, BURN_ADDRESS.
- 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 record95 pools over 10 days.
Measured at block 92,892,783. 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.
PIERRE / WETH
fee 0%- Swap PIERRE → WETHno liquidity below the price
- Swap WETH → PIERREhook takes 3.00%
- Add, then remove liquiditycame back whole
pool 0x4f8097d25bb1bfd22d3854589fa911cab90d785532a9239215794f2387a6d698
WETH / WONKA
fee 0%- Swap WETH → WONKAhook takes 3.00%
- Swap WONKA → WETHno liquidity above the price
- Add, then remove liquiditycame back whole
pool 0x4ed879bf868072d99523efad630c8cdcc83769c61d55f596d09462a5cc6dad99
Read from the bytecode
- Code size
- 24,427 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 22
- 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.
- 0x18cc205a burn
- 0x19239b7e pendingToken
- 0x1b19dccf canonicalPoolOf
- 0x1c676635 retiredVaultsOf
- 0x1e945dce currentRates
- 0x22e6bce8 editPosition
- 0x2f73a9f8
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.
setTokenFactory
0x330c093c protocolDeployer0x3fecaf6b creatorPayee0x51a9b6d0 pendingLiquidity0x53e579bf poolId0x575e24b4 beforeSwap0x5d51208d allFailedOpenAt0x5e0d055d MAX_STEP_SQRT_BPS0x60849c89 failedOpen0x61e512f6 pendingCreator0x72b7462f releaseBooked0x748747e6 setKeeper0x76209356 migrateDividendVault0x7857773a taxOf0x7d6e7824 configure0x849bd388 allFailedOpen0x8fd679e5 failOpen0x91dd7346 unlockCallback0x9759164a liquidityLocker0x9b3ff191 ammAdapter0x9c04f108 redeem0x9eb8cfea lastConversionBlock0xa302e232 RELEASE_DELAY0xaced1661 keeper0xb47b2fb1 afterSwap0xb91fdf83 failedOpenAt0xbf224fcd STANDARD_FEE_BPS0xc6741e5b compoundStep0xce91e164 PLATFORM_BPS0xcf25a224 CREATOR_BASE_BPS0xd4619635 pendingSplit0xd81804c3 distribute0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe11b072a pendingBurn0xe138818c platformTreasury0xe77772fe tokenFactory0xe88d1db2 MAX_CREATOR_BPS0xecb63a6c compound0xf34a527a pendingDividend0xf5f15611 updateTax0xf85a7d1b failOpenAll0xfa5f4e2e SPLIT_CHANGE_DELAY0xfccc2813 BURN_ADDRESS0xff64a03c pendingSplitOf