Product
How it works
A conceptual view of the two execution flows.
Mental model
Aqua0 routes traders through one of two execution venues, both backed by the same shared LP capital sitting in the on-chain SharedLiquidityPool (SLP) on each chain. The SLP itself is a custody vault: it holds tokens, verifies signatures, and emits events. All accounting (per-LP balances, strategy commitments, attribution) lives in the off-chain brain.
Aqua SwapVM, single-chain
sequenceDiagram
participant LP as LP wallet
participant Be as Backend (brain)
participant Op as Operator
participant SLP as SLP
participant Aqua as 1inch Aqua
participant Tr as Trader
participant Rt as 1inch SwapVM Router
LP->>SLP: deposit (event indexed; brain credits LP)
LP-->>Be: signed Commitment (off-chain only)
Be-->>Op: validates aggregates, orders ship
Op->>SLP: shipStrategy(bytes, tokens, amounts)
SLP->>Aqua: ship(swapVMRouter, bytes, tokens, amounts)
Tr->>Rt: swap(order, tokenIn, tokenOut, amountIn, takerData)
Rt->>Aqua: pull tokenOut from SLP, push tokenIn to SLP
Rt-->>Be: emit Swapped
Be->>Be: pro-rata deltas across swap_strategy_commitments- An LP deposits into the SLP. The deposit event is indexed; the brain credits the LP in its DB.
- The LP signs an off-chain
Commitmentallocating part of their balance to a strategy. The commitment never goes on chain. - Once aggregate commitments cover a target ship size, the operator EOA calls
slp.shipStrategy(bytes, tokens, amounts). The SLP forwards into 1inch Aqua's 4D virtual ledger, with the SLP as the maker. - A trader hits
AquaSwapVMRouter.swap. The router pullstokenOutfrom the SLP and pushestokenInto the SLP, atomically inside Aqua's virtual ledger. - The router emits
Swapped. The brain reads it and pro-rata-distributes the deltas across every LP committed to that strategy.
No on-chain attribution writeback happens. The SLP's role ends at the swap.
Uniswap V4 JIT, cross-chain
sequenceDiagram
participant T as Trader
participant Be as Backend (brain)
participant PM as PoolManager (chain B)
participant Hk as Aqua0Hook
participant SLPB as SLP_B
participant Wk as Repayment-worker
participant SLPA as SLP_A (chain A)
participant LZ as LayerZero OFT
Be-->>T: signed JITPayload + ranges (hookData)
T->>PM: swap(poolKey, params, hookData)
PM->>Hk: beforeSwap
Hk->>SLPB: verifyJIT(payload, ranges)
Hk->>PM: modifyLiquidity (range injected)
PM->>Hk: afterSwap
Hk->>SLPB: recordSwapSettlement → emit SwapSettled
Be-->>Wk: signed RepaymentWithdrawPayload
Wk->>SLPA: withdrawForRepayment(payload)
SLPA->>LZ: forwardOut to OFT adapter
LZ-->>SLPB: bridged delivery → tokens in SLP balance- The backend signs an EIP-712
JITPayloadreferencing chain-A LP capital that will back a chain-B swap. - The trader submits a Uniswap V4 swap on chain B with the payload as
hookData. Aqua0Hook.beforeSwapvalidates the signature against the SLP'sbackendSignerand injects a temporary range backed by SLP_B capital.- The swap executes against the injected range.
Aqua0Hook.afterSwapremoves the range and emitsSwapSettled.- The brain's settlement poller picks up
SwapSettledand queues a repayment obligation. The repayment-worker drains the source LP viaslp.withdrawForRepaymentagainst a backend-signedRepaymentWithdrawPayload, then dispatches a LayerZero V2 OFT message. Tokens land directly in the destination SLP's balance via OFT delivery; the brain credits the destination filler off-chain.
There is no Composer hop, no CCTP path, no on-chain attribution writeback for the bridge.