Likely custom pricing hook on Ethereum
Uniswap v4 Hook Contract 0xfecf63d35524739c2ac212d24581dbc38bee8088 on Ethereum · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook alters swap settlement through a before-swap return delta and moves currency during swaps, but the exact effect on which trades pay more or less cannot be determined from the bytecode alone.
How it works step by step
- Implements beforeSwap with a beforeSwapReturnDelta permission, so the hook can alter the swap amounts it settles against the pool.
- Calls take(address,address,uint256) on the PoolManager, which moves tokens out of the pool's reserves to the hook or a recipient during a swap.
- Keeps several uint256 state variables (slots 1 and 2) that the swap path reads and updates, likely tracking reserves or accumulated amounts.
- Stores a per-key mapping at slot 0 that is written by the 0xefe7221e function and read on swaps.
- Exposes two view functions (0x3255fa40 and 0xdadc7c8d) for reading internal state, and a nonpayable 0xefe7221e taking two uint256 arguments that updates the mapping.
- Swap behaviour
- On each swap the beforeSwap callback runs, reads stored state, and can return a delta that changes how much of the swap is filled from the pool; the hook also calls take to move currency. Exact pricing formula cannot be determined from bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static fee; no dynamic fee override is evident from the permissions, though the hook's return delta can change effective amounts charged to swappers.
- Owner & admin controls
- No admin controls found in decoded selectors; the 0xefe7221e setter with two uint256 arguments may be a parameter or state update function callable without evident access control, which could not be verified.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to compute and apply a custom amount delta on each swap, with beforeSwapReturnDelta allowing that delta to modify the swap's settled amounts and to take currency via take.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: If the setter 0xefe7221e is privileged, a controlling key could change the state that determines swap deltas and thus the amounts swappers receive or pay.
Risk to user funds: The hook can take currency from the pool through take and modify settled swap amounts via its return delta, so it can move pool funds and affect trader outcomes.
Security findings
- [high] Return delta can alter settled amounts: beforeSwapReturnDelta lets the hook change swap amounts and take currency through take, so a flawed or manipulable calculation can divert pool or trader funds.
- [medium] Unverified state setter: Selector 0xefe7221e is nonpayable, writes to storage slots 0 and 3, and has no visible access check in the decoded output, so its callers cannot be confirmed.
- [medium] No source to audit: Without verified source the pricing logic, access control and any upgrade path cannot be confirmed from the bytecode.
Contract details
- Verified source
- No
- Bytecode size
- 1,428 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Likely custom pricing hook
- ETH / OMARK (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today