Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,113,048
0xC538…d0C4
The eight checks
8 pools use this hook, the first one 37 d ago.
- 01caution
Permissions that touch your moneyThe address enables after swap returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02n/a
What it takes from a swapNo pool with liquidity to swap through yet.
- 03pass
LPs can get outLiquidity added and removed in the same block came back whole.
- 04caution
The fee is the feeIts pools use a dynamic fee that the hook sets before every swap. It stands at 0.30% now and can change.
- 05caution
No one holds the switchNo owner() but it has setPendingConfig, setPendingConfigWithOracle, claim, setPoolConfig, claimable.
- 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 36 days.
Measured at block 93,113,048. 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 & 0x3fff0x10c4 · 01000011000100
- 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.
SPCX / USDG
fee dynamic, now 0.30%- Swap SPCX → USDGno liquidity at the current price
- Swap USDG → SPCXno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0xcd1a698d3bb04f53b7fca8885eb4e5c39f9e154b4fb9632544de470e4a6b054d
Read from the bytecode
- Code size
- 23,412 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 9
- 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.
- 0xe1a45218 BPS_DENOMINATOR
- 0xe1b4af69 afterDonate
- 0xe4c1b41c setPendingConfig
- 0xf5fbeb7d MIN_FEE_PIPS
- 0xe02836b6 CONFIG_UPDATE_GRACE_PERIOD
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- After initialize. Runs once, right after 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.
- After swap returns delta. Can take part of what you get out of every swap.
0xe02d92fd
setPendingConfigWithOracle
0xe170a462 claim0xd91fba87 PENDING_TTL_BLOCKS0xda32b15c initializePool0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xddde86c8 pendingPoolOwners0xdeee4135 oracleConfigs0xb6a8b0fa beforeDonate0xc4e833ce getHookPermissions0xc5f0424c MAX_ORACLE_DEVIATION_BPS0xc83399c0 setPoolConfig0xd01a87e2 queuedPoolConfigs0xd73792a9 FEE_DENOMINATOR0x954acedc requestRebalanceUp0x98d9e189 CONFIG_UPDATE_DELAY0x9f063efc afterAddLiquidity0xad3c8334 cancelPoolOwnerTransfer0xb0f7fff6 proposePoolOwner0xb47b2fb1 afterSwap0x675c78ff claimable0x6c2bbe7e afterRemoveLiquidity0x6e1c450d executePoolConfig0x6fe7e6eb afterInitialize0x7a4c2a9c feeStates0x91dd7346 unlockCallback0x4d643128 MAX_ORACLE_AGE0x4dbeb3e3 MAX_FEE_PIPS0x51bcf63c MAX_VOLATILITY_COEFF0x575e24b4 beforeSwap0x5bf70edf isPoolConfigured0x650a38b6 oracleStatus0x1ea971ba initializePoolWithOracle0x203813c7 cancelPoolConfigUpdate0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x3aaa2af2 MAX_FEE_STEP_PIPS0x4333a7b1 acceptPoolOwnership0x07ef2190 poolConfigs0x121b43d9 MAX_REVENUE_CUT_BPS0x14214c36 pendingConfigs0x15975937 cancelPendingConfig0x15d8ddd8 MAX_REBALANCE_TRIGGER_BPS0x170c92ae MAX_REBALANCE_WIDTH_TICKS