Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,144,060
0x5766…2800
The eight checks
8 pools use this hook, the first one 11 d ago.
- 01pass
Permissions that touch your moneyNone of the permissions that let a hook take from swaps or from LPs are switched on.
- 02pass
What it takes from a swapA swap through it pays the pool fee and nothing else.
- 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 1%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x6e66b710D7605B85181DCabA4f17d1ceEE4Fc6c8. Owner-style functions: setProtocolFeeRecipient, transferOwnership, claim, collect.
- 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 record8 pools over 10 days.
Measured at block 93,144,060. 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 & 0x3fff0x2800 · 10100000000000
- 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.
mUSDG / SPRK227
fee 1%- Swap mUSDG → SPRK227nothing taken
- Swap SPRK227 → mUSDGnothing taken
- Add, then remove liquiditydeposit refused: Unauthorized
pool 0x14a4968a92252a06635e94eae0626ea426769dfbcec47f290a736a261a6471df
mUSDG / RUSH515
fee 1%- Swap mUSDG → RUSH515nothing taken
- Swap RUSH515 → mUSDGnothing taken
- Add, then remove liquiditydeposit refused: Unauthorized
pool 0x285671f320bd485b56eadc2392d9e9ef14d20252627c3507260966fb1b98d350
Read from the bytecode
- Code size
- 19,394 bytes
- Owner
- 0x6e66b710D7605B85181DCabA4f17d1ceEE4Fc6c8
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 16
- 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.
- 0xe30c3978 pendingOwner
- 0xe521cb92 setProtocolFeeRecipient
- 0xefde4e64 allPoolsLength
- 0xf26c8334 removeLiquidity
- 0xf2fde38b transferOwnership
- 0xd55aa3c8 claim
- 0xdc4c90d3
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.
poolManager
0xdc98354e beforeInitialize0xdf20f02f unknown0xe25d7892 creatorClaimable0xb6657430 unknown0xb6af0c1d unknown0xba9a7a56 MINIMUM_LIQUIDITY0xc4e833ce getHookPermissions0xcbca47db initialized0x79ba5097 acceptOwnership0x8da5cb5b owner0x900bb1c1 wrapperDeployer0x91dd7346 unlockCallback0xb08eb58d unknown0x60b5bd5f unknown0x64df049e protocolFeeRecipient0x6b090bc0 create0x6f02bb2d quoteDeposit0x715018a6 renounceOwnership0x47377d92 TICK_LOWER0x4de225df addLiquidity0x55d1cb60 poolKey0x5b16ebb7 isPool0x5e3f2727 LP_FEE0x239f3af7 TICK_UPPER0x259982e5 beforeAddLiquidity0x2d850d7f unknown0x41d1de97 allPools0x46ca626b TICK_SPACING0x06ec16f8 collect0x0782143b unknown0x0a3c0bec unknown0x1074d1ac unknown