ExposureGate1D
a new SwapVM instruction
Turns an off-chain exposure reading into a one-way limit on liquidity. It can derate or halt a fill and can never improve one.
src/opcodes/ExposureGate.sol ↗1inch Aqua · SwapVM · Uniswap v4 · The Graph
_exposureGate1D reads a maker's live exposure across every strategy and can only derate or halt their fill, on 1inch SwapVM and Uniswap v4 alike.
01 · Simulated reading · 10%
At or below maxExposureBps the opcode does nothing. The maker's program fills exactly as written.
02 · Simulated reading · 70%
Between 50% and 90% the fill scales down linearly. At 70% every taker gets half the ungated output. Never more.
03 · Simulated reading · 95%
At 90% or above the swap reverts on SwapVM and Uniswap v4 alike. They share one gate, so they can't disagree.
The problem
Checked one by one
Seen together
0%
of the wallet committed in total
Aqueduct's oracle aggregates every strategy the maker has shipped, so each one is gated on the total, including strategies that look safe on their own.
Illustrative numbers, not live data. On-chain proof: test/MultiStrategyExposure.t.sol.
Three pieces, nothing else
a new SwapVM instruction
Turns an off-chain exposure reading into a one-way limit on liquidity. It can derate or halt a fill and can never improve one.
src/opcodes/ExposureGate.sol ↗a cross-strategy risk layer
Works out how much liquidity a maker can safely expose right now, summed across every Aqua strategy they've shipped. A Graph subgraph and a keeper feed it.
src/oracle/ExposureOracle.sol ↗execution that doesn't depend on the venue
Offers the same Aqua liquidity, under the same exposure limit, through a Uniswap v4 pool. The risk policy belongs to the strategy, not to any one pool.
src/hooks/AquaV4Hook.sol ↗III · The one property
Not “degrades gracefully”. Every way this system can go wrong ends in a strictly smaller fill or no fill at all, never in a taker getting more than the maker's own unsigned program authorized.
Live on Base Sepolia · chain 84532
deployment.json and the README's on-chain verification.—
maker strategies shipped
A, B, C + Strategy P
—
Uniswap v4 pools sourced from Aqua
static fee + risk-adjusted fee
—
pips fee at 10% exposure
verified on-chain, dynamic-fee pool
—
pips fee at 70% exposure
same pool, same formula