Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,206,460
0xa1eC…20CC
The eight checks
5 pools use this hook, the first one 37 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 (PART). You may be able to buy and not sell.
- 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 switchOwned by 0x3Cc4F0CA3476996815cb5D6F86B97e83aB74578d. Owner-style functions: setTreasury, claimOtc, setPerpFeeAdapterOnce, setTokenWhitelist, setSwapperContext, setCanonicalRuntimeHash.
- 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 record5 pools over 37 days.
Measured at block 93,206,460. 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.
WETH / FBTEST
fee 0.60%- Swap WETH → FBTESThook adds 0.01%
- Swap FBTEST → WETHhook takes 0.10%
- Add, then remove liquiditycame back whole
pool 0x107ee8312f34084d0dd84f3b8220cc6506e8cd76dbafb060f52b74b57362e37c
RSTOCK / NVDA
fee 1%- Swap RSTOCK → NVDArefused: PART
- Swap NVDA → RSTOCKhook adds 0.01%
- Add, then remove liquiditycame back whole
pool 0x58eceb2746e50563895007f4e88e333000d05d9c053f0557ee411e02278daea6
Read from the bytecode
- Code size
- 23,928 bytes
- Owner
- 0x3Cc4F0CA3476996815cb5D6F86B97e83aB74578d
- Proxy
- no
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 20
- 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.
- 0xf0f44260 setTreasury
- 0xf301542b perpRouteModule
- 0xf9b30e4a mainPoolOf
- 0xffc2e22a protocolTokenOfPool
- 0xe838d0a9 taxModule
- 0xe92a0fba claimOtc
- 0xeb6d3a11 wrappedNative
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.
0xecb45cd0 stagePoolLaunch0xd4e077a0 setPerpFeeAdapterOnce0xdc1c4cc1 launchGate0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xbfdf71b8 venueRegistry0xc4e833ce getHookPermissions0xc9bcc97e setTokenWhitelist0xc9e9afad setSwapperContext0xb2516177 canonicalLauncher0xb47b2fb1 afterSwap0xbb4869cd B20_FACTORY0xbbbfe188 executionRouter0x8da5cb5b owner0x93a98ae3 churnRegistry0xa1f6fbe9 FLASH_LP_FEE0xae6e34f2 initialLaunchSqrtPriceX960x71aa7f4b setCanonicalRuntimeHash0x75ea206c poolAdmins0x7955a45c setPerpRouteModuleOnce0x8b88d0a5 setWrappedNativeOnce0x683c0955 canonicalTokenHash0x6ac7f41c launchIntent0x6d61c6a2 canonicalRuntimeHash0x59229868 poolKind0x5d50a46c perpFeeAdapter0x5f7684e8 isTokenAdmitted0x61d027b3 treasury0x46b01cd1 isMainPool0x50c4674b feeTierAllowed0x5640ad3d onOwnerStakingQuoteRewards0x575e24b4 beforeSwap0x3b550354 setTax0x3e17045b churn0x418abdd3 churnMarket0x46477ffc setCanonicalLauncher0x2c2efcac protocolFeeFlags0x33364f4d registerCanonicalToken0x38f4547c impactInterceptor0x2a017a33 isMain0x2a12d486 setFeeTier0x2ab1325f initializeModules0x2c0653bf depositOtc0x1d91829f buyAggregator0x256e36f2 perpRouteModuleCodehash0x289863f7 whitelistedTokenHash0x29134768 stakingFactory0x0d8448b6 setPairingOpen0x14b5797b onOwnerStakingRewards0x19d1e524 setOtcBps0x1ce4c78b protocolFeeMultiplier0x0143b87a withdrawOtc0x08e6a38a parentMainOfSub0x0d0fb031 pairingOpen