Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,948,384
0x643E…20cc
The eight checks
28 pools use this hook, the first one 50 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.
- 02caution
What it takes from a swapIt takes 3.35% of each swap 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 0x81596084EC21D5eABab7E6D9A6783a8Ce3764241. Owner-style functions: setQuoteAllowed, claimCreatorFees, setRegistrar, setFeeClaimer, claimReferralFees, claimPlatformFees.
- 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 record28 pools over 49 days.
Measured at block 92,948,384. 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.
HOOD / HI
fee 0%- Swap HOOD → HIhook takes 3.35%
- Swap HI → HOODhook takes 3.35%
- Add, then remove liquiditycame back whole
pool 0x330991e8ef97b79b4fe17fb7b718f197ddd91aa556c138ce8d6e780c7ac7fec3
HOOD / BROOD
fee 0%- Swap HOOD → BROODhook takes 1.35%
- Swap BROOD → HOODhook takes 1.35%
- Add, then remove liquiditycame back whole
pool 0xe3850c358f281fc2766e5f9db3c99b314bb7d6bc3376cf3a1ff5919c010159df
Read from the bytecode
- Code size
- 12,249 bytes
- Owner
- 0x81596084EC21D5eABab7E6D9A6783a8Ce3764241
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 6
- 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.
- 0x1928f54e quoteAllowed
- 0x1fc8ce42 registerPair
- 0x1fd71a18 creatorOwed
- 0x240b9586 platformOwed
- 0x249d39e9 BPS
- 0x46062e9a register
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.
0x481c6a75
manager
0x49421d37 PLATFORM_ADD_BPS0x55e2654d setQuoteAllowed0x575e24b4 beforeSwap0x5b632360 MAX_TRADE_FEE_BPS0x61d027b3 treasury0x715018a6 renounceOwnership0x81cbd3ea feeClaimer0x89aeca76 registrars0x8c21e2e2 REFERRAL_ADD_BPS0x8da5cb5b owner0x90f0c7bf MIN_TRADE_FEE_BPS0x91dd7346 unlockCallback0x994ec7c7 referralOwed0xa5258210 LP_FEE_BPS0xac4e4054 REQUIRED_HOOK_FLAGS0xaf28cd0d proveQuote0xb47b2fb1 afterSwap0xb5217bb4 pools0xb947efcb claimCreatorFees0xc1bf1dcf setRegistrar0xc3accd48 setFeeClaimer0xcab1ef67 quoteOf0xcf893acc claimReferralFees0xd980cc75 quoteDecimals0xdc98354e beforeInitialize0xdf58a76f claimPlatformFees0xf0f44260 setTreasury0xf2fde38b transferOwnership