Likely custom pricing hook on Base
Uniswap v4 Hook Contract 0x7a66c977d24ebfff897d6be2861396c582e50088 on Base · 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 takes over part of each swap through a before-swap return delta and moves tokens out of the pool, but the exact effect on what traders pay or receive cannot be confirmed from the unverified bytecode.
How it works step by step
- Implements beforeSwap with a before-swap return delta, so the hook can settle part of a swap itself instead of the pool AMM
- Calls take(address,address,uint256) on the pool manager, which moves tokens out of the pool to the hook or a recipient
- Keeps a mapping(uint256 => uint256) at slot 0 and several scalar state variables at slots 1 to 3 that are read and written during swaps and by the fdaf3e45 function
- Exposes a view function 0x97331852 that takes a uint256 argument and a view function 0x6fab2876 that returns stored state
- Uses a nonpayable function 0xfdaf3e45 taking two uint256 arguments that writes to the mapping and to slot 3
- Swap behaviour
- On each swap beforeSwap runs, reads state from slots 1 to 3, and may return a delta that replaces part of the pool swap; tokens are moved with take, so the exact pricing rule cannot be determined from bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Cannot be determined from decoded bytecode; the hook does not show a dedicated fee setter, so the pool fee is likely the static fee unless the return delta changes effective pricing.
- Owner & admin controls
- No admin controls found in the decoded selectors; no owner, pause, or upgrade functions were identified.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to compute and apply custom swap logic before the pool's AMM executes, and beforeSwapReturnDelta lets the hook take over part of the swap amount.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: No privileged role was identified, but if 0xfdaf3e45 lacks access control any caller could change stored parameters that affect swap settlement.
Risk to user funds: The hook can move pool currency through take and return a delta that alters swap amounts, so it can affect the funds of traders and LPs in pools using it.
Security findings
- [high] Hook settles swaps via return delta: With beforeSwapReturnDelta enabled and take called from within the hook, the hook can route currency out of the pool and alter the amounts a swapper receives. Correct behaviour depends on logic that is not visible without source.
- [medium] Unverified source: No verified source is available, so the pricing logic, access checks, and the purpose of the state written by 0xfdaf3e45 cannot be confirmed.
- [medium] Unrestricted state-writing function: Function 0xfdaf3e45 is nonpayable and writes to storage; whether it is access-controlled could not be determined from the bytecode.
Contract details
- Verified source
- No
- Bytecode size
- 1,531 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta