Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,458,098
0xEE9C…20CC
The eight checks
3 pools use this hook, the first one 17 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%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has collectCreatorFees, collectDefendFees, collectVolatilityFees, collectCrossChainFees, collectFees, claimPot.
- 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 17 days.
Measured at block 93,458,098. 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 & 0x3fff0x20cc · 10000011001100
- 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 / VIX
fee 0%- Swap ETH → VIXhook takes 2.00%
- Swap VIX → ETHhook takes 2%
- Add, then remove liquiditycame back whole
pool 0x299a409ab6664201b1a36f3c29d1b9bb8cd9bab50f64372caa19d94efd605e11
Read from the bytecode
- Code size
- 14,073 bytes
- Owner
- none found
- 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.
- 0x01785603 pendingFees
- 0x03b81d8c collectCreatorFees
- 0x091fcadc collectDefendFees
- 0x0cd9e225 collectVolatilityFees
- 0x0d76a823 defaultRules
- 0x13851d02 DEFEND_DURATION
- 0x1e7704df pendingVolatilityFees
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 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.
0x216b8577 rules0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x28e2e69b openedAt0x2eb9ec31 collectCrossChainFees0x30c27734 pots0x33635f05 currentFeeParts0x371c40da unknown0x37ae9277 unknown0x49f9304f unknown0x4ee8194d DEFEND_DROP_TICKS0x5710ebb9 pendingDefendFees0x575e24b4 beforeSwap0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x7eb9835f MAX_GUARD_SECONDS0x7f98b91e lastBuyAt0x805e856a MAX_VOL_SURCHARGE_BPS0x817db73b collectFees0x8322fff2 ETH0x902d55a5 TOTAL_SUPPLY0x91dd7346 unlockCallback0x9530a125 unknown0x9bda720d potOwed0x9f063efc afterAddLiquidity0x9fd1fbc7 unknown0xab790fa2 unknown0xae765af1 unknown0xaf7e397d currentFee0xb47b2fb1 afterSwap0xb5217bb4 pools0xb6a8b0fa beforeDonate0xbdec7248 pendingCreatorFees0xbed6a16f MAX_SNIPE_TAX_BPS0xbf06b984 MAX_POT_BPS0xc45a0155 unknown0xcb2329e3 FLIP_WINDOW0xcc3cbd2a CREATOR_FEE_BPS0xd0eda5c3 VOL_HALF_LIFE0xd55be8c6 MAX_FEE_BPS0xd656f6fb VOL_TICKS_PER_BP0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe0bd799b unknown0xe1b4af69 afterDonate0xe1f55d4e unknown0xe4786a5e MAX_BURN_BPS0xe8dc055e unknown0xead29b0b marketState0xee1a6429 pendingCrossChainFees0xf688abd1 claimPot0xfd71aabe MIN_MAX_BUY_BPS