TremorDocs
Docs menu
About Tremor

Architecture

What Tremor is, how it sits on the official 1inch Aqua and SwapVM contracts, and what is deployed.

Tremor is a two-sided market in capped ETH realized-variance receipts, built on the official 1inch Aqua and SwapVM contracts. A writer funds a maker vault; the vault ships three SwapVM strategies; buyers pay an executable ask for receipt tokens, holders can sell them back at an executable bid before expiry, and after expiry every receipt redeems for USDC at the realized variance computed on-chain from the Chainlink feed's own round history.

Every unit sold is fully collateralized: the vault reserves that unit's capped payout, and the writer cannot withdraw the reservation, cannot revoke the vault's Aqua allowance, cannot move unsold inventory, and cannot dock the strategies that pay holders out.

The same realized-variance primitive prices a vol-adaptive spread for an Aqua AMM, so an LP can measure and hedge loss-versus-rebalancing (LVR ∝ σ²) with the instrument that pays σ².

Aqua and SwapVM in one paragraph

Aqua is 1inch's shared-liquidity layer: a maker ships a strategy (a SwapVM program plus the tokens it may draw on) and Aqua records virtual balances. Nothing is deposited into Aqua — when a taker swaps, Aqua pulls from the maker with transferFrom and pushes the taker's tokens back. A SwapVM program is a flat list of instructions [opcode:1][argsLength:1][args]; the router runs them in order and the last terminal instruction fixes the price.

Tremor runs on the unmodified official AquaSwapVMRouter. Every Tremor program is built from three stock instructions — Salt (0x02), Deadline (0x20) and Extruction (0x04) — and all of Tremor's pricing lives behind the Extruction target. There are no custom opcodes and no forked router. See Running on the official router.

The three legs

A series is three Aqua strategies, all shipped from the writer's vault by VarianceSeriesFactory.createSeries:

ISSUE   Salt(id,1) · Deadline(saleEnd) · Extruction(engine, [1,1,id])     USDC → receipts
EXIT    Salt(id,2) · Deadline(expiry)  · Extruction(engine, [1,2,id])     receipts → USDC   + burn hook
SETTLE  Salt(id,3) ·                     Extruction(engine, [1,3,id])     receipts → USDC   + burn hook

Each of EXIT and SETTLE is shipped with a virtual USDC balance covering the whole capped liability, but both draw on one real balance — the writer's vault. That is safe because either path burns the receipt it is paid for: a unit can be exited or redeemed, never both. The engine bounds every payout by the liability that burn releases, so the two virtual allocations can never both be spent on the same unit.

What is deployed

ContractResponsibility
AquaSwapVMRouterThe official router, deployed unmodified from the upstream source
VarianceSeriesFactoryController: validates and creates series, ships all three strategies, owns every reservation
TremorMarketEngineThe Extruction target that prices ISSUE, EXIT and SETTLE
TremorMakerVaultOne per writer. Deterministic address, no admin, no upgrade path, no rescue function
VarianceAccumulatorBounded permissionless checkpointing of the observation window, and permissionless finalization
VarianceReceiptPer-series ERC-20. Its router-only maker hook burns every unit that leaves through EXIT or SETTLE
TremorSeriesDeployerCREATE2 deployer for vaults and receipts, so a vault address is a pure function of its writer
TremorLensBatched read model: live quotes, vault state, oracle progress, leg status
TremorProgramsStateless read model for the raw orders, programs and ship plans
RealizedVarianceOracleTrailing realized variance for the LVR tools and VarianceSpread

Every constructor dependency must contain code, and the Lens verifies at construction that the controller, engine, accumulator, deployer and router all agree about each other. Contracts are immutable and non-upgradeable.

Components

ComponentWhat it does
contracts/ (Foundry)The contracts above, the pricing library and its 60-digit reference vectors, unit and invariant suites, and a Base-fork adversarial demo
backend/ (Rust, axum, :8787)Indexes controller / router / Aqua / vault events, caches Chainlink rounds, replicates realized variance and the market quote off-chain for charts, serves the JSON read model. Holds no keys and sends no transactions.
subgraph/ (The Graph)Indexed historical entities—fills, checkpoints, finalization, vault activity and receipt balances; never the authority for live executable quotes or balances
web/ (Next.js 16, :3000)Markets, the series terminal, the write flow, portfolio, the LVR calculator and these docs. Live quotes and wallet actions go straight to the Lens and the router through viem/wagmi; history comes from the backend.

The Lens and the on-chain quotes are authoritative. The backend is a replica: when the two disagree, the chain is right and the backend is stale.

Deployer metadata

Values below are read from web/src/config/deployment.json for the chain this build targets.

Deployer MetadataValue
NameTremor
ChainBase Sepolia (84532) — deployed
Aqua0x3B568C149DDf92Bd1f7deF40bDD8930503e70B31
AquaSwapVMRouter0xb8dcED3Cf6266Dd8fEc05849fce3734B79A7e722
VarianceSeriesFactory0xC86Cf4AD22ABD7169458cCDc58c51e71f23586f2
TremorMarketEngine0x44a76D0Df659708a5b8170c0eE1C600C8bc3Eba0
VarianceAccumulator0xcdd795440679d4F33bf410879e62B5A4015b4Dc9
TremorSeriesDeployer0x1E9117E447e4C2C14B8be4eE59877d66bE8B6893
TremorPrograms0x169b52DFa0aFcbCB83A442EfBDBB21cd35209bD0
TremorLens0x016CEde278FFB5B2B79E9d7afe11E4d17Bb9B059
RealizedVarianceOracle0x7c40518dA5C3dEa9E5F74d12093bbd53d9FC1124
USDC (quote token)0x13a058bE25Da579e0858d689F5982eDaCE8356B7
Chainlink ETH/USD feed0x4aDC67696bA383F43DD60A9e78F2C97Fbbfc7cb1
WETH0x4200000000000000000000000000000000000006
Deployment block46685189