Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,974,119
0x49D8…aaeC
The eight checks
21 pools use this hook, the first one 7 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 1.00% of each swap on top of the pool fee.
- 03fail
LPs can get outLiquidity went in and could not come back out.
- 04pass
The fee is the feeA fixed fee of 0.10%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has claimMany, claim.
- 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.
- 08caution
Track record21 pools, first seen 6 days ago.
Measured at block 92,974,119. 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 & 0x3fff0x2aec · 10101011101100
- 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.
WORM / BARNWRM
fee 0.10%- Swap WORM → BARNWRMhook takes 1.00%
- Swap BARNWRM → WORMhook takes 1.00%
- Add, then remove liquiditywithdrawal refused: HoldNotOver
pool 0x55a54389ca32c21b4d4a05d60c99b27d2cca930cd0089bffe483dfde166bfb6e
WORM / GLOWORM
fee 0.10%- Swap WORM → GLOWORMhook takes 1.00%
- Swap GLOWORM → WORMhook takes 1.00%
- Add, then remove liquiditywithdrawal refused: HoldNotOver
pool 0xbb5b02d1ec69b126ddc8907edf2b23413bc8b935db79f3c97eab1b47757cade2
Read from the bytecode
- Code size
- 15,919 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 4
- 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.
- 0xe1b4af69 afterDonate
- 0xf388f33c lastAdd
- 0xfacba08d owedOf
- 0xd6c4dad5 proposeProtocolRecipient
- 0xdc4c90d3 poolManager
- 0xdc98354e beforeInitialize
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 donate. Runs before a donation to LPs.
- 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.
0xc4e833ce
getHookPermissions
0xc55bee61 protocolRecipient0xca50f4db reassignCreator0xb5217bb4 pools0xb6a8b0fa beforeDonate0xbf333f2c FEE_BPS0xa53e5412 WINDOW0xb47b2fb1 afterSwap0xb48b6258 RECIPIENT_DELAY0x91dd7346 unlockCallback0x92822047 PROTOCOL_SHARE_BPS0x9f063efc afterAddLiquidity0x7b7159bf LAUNCHER0x80302060 claimMany0x861fbe84 acceptCreator0x6fe7e6eb afterInitialize0x72a56490 register0x65015123 pendingProtocolRecipient0x6c2bbe7e afterRemoveLiquidity0x6ebb8cd2 DEPLOYED_AT0x61e512f6 pendingCreator0x62308e85 POOL_MANAGER0x63875629 feeTerms0x57ae3a9f USDG0x5e3f2727 LP_FEE0x618f105b proposeCreator0x46ca626b TICK_SPACING0x575e24b4 beforeSwap0x28079e4a owed0x29ffcd81 COMPOUND_SALT0x36ee94c0 FULL_RANGE_UPPER0x21c0b342 claim0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x0ad9ca6c cancelCreator0x14ca514c CURVE_TICK_LOWER0x21b7d4d8 LP_MIN_HOLD0x02cf7d20 acceptProtocolRecipient0x05ea488e cancelProtocolRecipient