Avantis Offchain Review
Offchain automation case study
Overview
In July and August 2026 Guardian reviewed the backend of Avantis V2, running alongside Guardian's review of the V2 smart contracts. The scope was the full set of offchain services that sit between a trader and the chain: the applications that accept orders, price them, manage risk and submit transactions.
Guardian
Guardian provides institutional-grade security for digital asset teams, onchain and off. Every engagement runs two independent teams, backed by Helix, Guardian's AI auditor, and only human-verified findings reach the client.
Avantis
Avantis is a perpetuals exchange on Base offering leveraged trading across crypto and real-world assets. Much of its trading logic, from limit orders and TWAPs to spread pricing and relaying, runs offchain before anything touches a contract.
Why Guardian?
When the backend decides what gets signed and submitted, a sound contract is only half the system. Avantis wanted the offchain half reviewed with the same rigour, by people who could also read the contracts it talks to. Guardian was already reviewing the V2 contracts, so both halves could be covered by one firm, at the same time.
Scope
The v2-new branch of the Avantis backend monorepo, across six applications:
- Relayer: the service that submits trades onchain
- Central limit order and TWAP engines
- Risk engine and spread pricing
- Market app: order ingestion and job execution
- Core backend and its public APIs
- Deployment configuration and CI
How Guardian approached it
- Two independent teams. Each team reviewed the whole backend separately, and their findings were merged and cross-checked.
- Onchain context on tap. The offchain teams worked alongside the researchers on the V2 contract review, so every question about what a contract would accept, reject or trust was answered from the code, not assumed.
- Failure modes, not just inputs. Beyond authentication and input validation, the review followed what happens when a stream stalls, a job fails, a dependency is unavailable or two workers race: the states in which trading infrastructure actually breaks.
- Configuration as code. Service configuration and the build pipeline were reviewed alongside the application code.
Results
The review returned 68 findings, including two Critical and six High severity issues. Both Criticals were fixed while the review was still running, and a remediation round followed the main review.
- Critical: 2
- High: 6
- Medium: 38
- Low: 16
- Informational: 6
Several findings could only be judged with both halves of the system in view: behaviour that was acceptable in the backend alone, or in the contracts alone, but not in the two together. Finding details remain private to Avantis.
Impact
- The offchain services behind Avantis V2 were reviewed before launch, at the same time as the contracts
- The two most severe issues were closed during the engagement rather than after it
- Avantis received one merged view of risk across its backend and contracts, instead of two reports to reconcile
Running a trading backend, relayer or order engine? Guardian's Offchain Automation Audit reviews them from the source.