Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,270,872
0x1D79…40cc
The eight checks
5 pools use this hook, the first one 17 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.
- 02pass
What it takes from a swapIt takes 1% 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 switchOwned by 0x843407b3b3B006336631F6846d72b38bCcbd7951. Owner-style functions: setLiquidityThreshold, burnThreshold, setBurnThreshold, setBurnDustThreshold, setDividendFlushThreshold, setTokenTicks.
- 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 record5 pools over 16 days.
Measured at block 93,270,872. 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 & 0x3fff0x00cc · 00000011001100
- 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.
TESTDG / USDG
fee 0%- Swap TESTDG → USDGhook takes 1.00%
- Swap USDG → TESTDGhook takes 1.00%
- Add, then remove liquiditycame back whole
pool 0xb346a0e8488441d11ad15bdd7482fba9ef6894e654870e0b07cb85f6174f8270
ETH / TEST3
fee 0%- Swap ETH → TEST3hook takes 1.00%
- Swap TEST3 → ETHhook takes 1%
- Add, then remove liquiditycame back whole
pool 0x4154c665945a24bdcf92f4a22d0af9a5fde02a3938bedd224ae8ece107f32ece
Read from the bytecode
- Code size
- 18,706 bytes
- Owner
- 0x843407b3b3B006336631F6846d72b38bCcbd7951
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 33
- 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.
- 0x0f6b7f69 setLiquidityThreshold
- 0x2142e7bc burnThreshold
- 0x23a978b4 setBurnThreshold
- 0x271645b0 pendingLiq
- 0x2c597de9 MAX_TAX_BPS
- 0x2d3b22ad fairLaunchWindow
- 0x30d172d5
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- 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.
dividendPool
0x3bb4fc89 setBurnDustThreshold0x3f7da3a6 setDividendFlushThreshold0x4355c1fc setTokenTicks0x4c4a3c25 stateView0x575e24b4 beforeSwap0x5bb47808 setFactory0x61d027b3 treasury0x6637e38c BPS_DENOM0x705865b0 setFairLaunchWindow0x715018a6 renounceOwnership0x750d1be9 liquidityThreshold0x79ba5097 acceptOwnership0x8a5628c5 PLATFORM_MIN_BPS0x8da5cb5b owner0x93f72b5f tickLowerOverride0x95ccea67 emergencyWithdraw0x98c9e4c5 fairLaunchEnd0x991a22ef setTokenTax0x99c8d556 tax0xa7bd3e9d setDividendPool0xad31b5b5 pendingDiv0xb30f393a MAX_FAIR_LAUNCH_WINDOW0xb47b2fb1 afterSwap0xbdc8ebe7 taxParams0xc45a0155 unknown0xc4e833ce getHookPermissions0xc7691e3b pendingBurn0xd07a3d04 maxBuyQuoteByToken0xd4a7dd5c setMaxBuyQuote0xd62b022b burnDustThresholdByToken0xdc4c90d3 poolManager0xddb0b4db snipeWindowEnd0xe133bb87 setTokenAllocations0xe17fbade quoteTokenOf0xe30c3978 pendingOwner0xe33a6274 tickUpperOverride0xf0f44260 setTreasury0xf2fde38b transferOwnership0xfccc2813 BURN_ADDRESS0xff57639d dividendFlushThreshold