Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,888,709
0xf667…bfFF
The eight checks
188 pools use this hook, the first one 84 d ago.
- 01caution
Permissions that touch your moneyThe address enables before remove liquidity, before swap returns delta, after swap returns delta, after add returns delta, after remove returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02caution
What it takes from a swapIt takes 6.71% of each swap on top of the pool fee.
- 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% now and can change.
- 05caution
No one holds the switchOwned by 0x30e4B6dc3139e28b5C5E493D395a0aca4f1CddBa. Owner-style functions: transferOwnership, setFeeExemptLocker, settleClaim, setPoolFeeExemptSuspended, setPoolFeeExemptLocker, setPoolLpFeePips.
- 06fail
The code cannot changeIt is a proxy. The code that runs lives at 0x1e09D23720FD12270C68D7B587FA9fB3De046990.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record188 pools over 83 days.
Measured at block 92,888,709. 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 & 0x3fff0x3fff · 11111111111111
- 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.
WALLSTREET / USDG
fee dynamic, now 0%- Swap WALLSTREET → USDGhook takes 2.74%
- Swap USDG → WALLSTREEThook takes 2.73%
- Add, then remove liquiditycame back whole
pool 0x9349a66b6a567d616d5107c75a3490de28efe01c11436790c3bfe0dc6026bf02
ETH / CRH
fee dynamic, now 0%- Swap ETH → CRHhook takes 6.70%
- Swap CRH → ETHhook takes 6.71%
- Add, then remove liquiditycame back whole
pool 0xcb77aa0808f424cd58d3e90c5fe80e28d607a89217218a5322046d7d90483d7e
Read from the bytecode
- Code size
- 21,267 bytes
- Owner
- 0x30e4B6dc3139e28b5C5E493D395a0aca4f1CddBa
- Proxy
- yes, code at 0x1e09D23720FD12270C68D7B587FA9fB3De046990
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 5
- 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.
- 0xe30c3978 pendingOwner
- 0xe74ec265 OBSERVATION_CARDINALITY
- 0xf2fde38b transferOwnership
- 0xf60e72e7 poolLpFeePips
- 0xfc1db565 setFeeExemptLocker
- 0xdc98354e beforeInitialize
bit 4After donatebit 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.
- After initialize. Runs once, right after a pool is created.
- Before add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- After add liquidity. Runs after each deposit.
- Before remove liquidity. Can refuse a withdrawal. LPs may not get out.
- After remove liquidity. Runs after each withdrawal.
- 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.
- After donate. Runs after 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.
- After add returns delta. Can charge LPs on the way in.
- After remove returns delta. Can take part of what LPs withdraw.
0xe039c190
beginExemptionAdminTransfer
0xe1b4af69 afterDonate0xe1f0e331 platformShareBps0xe20a7121 HOOK_KIND0xcf1e6a41 registerCanonicalPool0xd0ad47eb settleClaim0xdc2b084d totalLiabilityByCurrency0xdc4c90d3 poolManager0xdc6c0a45 rewardsInToken0xc4e833ce getHookPermissions0xc8258905 registeredRewardEscrow0xcb004645 bucketLiability0xcf054cf3 rewardsInStock0xb5d437a0 FEE_LOGIC_RUNTIME_CODEHASH0xb6a8b0fa beforeDonate0xb97a2319 implementationAddress0xb9cf9bf7 armCanonicalInitialLiquiditySalt0xc301b4fe defaultLpFeePips0xa74e3c9e registeredQuoteAsset0xb034a6fb setPoolFeeExemptSuspended0xb04500b1 registeredBurnExecutor0xb197ba73 policyHash0xb47b2fb1 afterSwap0x98250605 MAX_POOL_LP_FEE_PIPS0x9ba0076f setPoolFeeExemptLocker0x9e60d434 impairmentController0x9ed7e491 poolFeeExemptSuspended0x9f063efc afterAddLiquidity0x8899bd91 MIN_PLATFORM_SHARE_BPS0x8a29e2de initialize0x8da5cb5b owner0x969fb981 registeredToken0x6fe7e6eb afterInitialize0x715018a6 renounceOwnership0x72543905 MIN_TOTAL_FEE_PIPS0x79ba5097 acceptOwnership0x84aa0527 registeredReinvestmentExecutor0x6395e14a setPoolLpFeePips0x68bbcf4e settleExecutionGas0x6c2bbe7e afterRemoveLiquidity0x6dbb05c3 pendingExemptionAdmin0x6f7c783f executionObservation0x5028db1a feeLogic0x52d1902d proxiableUUID0x5384ab4b registerPool0x575e24b4 beforeSwap0x606003e8 HOOK_VERSION0x4b38474d feeSink0x4b3e8d73 settleRewardEscrow0x4e17f6c7 poolFeeExemptLockers0x4e5823bc SWAP_LOGIC_RUNTIME_CODEHASH0x35ce7aa2 exemptionAdmin0x3f78a002 acceptExemptionAdmin0x43bb31ec setDefaultLpFeePips0x46ca626b TICK_SPACING0x4858decd poolFeeExemptLocker0x22efec49 rewardsInStable0x259982e5 beforeAddLiquidity0x2a3b9500 _delegateViewToSwapLogic0x30c0c5a6 swapLogic0x16eebd1e launcher0x1b206fa8 MAX_PLATFORM_SHARE_BPS0x1d3c85ff OBSERVATION_SPACING0x21211816 feeExemptLocker0x21d0ee70 beforeRemoveLiquidity0x03fd2a45 DEAD0x05bf7bbe feeExemptLockers0x0885f732 poolConfig0x16ed63bf initializeLegacy