Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,976,268
0x2258…80CC
The eight checks
20 pools use this hook, the first one 66 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.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 switchOwned by 0x1E2C9164f04b9ec2D4F080060cC8ceca113b4FdE. Owner-style functions: setProtocolTreasury, claimCreatorFees, transferOwnership.
- 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 record20 pools over 65 days.
Measured at block 92,976,268. 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 & 0x3fff0x00cc · 00000011001100
- 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.
Test / WETH
fee 0%- Swap Test → WETHhook takes 1.46%
- Swap WETH → Testhook takes 1.00%
- Add, then remove liquiditycame back whole
pool 0x138b876f10e1b6989287e38e9e212963ac6f928885be47b7b856b4cd58113a6e
方方 / AAPL
fee 0%- Swap 方方 → AAPLno liquidity below the price
- Swap AAPL → 方方hook takes 2.00%
- Add, then remove liquiditycame back whole
pool 0x815bf783608c50ee6feae150fe09977b796abb29d601070798941059bf7afddc
Read from the bytecode
- Code size
- 9,656 bytes
- Owner
- 0x1E2C9164f04b9ec2D4F080060cC8ceca113b4FdE
- Proxy
- no
- DELEGATECALL
- absent
- 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.
- 0x0c5a61f8 setProtocolTreasury
- 0x0fc944e5 unknown
- 0x2211e578 unknown
- 0x27d093b3 unknown
- 0x2c9f47c1 unknown
- 0x34de4cd4 unknown
- 0x3d34106d AFTER_SWAP_FLAG
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- 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.
0x431a9caa
MAX_TOTAL_FEE_BPS
0x52bf1f6d unknown0x575e24b4 beforeSwap0x5869c412 unknown0x605c2aa7 unknown0x6797ae59 unknown0x69fbdeb1 AFTER_SWAP_RETURNS_DELTA_FLAG0x6aa94fc7 BEFORE_SWAP_RETURNS_DELTA_FLAG0x77b1264d unknown0x79ba5097 acceptOwnership0x7fa5692b MODE_DIVIDEND0x803db96d protocolTreasury0x83ab9227 unknown0x863c704d MODE_BASIC0x8da5cb5b owner0x8e324fb2 unknown0x92fa7834 unknown0x95e595de MIN_TOTAL_FEE_BPS0x9ee852dc BASIC_CREATOR_FEE_SHARE_BPS0xa0bf01cf unknown0xa376c3ed unknown0xa3f1f88a BASIC_HOLDER_DIVIDEND_SHARE_BPS0xa3f4bac7 ALL_HOOK_MASK0xac4e4054 REQUIRED_HOOK_FLAGS0xad091230 launches0xaf8d60b5 claimCreatorFees0xb47b2fb1 afterSwap0xbdec7248 pendingCreatorFees0xd45adfb1 BEFORE_SWAP_FLAG0xda98666d unknown0xdc4c90d3 poolManager0xe30c3978 pendingOwner0xef05198b unknown0xf2fde38b transferOwnership