Trade the weekend gap on tokenised stocks w aqua - nothing to liquidate.
The problem
Tokenised stocks trade 24/7. The companies behind them do not.
From Friday's close to Monday's open there are no earnings, no analysts and no primary market — only whoever happens to be on the other side. For sixty-one hours the price drifts on thin liquidity rather than information. Then the equity market reopens and reprices the whole thing in a handful of candles.
That reopen is where positions die. A real QQQx weekend: the price grinds sideways from 724 to 716 on about $315K of volume, then gaps straight down through 708 — the level where leveraged positions get closed out — and keeps going to 687. Nobody on the wrong side of that could do anything about it, because the market that sets the real price was shut the entire time the position was at risk.
This is structural, so a better liquidation engine does not touch it. The only thing that works is capping the downside before the weekend starts — which is what an option is.
What GAP is
A fully-collateralised options venue for tokenised stocks (NVDAx), priced and settled in one quote token (USDC), running live on Base Sepolia (chain 84532). It exists to turn the overnight and weekend gap from the thing that wipes traders out into the thing they take a position on.
Two instruments, nothing else:
UPSIDE (Kind.CALL = 0, token symbol UP-<id>) — the right to buy at the strike. The writer locks the underlying (NVDAx), so it is covered. FLOOR (Kind.PUT = 1, token symbol FLOOR-<id>) — the right to sell at the strike, a hard floor under stock you already hold. The writer locks USDC (size × strike), so it is cash-secured. Both sides are fully collateralised before the option exists. There is no margin, no health factor, and nothing to liquidate — by construction, not by policy.
What a trade actually looks like Stock closes Friday at $210. You buy the upside at a $210 strike for a $5 premium.
Monday opens at $220. The gap is worth $10, you paid $5 for the right to take it, so $5 is profit. Breakeven was $215. Monday opens at $190 instead. A leveraged long is gone. You are out five dollars — the number you agreed to on Friday, and the most that was ever at risk. Premium is Black-Scholes against the live pool price, with implied volatility the only number a maker sets.
The other half: the maker A desk holding tokenised stock into the weekend earns nothing from it. The underlying market is shut, so there is no basis to capture and nothing to do but wait for Monday. That inventory is already exposed to the gap — GAP lets it charge for the exposure it was carrying anyway.
Ship it, do not deposit it. The collateral never leaves the maker's wallet. Aqua writes a commitment; the ERC-20 moves only when a fill pulls it, inside the taker's own transaction. Sell the weekend, keep the stock. If nobody exercises, the premium is kept and the inventory is still there on Monday. Options are written just-in-time, so nothing is minted until a taker actually pays. Vol is the only dial. A two-sided maker runs a spread by shipping a higher volWad on their ask than on their bid. No separate spread parameter exists, deliberately. Both sides get what they wanted: the taker gets Monday exposure that cannot liquidate them, and the maker gets yield on inventory that was dead capital until Monday anyway.
The two properties that define it Exercise reads no oracle. A holder exercises physically and American-style, any time before expiry: on a CALL they pay the strike and take the stock; on a PUT they deliver the stock and take the strike. No published price is consulted. The holder names the price by paying the strike, so the route stays open even when the underlying market — and therefore every price feed — is closed, which is exactly when a gap product needs it.
The oracle is touched once. The Uniswap-v4 spot oracle (V4SpotOracle) is read a single time, at settlement, and only for whatever nobody exercised. Entry pricing reads spot too, but the payout path does not depend on a live feed.
An option is a plain ERC-20 — one token contract per series. It transfers and trades anywhere; the protocol does not care how a holder acquired it.
How a trade flows Maker ships cover to Aqua ──► no tokens move (just a commitment) Taker buys via the router ──► app pulls the cover JIT and mints the option ERC-20 Holder exercises ──► physical, pre-expiry, no oracle or After expiry: settle (one oracle read) ──► redeem (holder) / claim (writer)
A maker ships collateral into 1inch Aqua and posts a SwapVM order. Crucially, ship moves no tokens — it writes an allowance-like commitment against the maker's own wallet. The collateral only leaves the wallet at pull time, when a buyer actually turns up, inside a maker hook. A taker buys through the real AquaSwapVMRouter; the desk mints the option just-in-time against that collateral.
The central idea: the option is a SwapVM order There is no separate exchange. A maker's resting quote is a SwapVM order; filling that order is what writes the option. Everything a standalone options protocol would have to build — book, custody, matching, settlement, authorisation — is something Aqua already does, so it was deleted rather than written.
The order program
Deadline + Salt + RequireMinRate + Extruction(pricer, args)
args = abi.encode(uint256 seriesId, uint256 volWad, uint16 minPremiumBps, uint8 side) data = tokenA || tokenB || program (tokens sorted ascending) traits = USE_AQUA (1<<254) | PRE_TRANSFER_OUT_HOOK (1<<250) | POST_TRANSFER_IN_HOOK (1<<251)
On the Aqua path hash(order) == keccak256(abi.encode(order)) == Aqua's strategyHash, and because USE_AQUA replaces signature verification, no signature is ever read. Shipping the order on chain is the authorisation. Every parameter — series, vol, floor, side, deadline — is inside order.data, so it is covered by that hash and cannot be changed after shipping.
Three Aqua strategies, not one
shipped to legs purpose router [optionToken @ cap, quote @ 0] the ask — a permanent cumulative cap on everything that order can sell router [quote @ budget, optionToken @ 0] the bid — the budget the desk can spend buying options back app [underlying @ cover, quote @ cash] the desk's own collateral, for the just-in-time write Both legs of every pair must be shipped: Aqua.safeBalances reverts unless both tokens belong to an active strategy. Aqua.ship is immutable, so a shipped amount is a permanent cap and re-offering after exhaustion needs a new salt, which hashes to a new strategy.
Pricing runs inside the fill AquaOpcodes carries no WAD transcendental math, so full Abramowitz-Stegun Black-Scholes lives in WeekendPricer, reached through the Extruction interface the opcode set already exposes for maker-chosen logic. It is implemented view, so quote mode and swap mode cannot diverge, and every dependency is immutable — the target address is baked into the order bytes, so a maker cannot repoint pricing after shipping.
Inside one call the pricer does three things:
Gates direction. AquaOpcodes has no LimitSwap, so nothing validates swap direction for free. An ask accumulates quote balance in the maker's Aqua counter, and without this gate that growing counter would be a standing allowance for anyone to fill the reverse direction — selling options back at the maker's own ask price. Each order declares its side and any mismatched fill is refused. Fills the missing amount register — whichever leg the taker did not name — rounding so it always favours the maker. Enforces the premium floor, ask side only. normalCdf returns exactly 0 beyond −8 sigma, so a far-enough strike prices at exactly 0 and a no-op taker would take the maker's whole shipped cover for gas. The fill, step by step taker ── router.swap ──▶ AquaSwapVMRouter ├─ runs the program; Extruction calls WeekendPricer │ └─ WeekendPricer reads Uniswap v4 spot (StateView.getSlot0) ├─ preTransferOut ─▶ WeekendDesk │ └─ mints the shortfall via WeekendOptions.buyOption │ ├─ Aqua.pull collateral : maker → protocol │ └─ Aqua.push premium : taker → maker └─ postTransferIn ─▶ WeekendDesk (bid side: close the short)
Just-in-time writing. The desk carries no option inventory at rest. preTransferOut spends whatever it does happen to hold (picked up on the bid side) and mints only the shortfall against shipped cover, and AQUA.pull then moves tokens that did not exist one call earlier — possible only because pull is a real transferFrom. Minting never credits the Aqua ledger, so the shipped option leg stays the cumulative cap.
The desk buys from itself. The core has no writeFor: the only write path is buyOption, which pulls collateral through Aqua and demands an IGapOptionCallback premium push. So the desk ships that third strategy and is both maker and taker of its own write — the premium leg is a desk→desk transfer that nets to zero.
Two bounds, both cumulative. The Aqua ledger caps what an order can ever sell; maxShort[seriesId] caps the desk's position and is checked after each write against cumulative written[id][desk], so many small fills cannot walk past it.
Transfer ordering is the taker's choice. IS_FIRST_TRANSFER_FROM_TAKER is a taker trait, so preTransferOut may run before or after postTransferIn for the same fill. No hook reads a balance that only exists once the counter-leg has landed; both orderings are tested to produce identical end state.
Settlement Exercise reads no oracle. Physical and American: pay the strike and take the stock, or deliver the stock and take the strike. The holder names the price by paying it, so the route stays open when the underlying market — and therefore every price feed — is shut. That is precisely when a gap product needs it.
The oracle is touched once, after expiry, only for whatever nobody exercised. settle snapshots the whole payout split — price, supply, total written, and the holder/writer share of each pool leg — and every payout afterwards is pro-rata against those snapshots, never the live pools, which go stale the instant settled flips. redeemFor and claimFor are permissionless, so a keeper can pay everyone out and nobody has to click anything.
Contracts WeekendOptions.sol series registry, pooled collateral, buyOption / exercise / close / settle / redeem / claim. Extends AquaApp. OptionToken.sol one ERC-20 per series, minted on buy, burned on exercise or redeem desk/WeekendDesk.sol the maker — IMakerHooks, just-in-time writing, short caps, ship/dock desk/WeekendPricer.sol Extruction target — Black-Scholes, direction gate, premium floor oracle/V4SpotOracle.sol IPriceOracle off Uniswap v4 StateView.getSlot0 oracle/PythSettlementOracle.sol drop-in IPriceOracle: settlement is the mean of every Pyth-signed sample in a window after expiry, so no single sample decides it WeekendTaker.sol stateless helper so an EOA can hit buyOption directly (it needs an IGapOptionCallback caller) Solidity 0.8.30. SwapVM needs viaIR + prague, so the integration tests get their own Foundry profile.
Frontend Vite + React 19 + wagmi/viem. No backend and no indexer — every value is a chain read or a log scan.
The SwapVM order encoder is reimplemented in TypeScript, byte-reconciled against OrderLib.sol, and every fill is gated: the rebuilt order must satisfy router.hash(order) == the shipped strategyHash or the trade is refused before sending. Buys are exact-out. The pricer derives whichever leg the taker did not name, so an exact-in buy of "premium + slack" silently returns extra options; naming the option count makes the number on the ticket the number that lands. Depth is the real ceiling, computed from all three bounds — the Aqua ledger, the short cap, and the cover the desk can actually back — not from any single contract view. Every write previews itself before a wallet opens: what you pay, what you receive, what you hold, how many prompts to expect, and the action blocked outright if the balance cannot cover it. What the integration suite pins down: the first maker-hooks-plus-Aqua fill both transfer orderings producing identical state, with a guard test reading real Transfer logs to prove the orderings actually differ; the Aqua ledger binding cumulatively mid-transaction; a repointed pricer invalidating the order before any opcode runs; and the cash-secured PUT running the same router path, where the quote token is collateral and premium at once.
The full lifecycle — buy, sell-back, exercise, settle, redeem, claim — is proven on chain with exact conservation.

