Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,393,486
0xb84E…68CC
The eight checks
3 pools use this hook, the first one 28 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 8.79% of each swap on top of the pool fee.
- 03caution
LPs can get outTaking liquidity straight back out lost 1.19%.
- 04pass
The fee is the feeA fixed fee of 0.30%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x575689F17ff53E418080D0E0d5F336ee9899C453. Owner-style functions: settler, setPendingOwner, setCoordinates, setSwapExempt, SETTLEMENT_GAS_LIMIT.
- 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 28 days.
Measured at block 93,393,486. 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 & 0x3fff0x28cc · 10100011001100
- 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.
NVDA / NNN
fee 0.30%- Swap NVDA → NNNhook takes 1.00%
- Swap NNN → NVDAhook takes 1%
- Add, then remove liquiditycame back whole
pool 0x0ee940e79673cbc871a48605d25125d69a75377a09582c80d103e13f9e24e44f
USDG / BBB
fee 0.30%- Swap USDG → BBBhook takes 8.78%
- Swap BBB → USDGhook takes 8.79%
- Add, then remove liquiditylost 1.19%
pool 0x4303bc7eedde677d003b349de5c8d0af39f6d7c003a8a65dae8dc0fcd0bf9240
Read from the bytecode
- Code size
- 8,859 bytes
- Owner
- 0x575689F17ff53E418080D0E0d5F336ee9899C453
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 8
- 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.
- 0x21d0ee70 beforeRemoveLiquidity
- 0x259982e5 beforeAddLiquidity
- 0x575e24b4 beforeSwap
- 0x6c2bbe7e afterRemoveLiquidity
- 0x6fe7e6eb
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 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.
afterInitialize
0x8da5cb5b owner0x9189592d isSwapExempt0x9def75a6 POST_SELL_FINALIZE_GAS_RESERVE0x9f063efc afterAddLiquidity0xa270a737 venue0xab221a76 settler0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xc091b21a POST_SELL_CALL_OVERHEAD_GAS_RESERVE0xc1152831 AUTO_REFLOW_GAS_LIMIT0xc42069ec setPendingOwner0xc4e833ce getHookPermissions0xd73792a9 FEE_DENOMINATOR0xd7460cfc POST_SELL_HOOK_DATA0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xe2337899 setCoordinates0xe30c3978 pendingOwner0xeb1e3a34 setSwapExempt0xebbc4965 acceptOwner0xf4d5e603 poolTaxInfo0xf80fe04b SETTLEMENT_GAS_LIMIT0xfa02716d registerPool