Changelog

Changelog

Every change to Subrosa, newest first. This page is built from the CHANGELOG.md file in the source repository.

All notable changes. No release has been tagged and nothing is deployed. Dates are commit dates. Format: a section per milestone, newest first.

Unreleased

No region limits (D67)

  • No country is blocked anywhere. The region service (app/src/region/, app/env/region.env.example), the SDK country list (sdk/src/geofence.ts), the relayer and enclave region checks, the web app's region notices and VITE_REGION_URL are removed. New accounts, agent keys, mandates, funding and trading are open from every country; exit, statements and status are unchanged.
  • The relayer's front-proxy list for its request budgets is now RELAYER_TRUSTED_PROXIES; a leftover REGION_* key is refused at boot. The enclave reads no proxy or country setting, and its compose file forwards none (image re-pinned).

Elysium port

Subrosa moved from its earlier target chain to Elysium (an Arbitrum Orbit L2 on HyperEVM: chain 99901, testnet 99801). Gas is HYPE and the vault's money is bridged USDC.

  • Chains: the web app, SDK, relayer, deploy, exit, fork and testnet scripts target 99901 and 99801 only; the old chains, their listings, tokens and deployment records are gone from the code (the records are kept privately).
  • Venues: Hyperliquid only (core perps and the HIP-3 dexes, the Kinetiq dex included). The other venues, their gateways and the vault's margin route were removed (D48), and the registry no longer keeps a venue list.
  • Prices: assets are priced through a named price source. The old feed-based prices, stock closed-window and sequencer-restart rules were retired with the chain. W1 lists USDC alone at a fixed $1, so vault swaps stay off until a real price source is listed through the timelock. Exits are unaffected.
  • Contracts: a store-only HyperCore binding on the vault (bindHyperCoreAccount, cleared by a revoke) and its signed form on the factory (D47). The vault can return HYPE that reached it (withdrawEth).
  • Relayer: HYPE runway and top-up metrics, the bind relay, gas caps that ignore the L1 data charge, and a re-estimate right before each send. Its default self-submit guide is scripts/exit/README.md.
  • Exit: exit.sh covers the vault and every Hyperliquid balance (spot, each dex, vault HYPE), burns the signing nonce after a direct revoke, warns when --to is a contract, and --forced-inclusion prints the route around the Elysium sequencer. Moving funds from Elysium back to HyperEVM over the canonical bridge takes about 24 hours.
  • Deploy: Elysium configs, a USDC-only W1 listing, owner-Safe checks (no module, guard or unknown code) and a doctor that reads the wallet set; testnet uses a stand-in USDC.
  • Monitoring: the watcher alerts when the relayer's HYPE balance runs low or empty.
  • Docs: SECURITY.md gains the forced-inclusion route, the keeper and registrar keys and one security contact (private vulnerability reporting); THIRD_PARTY.md lists the IPyth interface.

Changed (contracts, before any deployment)

  • SubscriptionRouter: pay takes a fourth argument, the most the payer agrees to pay (OverMax above it). The signed-payment nonce now also binds the plan's period length. The owner can send out tokens that reached the router by mistake (rescue).
  • ReceiptBoard: the book admin can stop the reporter at once (freeze); posting resumes when a rotation lands. The rotation delay is capped at 30 days and a queued rotation can be cancelled.
  • AgentRegistry: a queued change expires 14 days after its eta; queued assets, adapters and venues can be cancelled on their own; contradictory listings are refused. Stock prices are refused inside a weekly closed window and feed prices wait out a sequencer restart (both set through the timelock, both off until set). valueUsd6 rounds up.
  • AgentVault: the day cap counts a rolling 24 hours (3-hour buckets) instead of a UTC day; dayIndex is gone and dayUsedUsd6() reports the rolling figure. The slippage bound an owner can set is capped at 5%. New named errors OverReturn and ApproveFailed. The owner can take out ETH that reached the vault address (withdrawEth).
  • AgentVaultFactory: setPolicyBySig, invalidateNonce, ERC-1271 signatures for contract owners, ERC-5267 eip712Domain().
  • Gateways: the constructor takes the vault factory, and only vaults that factory opened may deposit. Tokens sent to a gateway by mistake can be moved to the registry owner by anyone (rescue).

Changed (enclave)

  • The runner's day budget follows the vault's rolling day cap: new risk is booked in 3-hour buckets and counted over the current bucket and the 8 before it, so room returns 24 to 27 hours after it was used, not at 00:00 UTC. Closing and reduce-only orders are not held back by it.

Changed (deploy scripts)

  • deploy.sh can be resumed: when a broadcast stops part-way, the contracts that landed are recorded in deployments/<chain>.partial.json and the next run sends only the rest. Each config file names its chain (chainId) and the deploy stops on any other. Chain 99901 is deployed only from a clean tree. blocks holds the block of each creation receipt. After a broadcast to 99901 the sources are published to Sourcify.
  • queue-listings.sh checks its gates instead of trusting text: the token's symbol() must equal the listing's, and an adapter's forkProof names a forge test that is run against the chain and must pass.

