AquaQoSDocs

Security model

What AquaQoS trusts, which paths it enforces, what project reviews covered, and what remains open.

Internal review only

Every review below is internal to the project. There has been no external audit. Nothing here authorizes real funds or establishes solvency, profitability or market safety.

Trust assumptions

  1. Authentic dependencies. The configured Aqua and router addresses must host the pinned code. The constructor checks code length and the router's Aqua getter, which cannot rule out a counterfeit or a proxy. Deployment must verify runtime bytecode, as the fork and Sepolia proofs did.
  2. Honest standard ERC-20 tokens. Rebasing, fee-on-transfer, callback-bearing, malicious balance-reporting and arbitrary allowance-revoking tokens are unsupported.
  3. The owner may pause. Pausing ends the capacity commitment. It is the exit path, not a hidden guarantee.

Enforced boundaries

PathEnforcement
Program shapeExactly guard, XYC, salt. Anything else fails with InvalidGuardProgram
Fee recipesThe vault cannot ship them; nonempty fee state fails with UnsupportedFees
Maker hooks, receiver, unwrapFixed traits: hooks disabled, receiver is the vault, unwrap off. Changing them changes the Aqua key
Taker callbacksRun after the reservation; nested sibling fills see it
Same-order reentryRejected by SwapVM's per-order lock (UnexpectedLock)
Owner callbacks mid-fillEvery lifecycle call fails with TransactionInProgress
Other appsAqua keys balances by app; another app's pull from the vault fails
AllowanceThe full guarantee allowance floor is preserved on every output
Vault surfaceNo generic call, delegatecall, arbitrary approval or upgrade entrypoint

Allowance-floor correction

The first output policy checked transferable inventory against remaining entitlements only. Because standard tokens can decrement even a maximum approval, and Aqua.push is permissionless, enough trading could leave restored entitlement without transferable backing. The implemented rule requires allowance >= sum(g) + sum(r) + d on every output. A follow-up review confirmed the correction within the supported token and dependency assumptions.

Review record

DateScopeResult
2026-09-06Router, vault and canonical programsAllowance accounting issue identified and corrected; prototype limits accepted
2026-09-08Independent review of callback and conservatism testsNo production or blocking test defect
2026-09-09Release review of authorization, programs, floors and exitsNo new blocker in the v0 domain
2026-09-10Independent internal source reviewNo release-blocking defect in the v0 domain
2026-09-11Independent internal review before SepoliaNo critical, high, medium or low defect demonstrated in v0 scope

Threat model and residual risk

The most important residual risks are owner-key compromise, admitting a token outside the supported standard-ERC-20 domain, callback sequences beyond the tested depth, and the bounded cost of reading sibling state. The deployment is intentionally non-production: its public Sepolia tokens are valueless and owner-mintable.

BoundaryCurrent controlResidual condition
Owner lifecycleImmutable owner, paused-state exit, no generic call or upgrade pathA compromised owner can pause, dock and withdraw the group
Token semanticsImmutable pair and real-balance/allowance checksRebasing, fee-on-transfer, callback-bearing and malicious tokens are unsupported
Nested executionTransient reservations, per-order locks and rollback testsMixed-direction and deeper nesting need broader coverage before scope expands
Evidence and releasePinned inputs, retained receipts and source-match checksPublic testnet proof is not an external audit or authorization for real-value use

Accepted limitations

LimitConsequence
One immutable pair, canonical fee-free XYC, at most eight strategiesOther recipes are unsupported
Honest standard ERC-20 behaviorOne DAI/WETH fork run does not extend support to arbitrary tokens
Reservations last until transaction endSome safe sequential fills in one transaction are rejected
Full guarantee allowance floorLow allowance can reject otherwise backed fills
Input-ledger saturation and XYC overflowEligibility does not promise settlement; failures roll back
Bounded fuzzing and gas measurementsNo exhaustive proof and no universal gas bound

Remaining test breadth: mixed-direction and deeper callback nesting, successful nesting after outer output settlement, combined finite-allowance and payment routes, explicit zero-output rollback, and universal callback or token gas bounds. These are coverage limits, not demonstrated defects.

Verify

On this page