Ramp on Arc

Uniswap v4 Hook Contract 0x8c960de62a26a688b72e6cbf644f46715642a080 on Arc · Fee sharing · Verified contract

Volume (24h)
$20
Value locked (TVL)
$56
All-time volume
$20
Pools using this hook
1
Swaps (24h)
13 (7 traders)
Total swaps
13

What it does

Ramp is a shared liquidity desk whose swaps pay a dynamic, direction-dependent LP fee set by the pool owner (with a premium on the configured asymmetry direction and an optional mid-block surcharge), while LPs earn fees minus a protocol claim cut of up to 20%.

How it works step by step

  • Hook permissions are beforeInitialize and beforeSwap only; no liquidity or after-swap callbacks are used.
  • beforeSwap refreshes an optional mid-block price observation and returns an LP fee override (autonomous fee, possibly raised by a mid-block surcharge, capped by the pool max and by a poke or floor adjustment) flagged as an override fee.
  • Ramp is a shared liquidity desk: LPs deposit into ranges, receive ERC-6909 share tokens, and accrue fees tracked via Q128 accumulators per range.
  • A protocol claim fee (up to 20% of collected LP fees, MAX_CLAIM_FEE_BPS 2000) is accrued per currency and swept to a configured recipient.
  • Fees collected from the PoolManager are minted as claims to the hook and paid out to owners on claim or withdrawal.
  • Owners can authorize claim operators per range, and claim-fee rates are recorded historically in a separate ClaimFeePolicy contract.
Swap behaviour
On every swap the hook first checks the pool pause state and may record the current sqrt price for mid-block tracking. It then returns a dynamic LP fee: the configured autonomous fee for the swap direction, with a directional asymmetry premium applied to swaps in the configured premium direction, optionally adjusted by an active poke, plus a mid-block surcharge when price has moved sharply against the swap in the same block. Trades in the premium direction pay more; trades in the opposite direction pay the base fee (subject to the poke and surcharge rules). The hook returns zero before-swap delta, so it does not take or move swap tokens directly.
Liquidity behaviour
No liquidity callbacks. Liquidity is added and removed through the hook's own deposit and withdraw entry points, which call the PoolManager unlock flow, mint or burn ERC-6909 shares, and settle principal in ERC-20 tokens via safeTransferFrom to the PoolManager. Principal withdrawals enforce minimum amounts, and fee-share checkpoints are synchronized before any share movement.
Fee behaviour
The LP fee is dynamic: set per pool by the owner-restricted setPoolConfig (floor, flat, cap) and setPoolAsymmetry, optionally overridden by a time-limited pokeFee within floor and cap bounds, and optionally raised by the mid-block surcharge capped at the pool cap. Separately, a claim fee of up to 20% of collected LP fees is retained as protocol revenue (claimFeeOwed) and swept to claimFeeRecipient. The claim-fee rate can be changed by the restricted role at any time, with a historical minimum applied to backlogged ranges.
Owner & admin controls
Restricted (AccessManaged) functions let the authority set global and per-pool pauses (pause, pausePool, setPaused, setPoolPaused; pauses last at most 7 days each), configure pool fee parameters and asymmetry, set poke fees and clear pokes, configure mid-block surcharge parameters, set claim-fee rates and the claim-fee recipient, and swap the authority address via setAuthority. The authority can therefore pause swaps and deposits or withdrawals, and can change LP fees within the stated bounds. Authority management is delegated to an external AccessManager whose configuration is not included in the input.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap

beforeInitialize: rejects pools that are not dynamic-fee and validates the pool key. beforeSwap: enforces the pause gate, updates the mid-block observation, and returns the LP fee override with the override flag.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: A single privileged authority role can pause swaps and liquidity operations for the whole hook or per pool for up to 7 days at a time, repeatedly, change LP fees within set bounds, raise the protocol claim fee up to 20% of LP fees, redirect swept protocol fees via the claim fee recipient, and reassign the authority itself.

Risk to user funds: The hook holds principal and accrued fee claims on the PoolManager. Funds can be blocked by pauses, and LP fee income can be reduced by fee changes or the claim-fee cut. Principal is not directly seized by any function visible in the input, but the authority controls access to all withdrawals while paused.

Security findings

  • [medium] Restricted role can pause pool and global activity: setPaused, pause, setPoolPaused and pausePool block deposits, withdrawals, claims and swaps for up to 7 days per call, and beforeSwap reverts through _requireLive when paused. Repeated pausing can freeze user funds and trading.
  • [medium] Restricted role controls LP fee and claim fee: setPoolConfig, setPoolAsymmetry, pokeFee and setMidBlockConfig change the LP fee within the configured cap (up to ABSOLUTE_MAX_FEE set at deployment), and setClaimFee/setClaimFeeBps can raise the protocol claim fee up to 20% of LP fees. Fee increases reduce trader and LP economics without user consent.
  • [info] Hook holds and moves pool funds via PoolManager claims: Fees are minted as ERC-6909 claims held by the hook, and principal and fees are taken or settled through PoolManager unlock callbacks. Users depend on the hook's accounting being correct for withdrawals and claims.
  • [info] Pool-level and global pauses shared across all ranges: A pause affects every range of the pool or the whole hook, so a single authority action can block all users of the affected pool.
  • [info] Authority and deployment dependencies not verifiable from input: The AccessManager authority, its role assignments and any timelock delays are external to this source and cannot be assessed here; the claim fee recipient's identity is also set at runtime.

Contract details

Verified source
Yes (Ramp)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
23,123 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc20, fee-sharing, moves-currency, pausable, self-unlock

Pools using Ramp