Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 92,974,342
0x5F74…AAEc
The eight checks
21 pools use this hook, the first one 14 d ago.
- 01caution
Permissions that touch your moneyThe address enables before remove liquidity, 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 1.20% of each swap on top of the pool fee.
- 03n/a
LPs can get outClosed to outside LPs: only the hook's own liquidity is in the pool.
- 04pass
The fee is the feeA fixed fee of 0%, written in the pool key.
- 05caution
No one holds the switchNo owner() but it has claimProtocolFees, claimCreatorFees, settle, setCreator, setProtocolRate.
- 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 record21 pools over 14 days.
Measured at block 92,974,342. 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 & 0x3fff0x2aec · 10101011101100
- 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.
REPUBLICAN / DEMOCRATS
fee 0%- Swap REPUBLICAN → DEMOCRATShook takes 0.50%
- Swap DEMOCRATS → REPUBLICANhook takes 0.50%
- Add, then remove liquiditydeposit refused: NotFactory
pool 0x0318919904a88894c1629240c1009fef5be4d6095c8cb98ea713ab022ecb8542
ETH / REPUBLICAN
fee 0%- Swap ETH → REPUBLICANhook takes 1.20%
- Swap REPUBLICAN → ETHhook takes 1.20%
- Add, then remove liquiditydeposit refused: NotFactory
pool 0xb628517d132de2c8405b9a0db2eb1b0fea5ccf06788761ef61ce89fbeaf9dc3c
Read from the bytecode
- Code size
- 21,753 bytes
- Owner
- none found
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 16
- 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.
- 0x173fd1db pairCount
- 0x1ad8b03b protocolFees
- 0x21d0ee70 beforeRemoveLiquidity
- 0x235b611e gaugeBps
- 0x259982e5 beforeAddLiquidity
- 0x28245c6d CROSS_TICK_SPACING
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 add liquidity. Can refuse a deposit, or only let some addresses provide liquidity.
- Before remove liquidity. Can refuse a withdrawal. LPs may not get out.
- 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.
0x4a7d0369
claimProtocolFees
0x4cc24129 MIN_FIRST_ROUND0x4f40d38c CODENAME0x575e24b4 beforeSwap0x58d5cfaf claimCreatorFees0x5da1d19a ETH_TICK_SPACING0x6c2bbe7e afterRemoveLiquidity0x6fe7e6eb afterInitialize0x87f95b55 firstRoundEnd0x8cd2e33e BUYBACK_MAX_IMPACT_TICKS0x8df82800 settle0x91686f53 setCreator0x91dd7346 unlockCallback0x9e817c03 ROUND_LENGTH0x9f063efc afterAddLiquidity0xa3524f55 giveUpCreatorFees0xaefcb44e ARB_THRESHOLD_BPS0xb446cd08 protocolRateBps0xb47b2fb1 afterSwap0xb6a8b0fa beforeDonate0xbdf391cc getPair0xbe2ee0be arbitrage0xc45a0155 unknown0xc4e833ce getHookPermissions0xcc06fb33 poolKeys0xcc7f9550 registerPair0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe0bc04e3 snipeTaxBps0xe1b4af69 afterDonate0xfa272211 setProtocolRate0xffa1ad74 VERSION0x3b9aca00 unknown