Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,240,419
0x7a0A…44CC
The eight checks
5 pools use this hook, the first one 25 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.
- 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.25%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has setWhitelistedRelayer, grantRole, setFeeSplit, setTotalFee, setFeeRecipient, setLauncher.
- 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 record5 pools over 24 days.
Measured at block 93,240,419. 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 & 0x3fff0x04cc · 00010011001100
- 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 / STULTUS
fee 0.25%- Swap ETH → STULTUShook takes 2.00%
- Swap STULTUS → ETHhook takes 2%
- Add, then remove liquiditycame back whole
pool 0xfe973abe610b6ea606048e8970c9d729d3eb29d25c6352ed2c90cc143acc384a
Read from the bytecode
- Code size
- 13,679 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 21
- 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.
- 0x01ffc9a7 supportsInterface
- 0x06bf14c4 unknown
- 0x09824a80 registerToken
- 0x16eebd1e launcher
- 0x1c98849b isWhitelistedRelayer
- 0x1cb46747 setWhitelistedRelayer
- 0x1df4ccfc totalFee
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- After add liquidity. Runs after each deposit.
- 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.
0x209bc819
canonicalPool
0x21d0ee70 beforeRemoveLiquidity0x248a9ca3 getRoleAdmin0x259982e5 beforeAddLiquidity0x2f2ff15d grantRole0x337b8359 setFeeSplit0x34d65475 unknown0x36568abe renounceRole0x397aafc6 unknown0x3a4758e8 uniReferral0x3a49cd87 unknown0x42017678 L3_REFERRAL_FEE0x46904840 feeRecipient0x5328366a unknown0x575e24b4 beforeSwap0x58caf495 L2_REFERRAL_FEE0x6addd3cc unknown0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x75b238fc ADMIN_ROLE0x7639a230 isRegisteredToken0x83e188f4 unknown0x8afe4806 referralFeeShare0x91d14854 hasRole0x94c3e914 treasuryFeeShare0x992d0ebb setTotalFee0x9f063efc afterAddLiquidity0xa217fddf DEFAULT_ADMIN_ROLE0xa53ee239 creatorFeeShare0xac72595e L1_REFERRAL_FEE0xb22363c0 unknown0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xc4e833ce getHookPermissions0xc889db40 unknown0xd547741f revokeRole0xd73792a9 FEE_DENOMINATOR0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe0b0f6c9 unknown0xe1a45218 BPS_DENOMINATOR0xe1b4af69 afterDonate0xe31fe280 unknown0xe74b981b setFeeRecipient0xf4c094c8 setLauncher0xf8bee127 unknown