Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,972,731
0x7783…20CC
The eight checks
22 pools use this hook, the first one 36 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.
- 02fail
What it takes from a swapOne direction works and the other is refused (PartialFillUnsupported). You may be able to buy and not sell.
- 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 switchOwned by 0xE46641a1F3AB32601F6389a08a2a90727F031139. Owner-style functions: transferOwnership, claimableFees, setSwapsPaused, claimFees.
- 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 record22 pools over 36 days.
Measured at block 92,972,731. 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.
QLC / SOGDP
fee 0%- Swap QLC → SOGDPrefused: PartialFillUnsupported
- Swap SOGDP → QLChook takes 1.00%
- Add, then remove liquiditycame back whole
pool 0x17c9e0a9ebdac34d88d7540ea6edf33b720ae83e476ccb4f98169eddf13f2719
JPGDP / ANIME
fee 0%- Swap JPGDP → ANIMEhook takes 2.14%
- Swap ANIME → JPGDPrefused: PartialFillUnsupported
- Add, then remove liquiditycame back whole
pool 0x6d1138635d2f01ff7a77e173c7a5ef47bbd27c8b8b2ee71179e5feb5a5a57674
Read from the bytecode
- Code size
- 11,206 bytes
- Owner
- 0xE46641a1F3AB32601F6389a08a2a90727F031139
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 7
- 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.
- 0xdc98354e beforeInitialize
- 0xe1b4af69 afterDonate
- 0xe30c3978 pendingOwner
- 0xe4f88635 quoteLiabilities
- 0xf2fde38b transferOwnership
- 0xb6a8b0fa beforeDonate
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.
0xc4e833ce getHookPermissions0xce91e164 PLATFORM_BPS0xdc4c90d3 poolManager0x9f063efc afterAddLiquidity0xa5d0a41b registerMarket0xb47b2fb1 afterSwap0xb602e392 claimableFees0x8238e9da tokenPool0x8da5cb5b owner0x8dd5474b setSwapsPaused0x91dd7346 unlockCallback0x6fe7e6eb afterInitialize0x715018a6 renounceOwnership0x7564912b markets0x79ba5097 acceptOwnership0x536dac9b launchFactory0x575e24b4 beforeSwap0x5e3f2727 LP_FEE0x6c2bbe7e afterRemoveLiquidity0x2af9febb platformRecipient0x2dbfa735 claimFees0x3cbb03f3 feeAmounts0x46ca626b TICK_SPACING0x0815fed0 swapsPaused0x19f895ef finalizePendingRewards0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity