Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,175,370
0xe00d…a0CC
The eight checks
6 pools use this hook, the first one 24 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.
- 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 record6 pools over 24 days.
Measured at block 93,175,370. 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 / WSCAT
fee 0%- Swap ETH → WSCAThook takes 2.00%
- Swap WSCAT → ETHhook takes 2%
- Add, then remove liquiditycame back whole
pool 0x14227d856386dca182698160f11f3e855f0847c150a89978f6a54c21a3a8b7de
ETH / DOGGY
fee 0%- Swap ETH → DOGGYhook takes 2.00%
- Swap DOGGY → ETHhook takes 2%
- Add, then remove liquiditycame back whole
pool 0xca5a92d4788074697a31b2f8047edbb1ddad809f67471489886ca09d5ebbd7ca
Read from the bytecode
- Code size
- 8,500 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 13
- 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
- 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.
0x21d0ee70
beforeRemoveLiquidity
0x259982e5 beforeAddLiquidity0x2eb9ec31 collectCrossChainFees0x33635f05 currentFeeParts0x4ee8194d DEFEND_DROP_TICKS0x5710ebb9 pendingDefendFees0x575e24b4 beforeSwap0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x7f98b91e lastBuyAt0x805e856a MAX_VOL_SURCHARGE_BPS0x817db73b collectFees0x8322fff2 ETH0x91dd7346 unlockCallback0x9f063efc afterAddLiquidity0xaf7e397d currentFee0xb47b2fb1 afterSwap0xb5217bb4 pools0xb6a8b0fa beforeDonate0xbdec7248 pendingCreatorFees0xc45a0155 unknown0xcb2329e3 FLIP_WINDOW0xcbb68618 register0xcc3cbd2a CREATOR_FEE_BPS0xd0eda5c3 VOL_HALF_LIFE0xd55be8c6 MAX_FEE_BPS0xd656f6fb VOL_TICKS_PER_BP0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xead29b0b marketState