Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,422,294
0xce12…40c4
The eight checks
3 pools use this hook, the first one 90 d ago.
- 01caution
Permissions that touch your moneyThe address enables after swap returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02pass
What it takes from a swapIt takes 1% 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 0x4e59b44847b379578588920cA78FbF26c0B4956C. Owner-style functions: setTreasury, transferFrom, transfer, claimHolderFees.
- 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 record3 pools over 89 days.
Measured at block 93,422,294. 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 & 0x3fff0x00c4 · 00000011000100
- 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 / TETH1
fee 0%- Swap ETH → TETH1hook takes 1%
- Swap TETH1 → ETHhook takes 1%
- Add, then remove liquiditycame back whole
pool 0x3b2824a47b7673c80322fa224398e8b3f696d80c6ba6847c4d592b5d699ff155
ETH / SMK
fee 0%- Swap ETH → SMKhook takes 1%
- Swap SMK → ETHhook takes 1%
- Add, then remove liquiditycame back whole
pool 0x8e3c29f037d8f22b33e0d4ff792c04e3aca200a7c13303fae152febdcee78f06
Read from the bytecode
- Code size
- 18,730 bytes
- Owner
- 0x4e59b44847b379578588920cA78FbF26c0B4956C
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 33
- 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.
- 0x21c16334 createToken
- 0x21d0ee70 beforeRemoveLiquidity
- 0x259982e5 beforeAddLiquidity
- 0x46ca626b TICK_SPACING
- 0x474a6111 unknown
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.
- After swap returns delta. Can take part of what you get out of every swap.
0x575e24b4
beforeSwap
0x61d027b3 treasury0x67a6c440 SWAP_FEE_BPS0x6c2bbe7e afterRemoveLiquidity0x6e7ffd4b getPoolKey0x6fe7e6eb afterInitialize0x704d8c57 unknown0x8ba8293f TOKEN_TREASURY_BPS0x8da5cb5b owner0x8fdd6751 tokenForPool0x902d55a5 TOTAL_SUPPLY0x91dd7346 unlockCallback0x9bef94cf unknown0x9f063efc afterAddLiquidity0xa17dbecd unknown0xa4063dbc pools0xa778be1a poolKeyForToken0xa853686d unknown0xb47b2fb1 afterSwap0xb4ac82c6 unknown0xb6a8b0fa beforeDonate0xc4e833ce getHookPermissions0xd4160086 unknown0xd5abd85a FEE_SPLIT_DENOMINATOR0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xdf5a1d64 unknown0xe1a45218 BPS_DENOMINATOR0xe1b4af69 afterDonate0xe577ab5e unknown0xea17555e unknown0xeb3f9ad1 unknown0xf0f44260 setTreasury0xf4be0467 unknown0x06fdde03 name0x095ea7b3 approve0x158ef93e initialized0x18160ddd totalSupply0x23b872dd transferFrom0x252b84a0 unknown0x2f22b8a2 pendingHolderFees0x2f81a605 unknown0x313ce567 decimals0x536ffe89 unknown0x5468742f unknown0x66624444 unknown0x70a08231 balanceOf0x7a82de27 unknown0x7e77c503 initialize0x80f55605 market0x9432e992 unknown0x95d89b41 symbol0xa9059cbb transfer0xb05bca46 claimHolderFees0xb188c70d feeMode0xba844623 unknown0xdd62ed3e allowance0xe1c4c966 anchorToken0xece3f3de unknown