Reading the hook.
The address, the bytecode, then a swap each way through its pool. A few seconds.
v4 hook · Robinhood Chain · block 93,496,029
0xC15b…6080
The eight checks
3 pools use this hook, the first one 6 d ago.
- 01pass
Permissions that touch your moneyNone of the permissions that let a hook take from swaps or from LPs are switched on.
- 02pass
What it takes from a swapIt takes 0.29% on top of the pool fee.
- 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 0xb1748f1857bef8De020982aA33f6F9cC1b9aD3c1. Owner-style functions: transferOwnership, setHolidays, setDstMode, setSessionTimes, setOperator, setFeeOverride.
- 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.
- 08caution
Track record3 pools, first seen 5 days ago.
Measured at block 93,496,029. 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 & 0x3fff0x2080 · 10000010000000
- 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 / BABA
fee dynamic, now 0%- Swap USDG → BABAhook takes 0.09%
- Swap BABA → USDGhook takes 0.09%
- Add, then remove liquiditycame back whole
pool 0xfe709115a71c7f9c007f2ac9cb932071ff3b3117865122134e2c1bd96719734c
USDG / SKHY
fee dynamic, now 0%- Swap USDG → SKHYhook takes 0.29%
- Swap SKHY → USDGhook takes 0.29%
- Add, then remove liquiditycame back whole
pool 0x742282d7cd423bacc97e7f07121bbd7958d03059f8accfada01a0c5efc903397
Read from the bytecode
- Code size
- 14,352 bytes
- Owner
- 0xb1748f1857bef8De020982aA33f6F9cC1b9aD3c1
- Proxy
- no
- DELEGATECALL
- absent
- SELFDESTRUCT
- absent
- Outside calls
- 0
- 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.
- 0xf2fde38b transferOwnership
- 0xf43d504e clearFeeOverride
- 0xfc3ab60d sessionTimes
- 0xff8f9c15 feeFor
- 0xdec7f16c setHolidays
- 0xe30c3978 pendingOwner
- 0xecd8e907 sessionAt
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.
0xc5817691 utcOffset0xd4166763 currentSession0xdc4c90d3 poolManager0xdc98354e beforeInitialize0xb6a96e76 setDstMode0xbc063e1a MAX_FEE0xbeba1fbf setSessionTimes0xad51bdf3 localDay0xb3ab15fb setOperator0xb4f2396c setFeeOverride0xb5217bb4 pools0xa33920af initializer0xa621385e sessionStart0xa8993018 setPoolClass0x8ebfc796 setFeeExempt0x94733af5 allResumedAt0x9b610aa2 dstMode0x89820e98 setAllPaused0x8da5cb5b owner0x8ea9db9e setPaused0x77232597 addClosure0x79ba5097 acceptOwnership0x7d170c6d classFees0x897891ba setClassFees0x68077043 setOpenRamp0x697a80b7 allPaused0x715018a6 renounceOwnership0x570ca735 operator0x575e24b4 beforeSwap0x58cba3de clearGlobalFeeOverride0x427192e5 holiday0x50f6c7b0 MAX_OPEN_RAMP0x564575af MAX_CLOSURE_DURATION0x3410396d setWeeklyClosure0x39721dbe setGlobalFeeOverride0x398daa85 feeExempt0x3bbd5a8b closures0x2cc72980 setInitializer0x2f640e3e classDefined0x33fada9a MAX_OVERRIDE_DURATION0x19828b14 globalOverride0x230f2c3b weeklyClosure0x2a820084 openRamp0x0d9c2443 MAX_CLOSURES0x10e4edcb registerPool0x12482ef0 removeClosure