Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,145,932
0xAbf7…E800
The eight checks
8 pools use this hook, the first one 20 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 switchNo owner() but it has claim, collect, claimable, transferOwnership, transfer, burn.
- 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 19 days.
Measured at block 93,145,932. 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 / SNOW
fee 1%- Swap mUSDG → SNOWnothing taken
- Swap SNOW → mUSDGnothing taken
- Add, then remove liquiditydeposit refused: Unauthorized
pool 0x65c3a918815bb716c19d1d2dad16af1f0804a307570dd3de3d2e727dd31b7662
SHOP / mUSDG
fee 1%- Swap SHOP → mUSDGnothing taken
- Swap mUSDG → SHOPnothing taken
- Add, then remove liquiditydeposit refused: Unauthorized
pool 0x355134a0c508eece51657ac71f2b6339cae6a93c81921c560c33885428abd54d
Read from the bytecode
- Code size
- 23,873 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 12
- 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.
- 0xc4e833ce getHookPermissions
- 0xca266dfe poolKey
- 0xdc4c90d3 poolManager
- 0xdc98354e beforeInitialize
- 0xe1b4af69 afterDonate
- 0xb47b2fb1 afterSwap
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.
0xb6a8b0fa
beforeDonate
0xba9a7a56 MINIMUM_LIQUIDITY0xc45a0155 unknown0x9f063efc afterAddLiquidity0xa49d3433 unknown0xa8072464 unknown0xac5555aa initialized0xb46cab2b claim0x8cebd942 poolInfo0x91dd7346 unlockCallback0x92d147ee unknown0x964f0c42 unknown0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x796bf610 unknown0x7a1f4a8c unknown0x88bfb374 unknown0x497777d5 collect0x49e3921b unknown0x575e24b4 beforeSwap0x5e3f2727 LP_FEE0x239f3af7 TICK_UPPER0x259982e5 beforeAddLiquidity0x399438a8 unknown0x46ca626b TICK_SPACING0x47377d92 TICK_LOWER0x0db49fea claimable0x1dfce5c6 totalClaimable0x21d0ee70 beforeRemoveLiquidity0x236bb7d2 unknown0xc55dae63 baseToken0xdd62ed3e allowance0xf2fde38b transferOwnership0xa9059cbb transfer0xb868aceb unknown0x715018a6 renounceOwnership0x7f5a7c7b hook0x8da5cb5b owner0x95d89b41 symbol0x9ce110d7 initializer0x9dc29fac burn0x23b872dd transferFrom0x2a3b80f8 unknown0x313ce567 decimals0x3e0dc34e poolId0x40c10f19 mint0x70a08231 balanceOf0x02d05d3f creator0x06fdde03 name0x081f8a28 unknown0x095ea7b3 approve0x11df9995 coin0x18160ddd totalSupply