Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,242,290
0xD4C2…05C7
The eight checks
5 pools use this hook, the first one 38 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.
- 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 0x93668b424Bf65568bee21a9b744B267E83d2416d. Owner-style functions: transferOwnership, setFeeRecipient, 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 record5 pools over 37 days.
Measured at block 93,242,290. 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.
GLXY / USDG
fee dynamic, now 0%- Swap GLXY → USDGno liquidity at the current price
- Swap USDG → GLXYno liquidity at the current price
- Add, then remove liquiditycame back whole
pool 0xfc4208001b8b5f4d20acd2ef0c7faf319e5083f9cbb2271adf892551dbed2ec0
Read from the bytecode
- Code size
- 18,522 bytes
- Owner
- 0x93668b424Bf65568bee21a9b744B267E83d2416d
- 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.
- 0xf26ef49d DYNAMIC_FEE_FLAG
- 0xf2fde38b transferOwnership
- 0xf6d79aef unknown
- 0xfe047c2e unknown
- 0xfe702358 AUTHORIZER
- 0xe1b4af69 afterDonate
- 0xe30c3978
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.
pendingOwner
0xe4fbb609 CREATOR0xe74b981b setFeeRecipient0xdb2ec1d5 unknown0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xe1a45218 BPS_DENOMINATOR0xc516c0df unknown0xcb0856bb discountThreshold0xd9caed12 withdraw0xd9ccaf24 unknown0xb77b83a5 unknown0xba97ac74 unknown0xbc063e1a MAX_FEE0xc3f909d4 getConfig0xc4e833ce getHookPermissions0x9f063efc afterAddLiquidity0xb47b2fb1 afterSwap0xb602e392 claimableFees0xb6a8b0fa beforeDonate0x8dc1632a unknown0x91dd7346 unlockCallback0x949f68ec unknown0x9c673d54 unknown0x800f399b unknown0x82cee4a9 unknown0x8a7d8771 unknown0x8da5cb5b owner0x6fe7e6eb afterInitialize0x74617b9d unknown0x7673bae2 recipientShareBps0x79ba5097 acceptOwnership0x7ceae43c unknown0x5c975abb paused0x6a00c613 unknown0x6c2bbe7e afterRemoveLiquidity0x6d151101 revokeOwner0x562fc883 unknown0x575e24b4 beforeSwap0x582abd12 SIGNER0x599131c4 unknown0x46941cdd unknown0x479dfd7b CREATOR_SHARE_BPS0x4d7e6732 authorizedOwners0x54fd4d50 version0x35126699 unknown0x3824a99a unknown0x3bfa2a36 unknown0x3df9a868 unknown0x46904840 feeRecipient0x21d0ee70 beforeRemoveLiquidity0x259982e5 beforeAddLiquidity0x2db13630 unknown0x2dbfa735 claimFees0x16c38b3c setPaused0x178c1669 unknown0x19b10771 unknown0x211c3f15 unknown0x058fc8a3 unknown0x09cae2c8 withdrawAll0x0b4dc8ca setDiscountThreshold0x13eff23e unknown