Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,297,085
0x711e…6ACc
The eight checks
4 pools use this hook, the first one 17 d ago.
- 01caution
Permissions that touch your moneyThe address enables before remove liquidity, 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.
- 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 0x49052F253056A0508a079dA2bc80E5a72B41d46E. Owner-style functions: setOwner, setArbActive, setFactory, setAirdropVault, setArbExecutor, setKhookDropVault.
- 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 record4 pools over 16 days.
Measured at block 93,297,085. 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 & 0x3fff0x2acc · 10101011001100
- 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 / KHAT
fee 0%- Swap ETH → KHAThook takes 1.00%
- Swap KHAT → ETHhook takes 1%
- Add, then remove liquiditycame back whole
pool 0x248edc11524444466db1d9e5e9d3ee0a0c334cb11730b5b830a4637ed49af4db
ETH / KHOOKED
fee 0%- Swap ETH → KHOOKEDhook takes 2.00%
- Swap KHOOKED → ETHhook takes 2%
- Add, then remove liquiditycame back whole
pool 0xbaff23dca3cdc81d0d9b7a9a2c4d7fb79324df1a9e3db229d0d2a44b1f4b1c95
Read from the bytecode
- Code size
- 21,574 bytes
- Owner
- 0x49052F253056A0508a079dA2bc80E5a72B41d46E
- Proxy
- no
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 18
- 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.
- 0x08b66372 HOOK_FLAGS
- 0x0f13e135 arbActive
- 0x13af4035 setOwner
- 0x1faba457 pendingDeepenLps
- 0x21d0ee70 beforeRemoveLiquidity
- 0x259982e5 beforeAddLiquidity
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 remove liquidity. Can refuse a withdrawal. LPs may not get out.
- 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.
0x2b76b49c launchState0x2c06dc9b setArbActive0x31730cfa lastSwapPacked0x32c90099 airdropVault0x533c433e floorVault0x54f12d1d vestPacked0x575e24b4 beforeSwap0x5bb47808 setFactory0x671a66a5 pendingDeepenTokens0x677d4175 arbExecutor0x6bd7065a holderAirdropVault0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x8584e85b pendingAutoBurn0x8da5cb5b owner0x91507bdb setAirdropVault0x989faa17 setArbExecutor0x9a9ac7fa dynamicFeeForSwap0x9f063efc afterAddLiquidity0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xb86b8b68 prepareLaunch0xbfe10928 distributor0xc0e332fa setKhookDropVault0xc45a0155 unknown0xc4b7de97 feeEscrow0xc4e833ce getHookPermissions0xce8f6078 configs0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xdcc1cf8a khookDropVault0xe1b4af69 afterDonate0xe2fdcc17 escrow0xeae0a488 revenueDistributor0xec0a8eff pendingKhookDrop0xf1f5c993 buybackVault0xf21ba585 buybacks0xf627f21d airdropDue