Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,116,461
0x7358…90Cc
The eight checks
10 pools use this hook, the first one 92 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.
- 02fail
What it takes from a swapOne direction works and the other is refused (PriceLimitAlreadyExceeded). You may be able to buy and not sell.
- 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 1% now and can change.
- 05caution
No one holds the switchOwned by 0xDb15B843A28933168104B9d6939f961703C5060f. Owner-style functions: setFeeThreshold, setWhitelistConfig, setCooldownConfig, updateAdminFee, setRewardSwapConfig, setInitialConfig.
- 06caution
The code cannot changeThe bytecode contains DELEGATECALL.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record10 pools over 92 days.
Measured at block 93,116,461. 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 & 0x3fff0x10cc · 01000011001100
- 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 / PKS
fee dynamic, now 1%- Swap ETH → PKShook takes 3.50%
- Swap PKS → ETHhook takes 3.50%
- Add, then remove liquiditycame back whole
pool 0xfbacfacb9861b1c2950b9f13aa87f170b58dbb102c8228f50d88ab9362263e19
ETH / PKS
fee dynamic, now 1%- Swap ETH → PKSrefused: PriceLimitAlreadyExceeded
- Swap PKS → ETHhook takes 3.50%
- Add, then remove liquiditycame back whole
pool 0xcc812b070654413b641e361789cbb266bda66c4357f1e40cfa3cb128948d4131
Read from the bytecode
- Code size
- 22,791 bytes
- Owner
- 0xDb15B843A28933168104B9d6939f961703C5060f
- Proxy
- no
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 3
- 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.
- 0x168eb5fe setFeeThreshold
- 0x1ff8d3f6 setWhitelistConfig
- 0x21d0ee70 beforeRemoveLiquidity
- 0x259982e5 beforeAddLiquidity
- 0x40bcf250 setCooldownConfig
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.
- 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.
0x49b9edc4 updateAdminFee0x53a73fb2 simulateSwapTick0x575e24b4 beforeSwap0x60199359 setRewardSwapConfig0x6c2bbe7e afterRemoveLiquidity0x6ca9787e distributeFee0x6fe7e6eb afterInitialize0x715018a6 renounceOwnership0x7b6c4f54 setInitialConfig0x87ccfa82 getDynamicFeeState0x8a966bab initializeTickForAntiSandwichBatched0x8da5cb5b owner0x91dd7346 unlockCallback0x9f063efc afterAddLiquidity0xa5e804e2 updateWhitelistWallets0xa7539b71 transferOwnershipOfPool0xb3abdf88 getAntiSandwichBatchProgress0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xc4e833ce getHookPermissions0xc5be96c2 getPoolFullConfig0xd2159f83 batchSetPoolFeeAndDistributionConfig0xdbec7d9e distributeAdminFees0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe0c3c115 setAntiSandwich0xe1b4af69 afterDonate0xf2fde38b transferOwnership0xf4099811 isWhitelisted0xf6bf16e6 initializeTickForAntiSandwich