Added

  • Enclave admission redesign, last part (seats on the wire). The web app and the SDK speak the seat contract: a master with a seat sends x-subrosa-mac over subrosa-req-v2, method, path, body hash, timestamp and epoch, with x-subrosa-epoch, and no signature; a master with no seat signs its two agents calls and nothing else. /agents answers a ticket and stores nothing; /agents/active takes {ticket, signature, reqKey} (the request key moved here and is required). A 401 stale_ts carries the enclave's time, epoch and floor, and the client sends the call once more. SDK: requestMacMessage, newcomerSignMessage, REQUEST_EPOCH_UNKNOWN.
  • Web: the Status and Agents pages say the service's state in plain words (a place held, none yet, full, holding back new accounts, not reachable), each with the sentence that Exit does not depend on it.
  • Enclave bound test at 10,000 seats: heap per seat and recoveries a minute are now measured next to open() time, sealed size and the brake under the newcomer burst. SECURITY.md risk 11 and limits.ts carry the measured numbers.
  • Enclave: a bad Arcus accountIndex at /agents is refused 400 before anything is counted, stored or sealed, and the vault refuses it too (IND9-1, rescore 9). Before, the value was sealed into the pending record first.
  • Enclave on the dstack simulator: reproducible image build (scripts/enclave/build.sh), app/app-compose.json (the file dstack measures), the simulator built from the dstack source at a pinned commit, scripts/enclave/attest-check.sh (recomputes the expected measurement and compares it with a quote) and scripts/enclave/smoke.sh. README section "Run the enclave on the simulator".
  • Public CI workflow (.github/workflows/ci.yml): Foundry tests, SDK, app and web suites, slither, semgrep and gitleaks over the full history. Actions are pinned by full commit SHA and the token has read-only contents permission. scripts/ci-local.sh runs the same steps on a developer machine.
  • README.md section "Deploy from a fresh clone", INVARIANTS.md (each invariant linked to its test), AUDIT-SCOPE.md (file list for a reviewer), THIRD_PARTY.md (provenance of the helper code), this changelog.
  • .gitleaks.toml: exact-value allowlist for public token addresses in listings and recorded quote fixtures.

Changed

  • Enclave admission, keys and vault state were redesigned around seats (replaces the request-key slots, the slow lane, rate tables keyed by address, the pending-request store, the used-address lists and their sweeps; none of these exist any more). A master gets a seat when a venue accepts its agent approval. One lookup then decides everything: an owner is authenticated by a MAC under its own request key and reads only its own seat; a master with no seat can call the two agents routes, paid from one global bucket, and stores nothing. Agent keys are derived from the enclave root for (master, venue, time) and are never stored; an address cannot be activated twice because a seat only moves forward in time. Request bodies go through one closed schema, and each sealed record has a byte cap enforced by its writer. Seat capacity is one operator setting (ENCLAVE_SEATS_MAX, default 10,000) with alerts; while full, a reaper frees seats whose venue accounts hold under 10 USD. There is no migration: the new build refuses to start on the old sealed layout and names the files. rhc-spot yields no seat. Bounds, with measured numbers, are in app/src/enclave/limits.ts (including the "Complexity audit" of every loop a request can reach) and SECURITY.md accepted risk 11; the properties are checked by app/test/enclave/admission-model.ts.
  • The replay ring of a seat is one fixed 768-byte array (it was a list of strings, about 5 KB a seat when full).
  • app/compose.yaml names the enclave image by digest and no longer builds it; app/Dockerfile pins its base image by digest and installs with --ignore-scripts.
  • Exact version pins for viem, hono, zod and postgres; lockfiles regenerated.
  • Bun is pinned to 1.4.4 through packageManager and engines in each package manifest.
  • Every bunfig.toml sets minimumReleaseAge to 7 days.
  • Provenance header comments on the in-house ECDSA, SafeTransferLib, EIP712, Owned2Step and TestBase files (comments only).

Fixed (hardening rounds before this file existed)

  • Many fixes to the enclave runner and mandate policy, relayer, exit tools, region check, prices and venue reads, each with a regression test. See git log for the individual commits.

Initial build (2026-11-11 and 2026-11-12)

  • Contracts: AgentVault, AgentVaultFactory, AgentRegistry (timelocked additions, instant removals), SubscriptionRouter (flat USDG plans, 80/10/5/5 split), ReceiptBoard, Uniswap v3 and v4, 0x and LI.FI adapters, Arcus and Lighter gateways; unit, fuzz, invariant and fork suites.
  • Owner scripts: deploy, queue-listings and apply-listings (dry run unless armed), and exit tools that withdraw with no website, relayer or enclave running.
  • SDK: derivation, policy, hashing, receipts, geofence, Hyperliquid and Arcus helpers.
  • Services: enclave runner, relayer with an exit-first lane, statements, Telegram bot (read-only status), region check, keyless price feed that fails closed for new risk.
  • Web: mandate setup, status, statements, always-visible exit; phone-size Playwright tests.
  • README, SECURITY.md, MIT licence and the pre-commit privacy guard.