Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,920,483
0x26FD…68cC
The eight checks
37 pools use this hook, the first one 7 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 2% of each swap on top of the pool fee.
- 03n/a
LPs can get outClosed to outside LPs: only the hook's own liquidity is in the pool.
- 04pass
The fee is the feeA fixed fee of 0%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x823e03bd37De307D6717c2927A879353BDE1C16b. Owner-style functions: setPushGas, blockStartTick, setPlatformPushThreshold, setFactory, setRoute, setQuoteActionThreshold.
- 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 record37 pools over 7 days.
Measured at block 92,920,483. 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 & 0x3fff0x28cc · 10100011001100
- 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.
SPCX / SPACEX
fee 0%- Swap SPCX → SPACEXhook takes 2.00%
- Swap SPACEX → SPCXno liquidity above the price
- Add, then remove liquiditydeposit refused: hook: liquidity locked
pool 0x2b8dff8448987f7485dca0b45cd7513ae928c5634350f1e67ada617eacac0341
SPCX / LAIKA
fee 0%- Swap SPCX → LAIKAhook takes 2.00%
- Swap LAIKA → SPCXhook takes 2%
- Add, then remove liquiditydeposit refused: hook: liquidity locked
pool 0x2d247db88382fc6efa09019a1c8cd2751a8fc0192e8d7683ee7de91712b1f9ee
Read from the bytecode
- Code size
- 21,893 bytes
- Owner
- 0x823e03bd37De307D6717c2927A879353BDE1C16b
- Proxy
- no
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 5
- 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.
- 0x03fd2a45 DEAD
- 0x1a7f9ddd getPoolCfg
- 0x1f3ef23d pendingReassign
- 0x20319c6d twapTick
- 0x21a048a8 MODE_STANDARD
- 0x21d0ee70 beforeRemoveLiquidity
- 0x23824336
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 add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- 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.
MODE_VESTED
0x259982e5 beforeAddLiquidity0x266a439b actionFromSwap0x2a6558de platformPushThreshold0x2af9febb platformRecipient0x2b68f2a5 PUSH_GAS0x301da5d8 PLATFORM_TRADE_BPS0x3b75fa8a setPushGas0x3c5ff7b9 blockStartTick0x419c3267 quoteActionThreshold0x41eec66f maxActionBps0x4841c832 flush0x4c4bbb3a platformAccruedOf0x53ed6018 setPlatformPushThreshold0x56f349a0 actionThresholdDefault0x575e24b4 beforeSwap0x5bb47808 setFactory0x6ba42aaa isKeeper0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x73035002 poolCountOf0x7962c91a poolsOf0x7a63068b holderPushGas0x7da3dafe snipeTaxBps0x7da4346d v3Addresses0x7e8c595a seed0x81358498 MAX_POOLS0x817025b9 MODE_BURN0x8c01dba9 holderHeld0x8d2b64d3 vetoReassign0x8da5cb5b owner0x8ebd2d29 clearRoute0x904d97df executeReassign0x91dd7346 unlockCallback0x928a47d8 proposeReassign0x98871c91 erc20PushGas0x988c8dcb routeOf0x9913833c REASSIGN_DELAY0x9f063efc afterAddLiquidity0xa248d907 clearLaunching0xa400932f setRoute0xa8cdfd1f registerPool0xac7e1e92 poolKeys0xb47b2fb1 afterSwap0xb57f4d9c platformAccrued0xb612761c setQuoteActionThreshold0xb6a8b0fa beforeDonate0xbd66528a claim0xbed6a16f MAX_SNIPE_TAX_BPS0xc3253dd2 hasRoute0xc3f565e1 MODE_PORTFOLIO0xc45a0155 unknown0xc4e833ce getHookPermissions0xc7c31fe2 setMaxActionBps0xcaab6e79 MODE_AUTO_LP0xcbaa1a47 MIN_FEE_BPS0xcc7d234a lowerFee0xd0280936 setPlatformRecipient0xd1b9e853 setKeeper0xd1ec4cf6 seeded0xd29cbe66 flushPlatform0xd55be8c6 MAX_FEE_BPS0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xde1a65c9 flushHolders0xe0496a37 setActionThresholdDefault0xe1b4af69 afterDonate0xe1d8dec7 poolKeyAt0xe4cf7b66 pathsOf0xf2fde38b transferOwnership0xf4608ce2 creatorWantsEth0xf47877fb SNIPE_TAX_PLATFORM_BPS0xf48403ae setLaunching0xf4d43bdf reassignToken