Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,890,958
0xFCd1…15c7
The eight checks
657 pools use this hook, the first one 11 d ago.
- 01caution
Permissions that touch your moneyThe address enables 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.
- 02n/a
What it takes from a swapNo pool with liquidity to swap through yet.
- 03caution
LPs can get outTaking liquidity straight back out lost 0.90%.
- 04pass
The fee is the feeA fixed fee of 0.30%, written in the pool key.
- 05caution
No one holds the switchOwned by 0x26E8134eCC3af5cCE32f34B03E7BD2f318B25158. Owner-style functions: withdraw, setPonsRef, setTiers, setRef, setPonsFactory, setBeneficiary.
- 06caution
The code cannot changeThe bytecode contains DELEGATECALL.
- 07pass
Only the PoolManager can call itEach callback refused a call that did not come from the PoolManager.
- 08pass
Track record657 pools over 11 days.
Measured at block 92,890,958. 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 & 0x3fff0x15c7 · 01010111000111
- 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.
PLTR / BRAWL
fee 0.30%- Swap PLTR → BRAWLno liquidity at the current price
- Swap BRAWL → PLTRno liquidity at the current price
- Add, then remove liquiditylost 0.90%
pool 0xab44503d297d982871599160cdd1fabf0a3d5ab7a700ac64405c408a15f8b65d
Read from the bytecode
- Code size
- 21,824 bytes
- Owner
- 0x26E8134eCC3af5cCE32f34B03E7BD2f318B25158
- Proxy
- no
- DELEGATECALL
- present
- SELFDESTRUCT
- absent
- Outside calls
- 14
- 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.
- 0x0e5eab20 dueLength
- 0x0e917f76 withdraw
- 0x1873dcdf delistQuote
- 0x21d0ee70 beforeRemoveLiquidity
- 0x2247b655 register
- 0x259982e5
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.
- After add liquidity. Runs after each deposit.
- 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.
- 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.
beforeAddLiquidity
0x2c96edc0 setPonsRef0x30c58ee3 stepAuto0x34673ab9 setTiers0x35997ee1 referencesThisBlock0x37eb92d9 familyKey0x3873308a setRef0x38af3eed beneficiary0x4372e69d ONE_PIPS0x4596ca11 unwind0x47e7ef24 deposit0x4a95d9d5 tiers0x4e494587 openPair0x4f68c981 setPonsFactory0x502e1e7c setBeneficiary0x575e24b4 beforeSwap0x5db61a97 stepShield0x5e615a6b getParams0x5f55cd23 graduate0x61c48e46 pairTick0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x6fe958d8 rebalance0x7bc18b08 position0x84cce538 setParams0x8da5cb5b owner0x91dd7346 unlockCallback0x95b0e5e1 sigma0x9f063efc afterAddLiquidity0xa193d3ca sweepToll0xae9fc205 SINK0xb01bce5c ratchetPips0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xb8dbfbab burnToll0xc4b6ebdf ref0xc4e833ce getHookPermissions0xc7aad574 poolBooks0xc819dbfd burnableOf0xca5d808d setRatchet0xcd5a2129 setBurn0xd5ab07f5 listPons0xd6a5d7db quotes0xd7c53ffe burnCfg0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xddd391a8 family0xdfcb6388 rebalanceQuotes0xe08d401f stepBurn0xe1b4af69 afterDonate0xe34a5f65 tollOf0xe52b3218 setBook0xe87268fd clearRef0xef38eaf1 getBook0xf2fde38b transferOwnership0xf51ffda5 listQuote0xf775df6a bookPools0xf7888aec balanceOf0xf8425a2f openFamily