Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,393,833
0xbC86…aded
The eight checks
3 pools use this hook, the first one 41 d ago.
- 01caution
Permissions that touch your moneyThe address enables before swap returns delta, after swap returns delta, after remove 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.
- 03caution
LPs can get outTaking liquidity straight back out lost 3.03%.
- 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 0x617EC1fdE56037ea38e7A3E53195d372887D92D9. Owner-style functions: setBeta, setLaunchCfg, unpause, sweepTreasury, setGuardian, pausedAll.
- 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 record3 pools over 40 days.
Measured at block 93,393,833. 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 & 0x3fff0x2ded · 10110111101101
- 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.
USDG / FLP
fee dynamic, now 0%- Swap USDG → FLPhook takes 0.30%
- Swap FLP → USDGhook takes 0.24%
- Add, then remove liquiditylost 3.03%
pool 0xcdc3f88b68f891f3937f2da366e13245f086339173da7740dd66b2a9d4450570
TUSD / FLP
fee dynamic, now 0%- Swap TUSD → FLPhook takes 1%
- Swap FLP → TUSDhook takes 1%
- Add, then remove liquiditydeposit refused: LaunchClosed
pool 0x47cfe194226a42a09a76cef07ec5b0b08f882c2580b1377337395e5bb6e6469e
Read from the bytecode
- Code size
- 19,371 bytes
- Owner
- 0x617EC1fdE56037ea38e7A3E53195d372887D92D9
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 8
- 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.
- 0x15977d45 ledger
- 0x164a41fb protocolFeePendingAt
- 0x2045aeb7 setBeta
- 0x21d0ee70 beforeRemoveLiquidity
- 0x24dff74c setLaunchCfg
- 0x259982e5
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.
- Before add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- 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.
- Before donate. Runs before 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 remove returns delta. Can take part of what LPs withdraw.
beforeAddLiquidity
0x29ab1c95 caBucket0x2b20e397 registrar0x2b7061ec executeBuyback0x3407f2be flushBuyback0x35659fb8 protocolFeeBps0x37ed3f1e protocolShareBps0x452a9320 guardian0x46163db4 buybackKey0x4ac37508 buybackSink0x4cdaa8d3 pendingBaseFeeAt0x4fff5843 unpause0x575e24b4 beforeSwap0x5c635522 registerFromRegistrar0x5fcbd285 lpToken0x67f340cc sweepTreasury0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x74881a9f protocolFeePending0x79ba5097 acceptOwnership0x7d37df64 acc0x7fa67e93 commitBaseFee0x8433af80 launchCfg0x87ecb029 commitProtocolFee0x8a0dac4a setGuardian0x8bea4f2d treasurySink0x8da5cb5b owner0x91dd7346 unlockCallback0x9be6390e pausedAll0x9dddaa43 pendingBaseFee0x9ee933b5 setLpToken0x9f063efc afterAddLiquidity0x9fde54f5 setExempt0xa1d4958c launchPool0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xbe5cd9e9 betaBps0xc4e833ce getHookPermissions0xcc718f76 config0xcdac731d syncStoredFee0xce9b5ce4 bbCfg0xced62683 setPoolConfig0xd3221609 setBuyback0xd7107bfc setPausedAll0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1b4af69 afterDonate0xe30c3978 pendingOwner0xe4467f35 setProtocolFee0xeecf277f treasuryQ0xf1320af2 exempt0xf2fde38b transferOwnership0xf55302bd pause0xfaab9d39 setRegistrar