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,637
0x1915…C5C7
The eight checks
3 pools use this hook, the first one 34 d ago.
- 01caution
Permissions that touch your moneyThe address enables after swap returns delta, after add returns delta, after remove returns delta. The hook is allowed to take; the next two checks measure whether it does.
- 02n/a
What it takes from a swapNo pool with liquidity to swap through yet.
- 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 0xBB2925877Eb6717f61216aEa3DeE2889DC39b336. Owner-style functions: setFeeRecipient, transferOwnership, withdraw, claimableFees, paused, 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 record3 pools over 34 days.
Measured at block 93,393,637. 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 & 0x3fff0x05c7 · 00010111000111
- 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 / META
fee 0%- Swap USDG → METAno liquidity at the current price
- Swap META → USDGno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0x90ebdc9992326f6b404d442b58066936f652828ba89d8441d8aa98f8abcd9062
Read from the bytecode
- Code size
- 24,478 bytes
- Owner
- 0xBB2925877Eb6717f61216aEa3DeE2889DC39b336
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 9
- 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.
- 0xe74b981b setFeeRecipient
- 0xf26ef49d DYNAMIC_FEE_FLAG
- 0xf2fde38b transferOwnership
- 0xf6d79aef unknown
- 0xfe047c2e unknown
- 0xfe702358 AUTHORIZER
- 0xdc98354e
bit 4
After donate
bit 3Before swap returns deltabit 2After swap returns deltabit 1After add returns deltabit 0After remove returns delta- 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.
- After swap returns delta. Can take part of what you get out of every swap.
- After add returns delta. Can charge LPs on the way in.
- After remove returns delta. Can take part of what LPs withdraw.
beforeInitialize
0xe1a45218 BPS_DENOMINATOR0xe1b4af69 afterDonate0xe30c3978 pendingOwner0xe4fbb609 CREATOR0xcb0856bb discountThreshold0xd9caed12 withdraw0xd9ccaf24 unknown0xdb2ec1d5 unknown0xdc4c90d3 poolManager0xbc063e1a MAX_FEE0xc3f909d4 getConfig0xc4e833ce getHookPermissions0xc516c0df unknown0xcab1d8f3 unknown0xb4e2ff04 unknown0xb602e392 claimableFees0xb6a8b0fa beforeDonate0xb77b83a5 unknown0xba97ac74 unknown0x91dd7346 unlockCallback0x949f68ec unknown0x9c673d54 unknown0x9f063efc afterAddLiquidity0xb47b2fb1 afterSwap0x800f399b unknown0x82cee4a9 unknown0x8a7d8771 unknown0x8da5cb5b owner0x8dc1632a unknown0x6fe7e6eb afterInitialize0x74617b9d unknown0x7673bae2 recipientShareBps0x79ba5097 acceptOwnership0x7ceae43c unknown0x5c975abb paused0x5fb439b4 unknown0x6a00c613 unknown0x6c2bbe7e afterRemoveLiquidity0x6d151101 revokeOwner0x57ddf9ac unknown0x582abd12 SIGNER0x595e2d77 unknown0x599131c4 unknown0x5a0492fc unknown0x4d7e6732 authorizedOwners0x54fd4d50 version0x562fc883 unknown0x56d84d90 unknown0x575e24b4 beforeSwap0x3df9a868 unknown0x46904840 feeRecipient0x46941cdd unknown0x479dfd7b CREATOR_SHARE_BPS0x4b757cb1 unknown0x2db13630 unknown0x2dbfa735 claimFees0x35126699 unknown0x3824a99a unknown0x3bfa2a36 unknown0x211c3f15 unknown0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x28043770 unknown0x2930497e unknown0x16c38b3c setPaused0x178c1669 unknown0x19b10771 unknown0x1cdcbe64 unknown0x1e6460a5 unknown0x058fc8a3 unknown0x09cae2c8 withdrawAll0x09efd365 unknown0x0b4dc8ca setDiscountThreshold0x13eff23e unknown