Limit orders hook on Base
Uniswap v4 Hook Contract 0x938ccb04517664287127e336ab9e7356c387c088 on Base · Limit orders
- 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
A Uniswap v4 hook that lets authorized solvers fill signed orders against the pool during swaps, taking a configurable protocol fee sent to a treasury.
How it works step by step
- Runs beforeSwap on every pool swap and checks whether the caller is an authorized solver
- Tracks executed nonces per address so each signed order can be filled only once
- Lets users invalidate pending nonces through cancelNonce
- Returns a balance delta via beforeSwapReturnDelta to adjust swap amounts
- Takes a protocol fee in basis points and directs it to a treasury address
- Exposes domain separator and EIP-712 typehash views for off-chain order signing
- Swap behaviour
- beforeSwap checks solver authorization and executed nonces, and returns a delta so the hook can adjust the swap amounts when an order is matched.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- A protocol fee in basis points (slot 2, readable via protocolFeeBps) is configured by the owner and is read in the swap path; the exact fee accounting is not fully resolvable from the decoded bytecode alone. The hook appears to take a protocol cut and forward it to the treasury.
- Owner & admin controls
- Owner (slot 0) can set the protocol fee in basis points via setProtocolFeeBps, set the treasury address via setTreasury, and authorize or deauthorize solvers via setSolverAuthorization. Solver authorization gates the beforeSwap path (mapping at slot 3 is read in beforeSwap). No pause or upgrade function was identified in the decoded selectors.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap: runs on every swap and reads solver authorization and nonce state to decide whether a solver-submitted order may execute. beforeSwapReturnDelta: lets the hook return a delta to the PoolManager, so it can adjust or absorb part of the swap amounts (consistent with settling an off-chain signed order against the pool).
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: The owner can change the protocol fee, redirect fee revenue by changing the treasury, and grant or revoke solver rights. A malicious or compromised owner could raise the fee sharply or authorize a malicious solver that executes orders against users.
Risk to user funds: The hook sits on the swap path with return-delta permission, so it can alter amounts exchanged in pool swaps and can route a protocol fee to the treasury. It does not appear to custody pool liquidity directly, but user swap outcomes depend on the owner and authorized solvers.
Security findings
- [medium] Hook modifies swap deltas: beforeSwapReturnDelta lets the hook alter swap deltas, so it can take or redirect part of the swap amounts relative to the pool's standard pricing.
- [medium] Owner-set protocol fee with unverified cap: setProtocolFeeBps is a single owner-controlled setter with no bound visible in the decoded selectors; the cap cannot be confirmed from bytecode.
- [medium] Privileged solver role: Solver authorization (slot 3) gates order execution in beforeSwap; an authorized solver can influence swap outcomes for signed orders.
- [info] Nonce-based replay protection: Executed nonces (slot 4) are tracked per address and cancelNonce lets a user invalidate them, indicating replay protection for signed orders.
- [info] No upgrade or pause path found: No proxy, upgrade, or pause selectors were decoded, so the contract appears non-upgradeable with no emergency stop.
Contract details
- Verified source
- No
- Bytecode size
- 6,665 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta
Pools using Limit orders hook
- WETH / USDC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today