# Flux Point Studios Docs

Welcome to the official documentation for Flux Point Studios products and protocols.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><a href="/aegis/aegis">Aegis</a><br>Parametric cover for Cardano, sold from a multi-underwriter book. Running on preprod</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FymmDxTnHieyMUhIjrGve%2Flogo.png?alt=media&amp;token=0298ecef-2924-4aab-8a23-97201defb4e1">logo.png</a></td></tr><tr><td><a href="/materios-partner-chain/materios">Materios Partner Chain</a><br>Substrate-based partner chain for certified data anchoring and AI verification, secured by MATRA — its native network token</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FymmDxTnHieyMUhIjrGve%2Flogo.png?alt=media&amp;token=0298ecef-2924-4aab-8a23-97201defb4e1">logo.png</a></td></tr><tr><td><a href="/materios-partner-chain/cmatra-token-merger">cMATRA Token Merger</a><br>Trade 7 legacy assets for cMATRA — the Cardano-side form of the Materios network token</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FymmDxTnHieyMUhIjrGve%2Flogo.png?alt=media&amp;token=0298ecef-2924-4aab-8a23-97201defb4e1">logo.png</a></td></tr><tr><td><a href="/saturnswap/saturnswap">SaturnSwap</a><br>Cardano-native order-book DEX with cross-chain routing and an AI trading assistant</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FymmDxTnHieyMUhIjrGve%2Flogo.png?alt=media&amp;token=0298ecef-2924-4aab-8a23-97201defb4e1">logo.png</a></td></tr><tr><td><a href="/orynq/proof-of-inference">Orynq — Verifiable AI</a><br>Cryptographic receipts for AI behavior, certified on Materios and anchored to Cardano</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FymmDxTnHieyMUhIjrGve%2Flogo.png?alt=media&amp;token=0298ecef-2924-4aab-8a23-97201defb4e1">logo.png</a></td></tr><tr><td><a href="/products/adam-litepaper">ADAM Litepaper</a><br>Autonomous Decentralized Asset Manager</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FqQnNTIuoEfgAG8VIHB6V%2FADAM.png?alt=media&amp;token=2378df6c-11cf-47fe-a9de-06e960dfe0ba">ADAM.png</a></td></tr><tr><td><a href="/products/t-backend-developer-guide">T-Backend</a><br>AI assistant platform developer guide</td><td><a href="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FfM87b9HJshYOxZyFGwFo%2Fagent_t_pfp.png?alt=media&amp;token=016e0be5-f784-4e38-9ad3-d32d1030b28d">agent_t_pfp.png</a></td></tr><tr><td><a href="/products/cardano-ue-sdk">Cardano UE SDK</a><br>Unreal Engine integration for Cardano blockchain</td><td><a href="https://bairesdev.mo.cloudinary.net/blog/2022/08/ue-logo-1400x788-1400x788-8f185e1e3635-1.jpg?tx=w_1920,q_auto">https://bairesdev.mo.cloudinary.net/blog/2022/08/ue-logo-1400x788-1400x788-8f185e1e3635-1.jpg?tx=w_1920,q_auto</a></td></tr></tbody></table>

## Quick Links

* [**Aegis**](/aegis/aegis) - Parametric cover from the Sovereign Book, on preprod. See the [on-chain proof](/aegis/preprod-proof)
* [**Materios Partner Chain**](/materios-partner-chain/materios) - The blockchain behind MATRA: consensus, nodes, SPO onboarding, roadmap
* [**cMATRA Token Merger**](/materios-partner-chain/cmatra-token-merger) - Surrender legacy assets for the Materios network token — window closes November 28, 2026
* [**SaturnSwap**](/saturnswap/saturnswap) - Cardano-native order-book DEX
* [**Orynq**](/orynq/proof-of-inference) - Verifiable AI: attested receipts anchored via Materios to Cardano
* [**Orynq SDK**](/orynq/orynq-sdk) - Anchor AI process traces
* [**ADAM Litepaper**](/products/adam-litepaper) - Decentralized asset management

## Community

* **Website**: [fluxpointstudios.com](https://fluxpointstudios.com)
* **Discord**: [discord.gg/MfYUMnfrJM](https://discord.gg/MfYUMnfrJM)
* **Twitter**: [@fluxpointstudio](https://twitter.com/fluxpointstudio)
* **GitHub**: [github.com/Flux-Point-Studios](https://github.com/Flux-Point-Studios)


# Overview

Aegis is parametric cover on Cardano, sold from the Sovereign Book. Status, what it does and where it runs today.

Aegis is **parametric cover on Cardano**. A buyer pays a premium and receives a fixed payout if a signed price reading reaches the strike during the term. Underwriters post standing offers from their own stake credentials, and each sale moves the full coverage amount into the position's own UTxOs. Settlement is decided by Aiken validators and a reading they check themselves. Anyone can submit a claim, and it pays only the buyer.

The current product is the **Sovereign Book**. It runs on Cardano preprod with test ADA.

## Status

| Network             | State                                                                                                                                                                                                                                                                   |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Preprod             | The Sovereign Book is deployed and has sold Barrier cover on ADA and Depeg cover on USDC. Sales, buyer cancels, signed price bundles, relay marks and a SaturnSwap swap sold with its cover in one transaction are on chain. See [Preprod Proof](/aegis/preprod-proof). |
| Preprod, still open | No Claim and no Expire have landed. The earliest Expire is after 2026-11-15 20:45 UTC. A Claim waits on a real market fall through a sold strike.                                                                                                                       |
| Mainnet             | New cover sales have been paused since 2026-09-04 for the move to the Book. The prior vault generation remains deployed, and its liquidity providers can withdraw.                                                                                                      |
| Audit               | This generation has not been independently audited. An audit is planned before any mainnet launch of the Book.                                                                                                                                                          |

Preprod custody is deliberately relaxed for this stage, and signer hardening follows. Nothing on preprod carries real value.

## What the Book does

* **Barrier cover** on ADA, BTC and ETH pays if the price reaches a strike at least 15% under the lower of the current reading and its trailing low.
* **Depeg cover** on USDC pays if the feed falls to a strike between 50% and 95% of the $1 peg. It can be sold only while the peg reads at 99% or better.
* **Underwriting** is posting an offer: your capital, your price sheet, your limits. The capital stays under your stake credential while it waits and while it backs a position, so it keeps earning staking rewards and keeps its delegation.

Terms run at least 7 days. The reference price sheets on preprod sell 7 to 45 days. Each position can draw on up to 20 offers.

## How a sale works

```
 Underwriters                     Buyer (CIP-30 wallet)
   offers at the book script        |  signs
   each under its own stake         v
        |                     +--------------+     reference inputs:
        +-------------------> |  sale tx     | <-- price sheets, the feed
                              +--------------+     through the observer
                                |    |     |
                 P-leg: policy  |    |     |  fee output
                 C-legs: one per offer, each holding exactly its coverage
```

1. The relay allocates the sale across admitted offers, cheapest first, and marks the body it presents.
2. The buyer signs. The position script checks every offer the sale spends against that offer's own terms and price sheet.
3. Each contributing offer moves into a C-leg that holds exactly its share of the coverage and keeps its owner's stake credential. Any remainder of the offer goes back to the book.
4. The position ends one of three ways: a Claim pays the buyer the coverage, an Expire returns each leg to its owner, or a buyer cancel in the first 30 minutes refunds 90% of the premium.

The full rules are in [How Aegis Works On-Chain](/aegis/architecture). The roles are in [Who Participates](/aegis/marketplace).

## Design properties

* **Fully funded at sale.** A position holds its whole coverage from the moment it is sold. There is no shared pool to run short, and one underwriter's position cannot draw on another's capital.
* **Parametric.** A payout depends on the strike and term pinned at sale and on a fresh signed reading. No person adjudicates a claim.
* **Underwriters set their own terms.** An offer names its feeds, depths, terms, fill sizes, price sheet and expiry. An agent the owner names can only send the offer home or narrow its terms.
* **Permissionless settlement.** Anyone can submit a Claim or an Expire. The hosted keeper does so as a service, and it cannot change who gets paid.

## Fees

This generation sends at least 1% of the premium to one fixed address set at deployment, enforced by the position script at sale. A buyer cancel does not return it. On preprod, the output also has to meet the ledger's minimum UTxO, which is why the sales on the proof page show about 1.14 tADA.

This generation makes no Cardano Treasury donation, and its feed table is a compiled script parameter, so adding an asset means a new generation. A Cardano Treasury share and a governed asset allowlist are next-generation work.

## Integrations

| Integration                      | State                                                                                                                                                                                                                                                                 |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SaturnSwap swap-plus-insure      | Live on preprod. One transaction fills a SaturnSwap V3 order and sells USDC Depeg cover from the Book, signed in a mobile wallet. See [The Depeg sales](/aegis/preprod-proof#the-depeg-sales). The SaturnSwap interface for it is not yet on SaturnSwap's public site |
| FluidTokens V4 liquidation cover | In progress. The RH1 event slot is on the preprod table, and the publisher does not serve it yet, so no event cover is sold                                                                                                                                           |
| Indigo                           | Sold on the prior generation, not yet relaunched on the Book                                                                                                                                                                                                          |
| Liqwid                           | Planned as the first money market for the rehypothecation waterfall, in a later Book generation. Design stage: nothing is built or live                                                                                                                               |
| Surf                             | Surf's services relaunched in November 2026. Re-integration against the Book to follow, with no date set                                                                                                                                                              |

The published TypeScript SDK, [`@fluxpointstudios/aegis-sdk`](https://www.npmjs.com/package/@fluxpointstudios/aegis-sdk), targets the prior generation. Its re-cut against the Book is part of the SaturnSwap work.

## Earlier generations

Aegis began as a single shared pool with `aLP` tokens (V4 to V7), then moved to a stable vault with M-of-N registry governance and a 72-hour timelock (V8). Both funded cover from pooled capital. The Book replaces pooled underwriting: capital stays with the underwriter that posted it, and each position is funded separately. The prior vault is summarised in [How Aegis Works On-Chain](/aegis/architecture#earlier-generations).

Aegis has no token.


# How Aegis Works On-Chain

The on-chain rules of the Sovereign Book. Offers, sales, positions, settlement, the price reading, the relay and the signers.

This page describes the generation running on Cardano preprod. Every rule below is taken from the validators and off-chain code of that generation, which has had no independent audit yet. Prices are scaled by 1,000,000 on chain.

## 1. Scripts

| Script   | Purpose                                                 | Hash or policy on preprod                                                                                   |
| -------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| Book     | Holds standing offers                                   | [`83af823b…`](https://preprod.cexplorer.io/script/83af823bcb1999895f99c958510a011f26f02ed06ff17d8a17c16fab) |
| Position | Holds lane Heads and positions, and mints their markers | [`5a010322…`](https://preprod.cexplorer.io/script/5a0103220a367738ba0b180a465fe08756490b921aab4e0a0b46b5aa) |
| Lanes    | One-shot policy of the 4 lane Heads                     | [`5a39f046…`](https://preprod.cexplorer.io/policy/5a39f04603f9308c787840eb0909404196ea1de77dccfe0bbfd37fd9) |
| Observer | Withdraw script that attests the genuine reading        | [`db93795e…`](https://preprod.cexplorer.io/script/db93795e9baefe4fd47185d209d7d845025bb24d4bf14cd298c42e2e) |

A sale spends one Head and returns it unchanged, so lanes bound concurrency: two sales on one lane race at the ledger, and the loser retries on the next output. The Head's Underwrite is the one coordinator of a sale. A position's P-leg is the one coordinator of its settlement. Every other spend proves only that its coordinator runs in the same transaction.

## 2. Offers

An offer is a UTxO at the book script, under the owner's own stake credential. It holds only lovelace and carries this datum:

```aiken
type OfferDatum {
  owner:         VerificationKeyHash,
  manager:       Option<VerificationKeyHash>,  // the offer's agent
  approval:      Bool,                         // the agent witnesses every Fill
  feeds:         List<ByteArray>,
  classes:       Int,                          // bitmask: 1 Barrier, 2 Depeg
  sheet:         ByteArray,                    // blake2b_256 of the price sheet
  load_bps:      Int,                          // scales the sheet's rate
  min_depth_bps: Int,
  max_depth_bps: Int,
  min_term_ms:   Int,
  max_term_ms:   Int,
  min_fill:      Int,
  max_fill:      Int,
  expires_at:    Int,
}
```

| Action   | Who              | Rule                                                                                                                                                                             |
| -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Fill     | A sale           | A Head is spent beside the offer. The Head's walk judges the offer. An approval-mode offer also needs its agent's signature.                                                     |
| Cancel   | Owner            | The owner's signature.                                                                                                                                                           |
| Reprice  | Owner or agent   | Re-parks the whole offer at its own address under terms that only narrow: same owner, agent, approval mode and sheet, load no lower, expiry no later, ranges and feeds no wider. |
| Withdraw | Agent            | Returns the whole value to the owner's key under the offer's own stake credential, tagged with the offer's out-ref.                                                              |
| Withdraw | Quorum of 2 of 3 | The same return, short by at most 0.6 tADA to pay the batch's fee. The transaction may contain nothing except returns.                                                           |

The agent and the quorum can only send an offer home.

### Price sheets

A sheet is a packed table of 11-byte cells: a class tag (0 Barrier, 1 Depeg), then five big-endian u16 values for minimum depth, maximum depth, minimum term in days, maximum term in days and rate in basis points. It sits as the inline datum of a reference input, and an offer pins it by hash. The leg's premium must satisfy:

```
premium × 100,000,000 ≥ coverage × rate × (10,000 + load_bps)
```

Preprod's reference sheets are test pricing and belong to no market maker. Their outputs sit at a test account, and a script lock for them follows.

## 3. A sale

A sale's Underwrite requires all of the following.

**Position shape**

* One P-leg and between 1 and 20 C-legs, with C-leg coverage summing to the policy's coverage and leg premiums summing to its premium.
* The buyer named as `insured` signs.
* The payout address, if any, belongs to the insured.
* The transaction's validity span is at most 20 minutes, and the start time is at or after its upper bound.

**Price and strike**

* The feed and class are on the position script's compiled table.
* The reading is at most 10 minutes (Barrier) or 5 minutes (Depeg) old at the start time.
* The strike is under the reading's trailing low.
* Barrier: the strike is at least 15% under the lower of the spot and the trailing low.
* Depeg: the strike is between 50% and 95% of the peg, and the lower of the spot and the trailing low reads at least 99% of the peg. Those two rules together leave at least 4.04% of distance.

**Term and premium**

* The term is at least 7 days and at most 180 days. The reference sheets sell up to 45 days.
* The total premium is at least 2 tADA and at least 2% of coverage.
* Each leg covers at least 2 tADA and pays at least 1 tADA, at least 2% of its coverage, and its pro-rata share of the minimum premium. Each leg's premium stays under its coverage.

**Each offer spent**

* It holds only lovelace and no reference script.
* Its leg sits at the position script under the offer's own stake credential, with the offer's owner and out-ref in the leg datum.
* The fill is inside `min_fill` and `max_fill`.
* The feed, class, depth and term are inside the offer's limits and inside the named sheet cell.
* The premium meets the sheet's ask.
* The sale's upper bound is at or before the offer's expiry.
* Any remainder re-parks at the same address under the same datum.

**Fee**

* One output pays the fixed fee address at least 1% of the premium, with the position's digest as its inline datum.

An offer funds its leg with coverage less premium, and the buyer supplies the rest. A C-leg therefore holds exactly its coverage, and the premium is already inside it.

## 4. Settlement

Every settlement spends the P-leg and every C-leg of one position, burns the whole marker set and mints nothing else. The only withdrawal allowed beside it is the observer's. No other script input can run in the transaction, so no foreign script can count a payout as its own.

The validators place no rule on the P-leg's own deposit of about 2.1 tADA, which the buyer funded at sale. Whoever submits the settlement can take it as change.

### Claim

Anyone can submit a Claim. It needs no signature from the buyer.

* With a trailing low on the reading, the low is at or under the strike and was observed inside `[start, expiry]`.
* Without one, the spot is at or under the strike and was observed inside `[start, expiry]`.
* The reading is fresh for the transaction: the validity range sits between its observation and its `valid_until`, and that validity is at most 2 hours.
* The transaction's lower bound is at least 1 hour after the start.
* The payout address receives at least the full coverage.

The trailing low lets a fall late in the term stay claimable after expiry, for as long as a fresh reading still reports it. Its window is 46 hours.

### Expire

Anyone can submit an Expire once the transaction's lower bound is past expiry plus a 48-hour claim grace, which is the 46-hour low window plus the 2-hour reading validity. Each leg's full value returns to its owner's key under the leg's stake credential. The premium is the underwriter's return.

### Buyer cancel

The insured signs within 30 minutes of the start. The reading used must have its spot above the strike, and its trailing low, if it carries one, above the strike too. The buyer receives 90% of the premium, summed across legs. Each owner receives the leg less its refund. The fee stays paid. The window closes before the 1-hour claim wait opens.

## 5. The price reading

A position settles only against its own feed, read through the observer's withdrawal. The observer attests that the reading is genuine, and the freshness rules stay in the position script. This generation pins the AegisSelf feed and sets no second feed on a position.

The Book's preprod table:

| Feed     | Class               | Policy                                                                                                      |
| -------- | ------------------- | ----------------------------------------------------------------------------------------------------------- |
| ADA/USD  | Barrier             | [`e9470982…`](https://preprod.cexplorer.io/policy/e9470982835ad4b077c615a3b32710a44a14b8f1af3e5ad106401362) |
| BTC/USD  | Barrier             | [`1b1a6de9…`](https://preprod.cexplorer.io/policy/1b1a6de944240a9f95e6cf80fe77266d91c7034a8e34009c112dc08e) |
| ETH/USD  | Barrier             | [`8ceb3301…`](https://preprod.cexplorer.io/policy/8ceb33011ce19fdc4e743a1bb9e5b42180ed706c263fcb0ea7fa0347) |
| USDC/USD | Depeg               | [`7902d589…`](https://preprod.cexplorer.io/policy/7902d589349c3fa80c0868d3e908179072225e7fe3a58531b28e0f02) |
| RH1/EVT  | Barrier, event slot | [`8ef4aca7…`](https://preprod.cexplorer.io/policy/8ef4aca72f671b5c81cc556594be31215be4ed284a90d021ae19b158) |

The publisher signs price bundles through its signing core. Before signing, the core's policy requires:

* a quorum of at least two exchange sources, no older than 5 seconds;
* a datum whose price, time and 4,200-second validity match that reference;
* a trailing low it can find in the observer's history, where samples are Pyth-signed and anchored on chain under metadata label 8746.

The publisher does not yet serve RH1. The slot is on the table, and no event cover is on sale.

## 6. The relay

The relay is off-chain and allocates a sale across offers. It ranks admitted offers by price, then by when they were posted, then by out-ref, and searches for the lowest all-in cost. Each body it presents leaves the buyer at least 120 seconds to sign and carries a mark at metadata label 1986: the allocation log entry's hash and the mark key's signature over that hash and the body.

The validators do not read the mark. It is evidence of which allocation produced a sale. The relay stops allocating when a halt slot is set.

## 7. Signers

Hosted roles sign through two signer stacks, which hold the keys for the operations below. The observer's anchor carrier is separate and pays from its own fee account, which is not one of these keys.

| Core      | Operation                | What it signs                    |
| --------- | ------------------------ | -------------------------------- |
| Publisher | `publisher.price_bundle` | Feed updates                     |
| Value     | `relay.mark`             | The relay's sale mark            |
| Value     | `keeper.g2.settle`       | Claims and Expires               |
| Value     | `maker.agent`            | An offer's Withdraw as its agent |
| Value     | `maker.float`            | The maker's fee input and posts  |

Each stack runs three separate processes:

* The **core** holds keys and reaches chain providers.
* The **policy worker** has neither keys nor network, and it evaluates a per-operation policy.
* The **broker** holds no keys and takes authenticated requests.

The core authenticates each caller against its registered operations, reads original chain data from two pinned providers, and signs only the payload it derived itself. It enforces per-transaction and daily caps and keeps a hash-linked audit log.

This is a preprod setup. Both stacks currently share one host and custody is relaxed, so the first-use key ceremony and hardware custody follow later. Which operations have landed on chain is on the [proof page](/aegis/preprod-proof#signer-operations).

## 8. Constants

| Constant                  | Value             |
| ------------------------- | ----------------- |
| Minimum term              | 7 days            |
| Maximum term              | 180 days          |
| Barrier minimum depth     | 15%               |
| Depeg strike band         | 50% to 95% of peg |
| Depeg minimum spot        | 99% of peg        |
| Claim wait after start    | 1 hour            |
| Buyer cancel window       | 30 minutes        |
| Buyer cancel refund       | 90% of premium    |
| Trailing low window       | 46 hours          |
| Maximum reading validity  | 2 hours           |
| Claim grace before Expire | 48 hours          |
| Maximum legs              | 20                |
| Minimum leg premium       | 1 tADA            |
| Minimum premium           | 2 tADA            |
| Premium floor             | 2% of coverage    |
| Preprod fee               | 1% of premium     |

## Earlier generations

These are history and describe no part of the Book.

* **V4 to V7.** A single shared pool UTxO held underwriter capital, with transferable `aLP` tokens and a per-policy marker token. Policies could name one of several oracle providers.
* **V8.** A stable vault replaced the pool, with derived accounting and M-of-N registry governance behind a 72-hour timelock. Builders were non-custodial: users signed every action. This is the generation deployed on mainnet, where new sales have been paused since 2026-09-04 and liquidity providers can withdraw.

Source for those generations is in [aegis-contracts](https://github.com/Flux-Point-Studios/aegis-contracts). That repository does not yet carry the Book's validators.


# Who Participates

Who takes part in the Sovereign Book, what each role pays and earns, and what each role can and cannot do.

The Sovereign Book has two sides that exchange risk, and a set of services that keep it running. No service can move an underwriter's capital anywhere except home, and none can redirect a payout.

## Buyers

A buyer pays a premium for a fixed payout if a price reaches a strike during the term.

* **Pays:** the premium, the fee, the transaction fee and a deposit of about 2.1 tADA in the P-leg. Whoever submits the settlement can take that deposit as change.
* **Receives:** the full coverage on a Claim, sent to the buyer's own address.
* **Can:** cancel within 30 minutes of the start for 90% of the premium, while the reading is out of the money.
* **Risks:** the term ends with no trigger and the premium is spent. A Claim also needs a fresh reading that shows the trigger, and the claim wait of 1 hour must have passed.

The contract does not check whether the buyer holds a loan or the asset. A borrower can use a Barrier position as liquidation protection by choosing a strike above the liquidation price, and anyone else can hold the same position as a synthetic put.

## Underwriters

An underwriter posts offers at the book script under their own stake credential.

* **Puts up:** ADA, up to the offer's capital. A position locks only what it fills.
* **Earns:** the premium on each position that expires, 10% of the premium on a cancelled position, and staking rewards. The capital stays under the underwriter's stake credential both as an offer and as a leg, so it keeps its delegation.
* **Controls:** feeds, classes, depth and term ranges, fill sizes, price sheet, load and expiry. The owner can cancel an unfilled offer at any time.
* **Risks:** a leg pays out in full if its position triggers. A leg is locked until its position settles, which for an unclaimed position is 48 hours after expiry.

Capital is not pooled. Each leg backs one position, and a loss on one underwriter's leg cannot reach another underwriter.

## Agents and the hosted maker

An offer can name an agent. The agent can withdraw the offer to its owner or narrow its terms, and in approval mode it must witness every fill. It cannot take the capital or widen the terms.

The hosted maker is one such agent. It reads the offers that name its agent key, and under a halt it sends them home, its clients' offers first. It pays its own transaction fees from a separate float.

## The relay

The relay allocates each sale across admitted offers and presents the body for the buyer to sign. It ranks by price, then by when an offer was posted. Its mark on each sale records which allocation produced it. Validators do not depend on the relay.

## The publisher and the observer

The publisher writes the price feeds. A signing core refuses a bundle unless at least two exchange sources agree with it and its trailing low can be found in the observer's Pyth-signed, on-chain anchored history.

## The keeper

The hosted keeper submits Claims and Expires. Settlement is permissionless, so a buyer or an underwriter can submit the same transaction. The validators hold every settlement to the full amount, so the keeper keeps none of the coverage.

## The quorum

A 2-of-3 quorum can return offers to their owners in an emergency, short by at most 0.6 tADA to pay the batch's fee. A transaction it signs may contain nothing except those returns.

## Integrators

DEXs and lending protocols sell cover at the point of use. SaturnSwap swap-plus-insure runs against the Book on preprod, with the swap and its cover in one transaction. FluidTokens V4 liquidation cover is in progress. See [Integrations](/aegis/aegis#integrations) for the state of each.


# Preprod Proof

The Sovereign Book's transactions on Cardano preprod, each linked to its explorer page, and what remains unproven.

Every transaction below landed on Cardano preprod, with test ADA, on 2026-11-06 or 2026-11-07. Each hash opens that transaction on Cexplorer.

## What is proven and what is open

| Requirement                                                     | State                                                                  |
| --------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Reference price sheets published                                | Proven                                                                 |
| Offers posted under three separate owners and stake credentials | Proven                                                                 |
| Sale drawing on three owners and stakes, with a relay mark      | Proven, twice                                                          |
| Fee output on every sale                                        | Proven                                                                 |
| Buyer cancel with the fee kept                                  | Proven, twice                                                          |
| USDC Depeg sale                                                 | Proven, five times                                                     |
| SaturnSwap V3 order fill and cover sale in one transaction      | Proven, four times                                                     |
| That transaction signed by a buyer in a mobile wallet           | Proven, twice: in the Aegis web app and through SaturnSwap's interface |
| Expire by the hosted keeper                                     | Open. The earliest is after 2026-11-15 20:45 UTC                       |
| Claim by the hosted keeper                                      | Open. It waits on a real market fall through a sold strike             |

## Transactions

| Step                      | Tx                                                                                                                                                                   | Height  | Detail                                                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
| Lane Heads                | [4df7014b2dc03a9c431f14b3afbdf74289c7a94d2da2a188c5cc5027981368c4](https://preprod.cexplorer.io/tx/4df7014b2dc03a9c431f14b3afbdf74289c7a94d2da2a188c5cc5027981368c4) | 5379476 | Mints the 4 lane Heads                                                                                    |
| Position reference script | [ae993c39320de6108b2ccc078268b1783337b4b434ee2a9df2d8cee98a48684f](https://preprod.cexplorer.io/tx/ae993c39320de6108b2ccc078268b1783337b4b434ee2a9df2d8cee98a48684f) | 5379478 |                                                                                                           |
| Book reference script     | [f49a7731374db262d9b26922a18b9a89b21181f3b669b447d6fafc480ea22e81](https://preprod.cexplorer.io/tx/f49a7731374db262d9b26922a18b9a89b21181f3b669b447d6fafc480ea22e81) | 5379479 |                                                                                                           |
| Observer reference script | [8a4088cd6405fb16854f1f16bff9df90a7dadb346e1b8fb16ebf102b3db4d4a9](https://preprod.cexplorer.io/tx/8a4088cd6405fb16854f1f16bff9df90a7dadb346e1b8fb16ebf102b3db4d4a9) | 5379480 |                                                                                                           |
| Reference sheets          | [e6a21128980d1eb40f5e832a7463c454ed073f06cc5db83fe56e7defc38d4136](https://preprod.cexplorer.io/tx/e6a21128980d1eb40f5e832a7463c454ed073f06cc5db83fe56e7defc38d4136) | 5381596 | Five sheets. Also sent the test buyer 100 tADA                                                            |
| Offers (7 to 30 days)     | [88e48459eb3b51bba229b33cdbb1a6f5767c290eb7e17324c4b34b78f4e8706f](https://preprod.cexplorer.io/tx/88e48459eb3b51bba229b33cdbb1a6f5767c290eb7e17324c4b34b78f4e8706f) | 5381611 |                                                                                                           |
|                           | [4ffad9674566dd0645022f8a9c5d059d119ffb29ba16b4742ed73387bf66889a](https://preprod.cexplorer.io/tx/4ffad9674566dd0645022f8a9c5d059d119ffb29ba16b4742ed73387bf66889a) | 5381612 |                                                                                                           |
|                           | [24398df34cd6e5c17f7077a1e443bfa0189b6acf3f4789492f005ef0176db53d](https://preprod.cexplorer.io/tx/24398df34cd6e5c17f7077a1e443bfa0189b6acf3f4789492f005ef0176db53d) | 5381613 |                                                                                                           |
| Observer registration     | [352e218e4a1db11b4e0c9c1c125886f55ff1433f4e298c19b8e9de24105de4a0](https://preprod.cexplorer.io/tx/352e218e4a1db11b4e0c9c1c125886f55ff1433f4e298c19b8e9de24105de4a0) | 5381622 | 2 tADA deposit                                                                                            |
| Sale 1                    | [155576139111d2a54010de96c4b7feb34488b3571918a90b0a170ce57b7ecfbd](https://preprod.cexplorer.io/tx/155576139111d2a54010de96c4b7feb34488b3571918a90b0a170ce57b7ecfbd) | 5381628 | 75 tADA, 3 owners and stakes, 7 days                                                                      |
| Sale 2                    | [d3c51a77c746f5a82f13e730baae99e03539e9b0d5893e72f621221b4e8b13ac](https://preprod.cexplorer.io/tx/d3c51a77c746f5a82f13e730baae99e03539e9b0d5893e72f621221b4e8b13ac) | 5381634 | 30 tADA, 2 owners, 7 days                                                                                 |
| Buyer cancel of sale 2    | [0ca24b7a0a2bea63314115fa366975bd9f3a56233eed712dbdd9d6f574e434d4](https://preprod.cexplorer.io/tx/0ca24b7a0a2bea63314115fa366975bd9f3a56233eed712dbdd9d6f574e434d4) | 5381635 | Fee kept                                                                                                  |
| Offers (45 days)          | [d303b6eb57faa9b266b8926e9f673e1aad3a933b130ffdc714281b89435529be](https://preprod.cexplorer.io/tx/d303b6eb57faa9b266b8926e9f673e1aad3a933b130ffdc714281b89435529be) | 5381643 |                                                                                                           |
|                           | [a36ee194a8a3f0b194b2dabb4a8569a952d8cb8d60cfb4b2aeeb04a0d046e59c](https://preprod.cexplorer.io/tx/a36ee194a8a3f0b194b2dabb4a8569a952d8cb8d60cfb4b2aeeb04a0d046e59c) | 5381644 |                                                                                                           |
|                           | [c355982d82b134578e174e89944b414883c4bae77c913dbc1ace34ebd6e5b66e](https://preprod.cexplorer.io/tx/c355982d82b134578e174e89944b414883c4bae77c913dbc1ace34ebd6e5b66e) | 5381646 |                                                                                                           |
| Sale 3                    | [533ed345573e05e598b65e7ef8f4ca385f411cb7a1515ef2bf0496ebdda0f153](https://preprod.cexplorer.io/tx/533ed345573e05e598b65e7ef8f4ca385f411cb7a1515ef2bf0496ebdda0f153) | 5381676 | 24 tADA, 3 owners and stakes, 45 days                                                                     |
| Offer (USDC Depeg)        | [d0b271d445f903e32415850bf0576a39d97724fa8b5847ab7bf9b7327e4ce353](https://preprod.cexplorer.io/tx/d0b271d445f903e32415850bf0576a39d97724fa8b5847ab7bf9b7327e4ce353) | 5381905 | One 60 tADA offer. Sale 5 draws on it                                                                     |
| Sale 4                    | [a1c3629050f1184777e1ceea393c49b8b423c93a666d6ed1bd4103e62ef2abae](https://preprod.cexplorer.io/tx/a1c3629050f1184777e1ceea393c49b8b423c93a666d6ed1bd4103e62ef2abae) | 5381965 | V3 order fill and 60 tADA Depeg cover on 2 legs. No relay mark                                            |
| Sale 5                    | [12bc25d18e512b1a104c75326dbea5110c6d80614d5fe0bd53153ac3df03266c](https://preprod.cexplorer.io/tx/12bc25d18e512b1a104c75326dbea5110c6d80614d5fe0bd53153ac3df03266c) | 5382835 | 30 tADA Depeg cover on 1 leg                                                                              |
| Buyer cancel of sale 5    | [1ac73e5bad33977f3dc383a99b0dd021c4a22900ccce9e826d7dca26dfdd52e3](https://preprod.cexplorer.io/tx/1ac73e5bad33977f3dc383a99b0dd021c4a22900ccce9e826d7dca26dfdd52e3) | 5382874 | Fee kept                                                                                                  |
| Sale 6                    | [1ba43aadbb8a55e3c20f09a94263485544714c8b7215635185794739afac95c2](https://preprod.cexplorer.io/tx/1ba43aadbb8a55e3c20f09a94263485544714c8b7215635185794739afac95c2) | 5383000 | V3 order fill and 30 tADA Depeg cover on 2 legs, signed by a test script                                  |
| Sale 7                    | [250d49c206d3c4644dc45d25ddc0fe15fb900a508dfccad15c249bc635f93786](https://preprod.cexplorer.io/tx/250d49c206d3c4644dc45d25ddc0fe15fb900a508dfccad15c249bc635f93786) | 5384482 | V3 order fill and 30 tADA Depeg cover on 2 legs, signed in a mobile wallet in the Aegis web app           |
| Sale 8                    | [49c2e18d74efeb9c6f475cffc04a23c11841714896be174205e0c20bcc294c20](https://preprod.cexplorer.io/tx/49c2e18d74efeb9c6f475cffc04a23c11841714896be174205e0c20bcc294c20) | 5385594 | V3 order fill and 30 tADA Depeg cover on 2 legs, signed in a mobile wallet through SaturnSwap's interface |

## The Barrier sales

Sales 1 to 3 are ADA/USD Barrier positions. Prices are in USD.

| Sale | Coverage | Premium      | Strike   | Start (UTC)         | Expiry (UTC)        | Expire possible after (UTC) |
| ---- | -------- | ------------ | -------- | ------------------- | ------------------- | --------------------------- |
| 1    | 75 tADA  | 3.0825 tADA  | 0.13329  | 2026-11-06 20:45:44 | 2026-11-13 20:45:44 | 2026-11-15 20:45:44         |
| 2    | 30 tADA  | 2 tADA       | 0.13329  | 2026-11-06 20:48:24 | Cancelled           | Cancelled                   |
| 3    | 24 tADA  | 19.4736 tADA | 0.156431 | 2026-11-06 21:04:38 | 2026-12-21 21:04:38 | 2026-12-23 21:04:38         |

Sale 1's premium is the sheet's 4.11% for 7 days at 28% depth. Sale 2's is the two legs' 1 tADA minimum. Sale 3's is the sheet's 81.14% for 45 days at 15.5% depth. These are test sheets chosen to exercise the path, and they are no guide to market pricing. Sale 3 sits close to the 15% minimum so that a real ADA fall can pay a Claim through the live reading, with no test print.

The three C-legs in sale 1 and sale 3 each carry a different stake credential, and each offer's remainder returns to the book under that same credential. All three sales carry the relay's mark at metadata label 1986. Each sale's fee output is 1.13784 tADA, the ledger's minimum for that output and above the 1% rule. None of them makes a Cardano Treasury donation, which matches this generation's rules.

## The Depeg sales

Sales 4 to 8 are USDC/USD Depeg positions with a 0.94 strike and a 7-day term. Prices are in USD.

| Sale | Coverage | Legs                  | Premium       | Start (UTC)         | Expiry (UTC)        | Expire possible after (UTC) |
| ---- | -------- | --------------------- | ------------- | ------------------- | ------------------- | --------------------------- |
| 4    | 60 tADA  | 30 + 30               | 2 tADA        | 2026-11-06 22:46:05 | 2026-11-13 22:46:05 | 2026-11-15 22:46:05         |
| 5    | 30 tADA  | 30                    | 2 tADA        | 2026-11-07 04:12:05 | Cancelled           | Cancelled                   |
| 6    | 30 tADA  | 15 + 15               | 2 tADA        | 2026-11-07 05:20:10 | 2026-11-14 05:20:10 | 2026-11-16 05:20:10         |
| 7    | 30 tADA  | 18.214286 + 11.785714 | 2.214286 tADA | 2026-11-07 14:44:03 | 2026-11-14 14:44:03 | 2026-11-16 14:44:03         |
| 8    | 30 tADA  | 10.714285 + 19.285715 | 2.285715 tADA | 2026-11-07 21:38:08 | 2026-11-14 21:38:08 | 2026-11-16 21:38:08         |

Each premium is the minimum. A sale pays at least 2 tADA, and each leg pays at least 1 tADA and its pro-rata share of that 2 tADA, so sales 7 and 8 come to a little over 2 tADA. The sheet's 1.18% rate comes to less at these sizes. The 0.94 strike sat about 6% under the reading, inside the sheet's 5% to 50% depth band. Sale 5's buyer cancelled it 12 minutes after the start.

Sales 4, 6, 7 and 8 each fill a resting SaturnSwap V3 order and sell the cover in the same transaction. The buyer receives the order's tUSDC and the order's owner receives its ADA, while the position script checks the cover sale as it checks any other. Sales 7 and 8 were signed by a buyer in a mobile wallet, sale 7 in the Aegis web app and sale 8 through SaturnSwap's interface. Each of those two transactions is under 3 KB, with a fee near 1.13 tADA.

Sales 5 to 8 carry the relay's mark at metadata label 1986. Sale 4 carries none, so the relay did not present its body. The validators do not read the mark, and the sale is valid without it. Each fee output is 1.13784 tADA, as on sales 1 to 3.

## Signer operations

| Operation                    | State on chain   | Evidence                                                                                                                                                                                                                                                                                               |
| ---------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `publisher.price_bundle`     | Proven           | The bundles below, spending and returning at the publisher's address                                                                                                                                                                                                                                   |
| `relay.mark`                 | Proven           | The mark on sales 1 to 3 and 5 to 8                                                                                                                                                                                                                                                                    |
| `maker.agent`, `maker.float` | Proven           | [Offer Withdraw](https://preprod.cexplorer.io/tx/2fa57a14ff331685134047ed67b484eb3a34339af1f6f5b87cf65280bff359e4), height 5381765, from this [managed offer](https://preprod.cexplorer.io/tx/0e025cfc07947d0ebabb7d6264dd87d73344bf95d656f03df2e87deb687996e9). `maker.float`'s post path has not run |
| `keeper.g2.settle`           | Not yet on chain | The first Expire or Claim                                                                                                                                                                                                                                                                              |

Sample price bundles, all from 2026-11-06:

| Tx                                                                                                                                                                   | Height  |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| [4b70cbb6feb9cacbc76f37dbd955d688d0232e4a2acf79ae214eb5d450229abf](https://preprod.cexplorer.io/tx/4b70cbb6feb9cacbc76f37dbd955d688d0232e4a2acf79ae214eb5d450229abf) | 5381466 |
| [b852135633f6bf7eda867b68e722878e56c033837eaca68505abd67724598e49](https://preprod.cexplorer.io/tx/b852135633f6bf7eda867b68e722878e56c033837eaca68505abd67724598e49) | 5381491 |
| [50ea751fce31b102bbf1995277fbed3e5826e7bfeed7f101aa3f5bf5b868c16b](https://preprod.cexplorer.io/tx/50ea751fce31b102bbf1995277fbed3e5826e7bfeed7f101aa3f5bf5b868c16b) | 5381536 |
| [45240b8a1a2541c5cf8b322a43b925438aa5038d0bea6db8ac180b12e61e38af](https://preprod.cexplorer.io/tx/45240b8a1a2541c5cf8b322a43b925438aa5038d0bea6db8ac180b12e61e38af) | 5381588 |
| [53e69498617cae6f82d4b86abc5df0f39d7148f1df459b3d6151ada6f90e6eb0](https://preprod.cexplorer.io/tx/53e69498617cae6f82d4b86abc5df0f39d7148f1df459b3d6151ada6f90e6eb0) | 5381619 |

## Scripts

The hashes and policies for this generation are in [How Aegis Works On-Chain](/aegis/architecture#1-scripts).

## What this does not prove

This is preprod, with test ADA, relaxed key custody and an unaudited generation. The rules on [How Aegis Works On-Chain](/aegis/architecture) are the deployed code's, and a Claim path has not yet run on this generation.


# Overview

Materios Partner Chain — Overview

Materios is a **Substrate-based partner chain** purpose-built for certified data anchoring and AI verification. It extends the Proof-of-Inference protocol with a dedicated execution layer optimized for high-throughput receipt storage, blob attestation, and multi-party threshold certification.

## Why a Partner Chain?

Cardano L1 provides strong finality guarantees, but anchoring every individual AI receipt on-chain is cost-prohibitive at scale. Materios solves this by:

* **Batching**: Thousands of PoI receipts are collected, Merkle-hashed, and the root is periodically anchored to Cardano L1.
* **Dedicated throughput**: 6-second block times with lightweight blocks optimized for receipt and blob data.
* **Threshold attestation**: A committee of independent attesters must reach quorum before any batch is considered certified.
* **Dual-token economics**: MATRA (transferable, stakeable) and MOTRA (non-transferable capacity token with generation and decay) provide a fee model that doesn't require users to hold volatile assets.

## Architecture

```
Clients (SDK / API)
    |
    v
Blob Gateway  -->  Cert Daemon Committee (threshold attestation)
    |                       |
    v                       v
Materios Chain          Cardano L1
(Substrate)           (periodic anchors)
```

### Core Components

| Component         | Role                                                                            |
| ----------------- | ------------------------------------------------------------------------------- |
| **Materios Node** | Substrate validator/full node. Aura block production + Grandpa BFT finality.    |
| **Cert Daemon**   | Attestation agent. Signs receipts, participates in threshold certification.     |
| **Blob Gateway**  | HTTP API for submitting and retrieving certified data blobs.                    |
| **Anchor Worker** | Bridges Materios batch roots to Cardano L1 metadata transactions.               |
| **Explorer**      | Web dashboard showing blocks, attestations, committee health, and chain status. |

### Consensus

* **Block authoring**: Aura (authority round-robin, sr25519 keys)
* **Finality**: Grandpa (BFT, ed25519 keys). Tolerates up to `f` faults where `f = (n-1)/3` for `n` authorities.
* **Session keys**: Combined Aura + Grandpa keypair per validator.

### Token Model

| Token     | Type                      | Purpose                                                                                                                               |
| --------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **MATRA** | Transferable (6 decimals) | Staking, governance, transfers                                                                                                        |
| **MOTRA** | Non-transferable          | Capacity/fee token. Generated proportionally to MATRA balance, decays per block. Used to pay transaction fees without spending MATRA. |

### On-Chain Pallets

| Pallet          | Function                                                                    |
| --------------- | --------------------------------------------------------------------------- |
| `OrinqReceipts` | PoI receipt storage, status tracking, content-based queries                 |
| `Motra`         | MOTRA generation, decay, fee estimation, congestion pricing                 |
| `Balances`      | MATRA transfers and account management                                      |
| `Grandpa`       | BFT finality (standard Substrate)                                           |
| `Aura`          | Block authoring schedule (standard Substrate)                               |
| `Sudo`          | Governance (2-of-3 multisig, transitioning to Cardano governance contracts) |
| `Multisig`      | Multi-signature call dispatch for governance actions                        |
| `Utility`       | Batch call execution through multisig                                       |

## Current Network

### Preprod (active)

> **🧪 Preprod is a public testnet, not mainnet.** Native token on this network is **tMATRA** — testnet tokens with no economic value. Operating a node here is for testing, demonstrating uptime, and previewing mainnet workflows; it is not a revenue stream. Mainnet (with real MATRA + economic rewards) launches per the [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap).

* **Chain**: `materios_preprod_v6` (`system_chain` reports `Materios Preprod v6`)
* **Runtime version**: spec **235**, transaction version **4**
* **Token decimals**: MATRA 6, MOTRA 15
* **Validators**: 5-seat committee — 4 FPS permissioned cores + 1 SPO-registered seat
* **D-parameter**: `(15, 1)` — 15 permissioned seats, 1 registered seat
* **Block time**: 6 seconds
* **Finality**: GRANDPA (working)
* **Governance**: 2-of-3 multisig sudo (transferred from //Alice)
* **Cardano anchoring**: Mainnet, label `8746`
* **RPC**: `wss://materios.fluxpointstudios.com/preprod-rpc`
* **Gateway**: `https://materios.fluxpointstudios.com/preprod-blobs`
* **Explorer**: [fluxpointstudios.com/materios/explorer](https://fluxpointstudios.com/materios/explorer)
* **Genesis hash**: `0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf`
* **Node bootstrap**: restore the current-room snapshot, not a from-genesis replay — see [Current-snapshot bootstrap](/materios-partner-chain/current-snapshot-bootstrap).

> **Integrating a wallet or SDK?** Materios has two deviations from a stock Substrate chain that will break a naive integration: a non-standard fee extension and an SS58 prefix mismatch. Both are documented in [Wallet & SDK Integration](/materios-partner-chain/wallet-integration). Read that page before writing signing code.

* **Attestor install (permissionless)**: `curl -sSL https://raw.githubusercontent.com/Flux-Point-Studios/materios-operator-kit/main/install.sh | bash -s -- --mode attestor`
* **SPO Validator install**: see [SPO Onboarding](/materios-partner-chain/spo-onboarding).

### Preview (deprecated)

The original preview/staging network (`materios_staging`, runtime 115, 5 validators) is deprecated. All new operators should join the **preprod** chain. Preview will be sunset once all integrations have migrated.

## Next Steps

* [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap) — Current status and remaining milestones for mainnet
* [Cardano L1 Anchoring](/materios-partner-chain/cardano-anchoring) — Metadata format for Materios checkpoint transactions on Cardano mainnet
* [Operator Guide](/materios-partner-chain/operator-guide) — Become an attestation operator with a single command
* [Node Requirements](/materios-partner-chain/node-requirements) — Hardware, software, and configuration for running a full Materios node


# Wallet & SDK Integration

Materios is a Substrate chain, but it is **not** a stock Substrate chain. Two deviations will break an integration that assumes the defaults, and both fail in ways that are easy to misdiagnose. Read this page before writing signing code.

Everything below was verified against live preprod on 2026-08-25.

## Connection facts

| Field                           | Value                                                                |
| ------------------------------- | -------------------------------------------------------------------- |
| RPC (WebSocket)                 | `wss://materios.fluxpointstudios.com/preprod-rpc`                    |
| Chain                           | `Materios Preprod v6`                                                |
| Genesis hash                    | `0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf` |
| Spec version                    | 235                                                                  |
| **Transaction version**         | **4**                                                                |
| Block time                      | 6 seconds                                                            |
| Finality                        | GRANDPA                                                              |
| `system_properties.ss58Format`  | 42                                                                   |
| `tokenSymbol` / `tokenDecimals` | `MATRA` / 6                                                          |

> **Preprod is a public testnet.** The native token here is tMATRA and has no economic value. Mainnet parameters will differ; do not hardcode preprod values into a build you intend to point at mainnet.

## Deviation 1 — the fee extension is `ChargeMotra`, not `ChargeTransactionPayment`

This is the one that breaks most clients.

Materios pays transaction fees in **MOTRA**, not MATRA, through a custom pallet. The runtime's signed extensions are:

```
CheckNonZeroSender, CheckSpecVersion, CheckTxVersion, CheckGenesis,
CheckMortality, CheckNonce, CheckWeight, ChargeMotra
```

A stock Substrate chain ends that list with `ChargeTransactionPayment`, which carries a `Compact<Balance>` tip. **`ChargeMotra` carries no tip field.** There is nothing to encode in that position.

### What breaks

Any client that hardcodes the default extension set — rather than reading the extension list out of chain metadata — will append a `Compact<tip>` that the runtime does not expect. The extra bytes shift the payload, the signature fails to verify, and **every transaction is rejected**, not just tipped ones.

| Client                     | Behaviour                                                                                        |
| -------------------------- | ------------------------------------------------------------------------------------------------ |
| **polkadot-js**            | Works. It builds the extension list from metadata, so it picks up `ChargeMotra` automatically.   |
| **subxt**                  | Breaks unless you define a custom `SignedExtra`. Its default assumes `ChargeTransactionPayment`. |
| **txwrapper-core**         | Breaks. Its transaction construction assumes the default set.                                    |
| **py-substrate-interface** | Breaks on the tip path. Do not pass a `tip` argument.                                            |

There is also **no `TransactionPaymentApi`** on this runtime. `payment_queryInfo` returns `Method not found`, so **`tx.paymentInfo()` throws** — do not call it to estimate fees, and do not treat the throw as a connectivity failure.

### What to do

1. **Build the signed extension set from chain metadata.** Never hardcode it. This is the single change that makes most clients work.
2. **Never set a tip.** There is no field for one. Omit the parameter entirely rather than passing zero.
3. **Do not call `paymentInfo()`.** Fee estimation goes through MOTRA; see below.

## Deviation 2 — the SS58 prefix is reported two different ways

The chain reports two different SS58 prefixes depending on where you look:

* `system_properties.ss58Format` → **42** (the generic Substrate prefix)
* the runtime constant `System::SS58Prefix` → **0**

Both refer to the same 32-byte public key. They produce **different address strings** for the same account, so a tool reading one source and a tool reading the other will disagree textually while being in perfect agreement about the underlying key.

This bites hardest in comparisons: an address that looks completely different from the one in your database may be the same account. A string equality check across two tools that chose different prefixes silently returns "no match" forever.

### What to do

* **Treat the 32-byte public key as the account identity**, not the encoded string.
* **Normalise before comparing.** Decode to the public key, then re-encode to one prefix.
* **Display with prefix 42.** That matches `system_properties`, the explorer, and the gateway, so it is what users will see elsewhere.

```javascript
import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';

// Same key, either prefix in -> one canonical form out.
const canonical = (addr) => encodeAddress(decodeAddress(addr), 42);
```

The prefix split is a known inconsistency and is queued to be reconciled in a future runtime upgrade. Until then, normalise.

## The two-token model

| Token     | Decimals | Transferable | Role                                     |
| --------- | -------- | ------------ | ---------------------------------------- |
| **MATRA** | 6        | Yes          | Staking, governance, transfers, balances |
| **MOTRA** | 15       | **No**       | Transaction fees only                    |

MOTRA is a capacity token, not a currency. It is **generated passively from the MATRA an account holds**, decays if unused, and is burned when spent on fees. It cannot be transferred between accounts. The pattern mirrors NIGHT generating DUST on Midnight.

Consequences for a wallet:

* **`tokenDecimals` in `system_properties` is 6 — that is MATRA only.** MOTRA's 15 decimals are not advertised there. Formatting a MOTRA balance with 6 decimals overstates it by a factor of 10⁹.
* **An account with MATRA but no MOTRA yet cannot transact.** MOTRA accrues over blocks. A freshly funded account needs to wait before its first transaction, which looks like a bug if you are not expecting it.
* **A zero MATRA balance means MOTRA generation has stopped.** Fee capacity is downstream of the MATRA holding, so a fully swept account cannot pay to move anything.
* **Fees never touch the MATRA supply.** MOTRA is consumed; no MATRA is burned or minted by fee flow.

## Verification checklist

Run these against a real connection before declaring an integration working. Each one targets a specific way this chain differs from the default.

```javascript
import { ApiPromise, WsProvider } from '@polkadot/api';

const api = await ApiPromise.create({
  provider: new WsProvider('wss://materios.fluxpointstudios.com/preprod-rpc'),
});

// 1. You are on the right chain. Compare against the genesis hash above.
console.assert(
  api.genesisHash.toHex() ===
    '0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf',
  'wrong chain',
);

// 2. The runtime is what you built against.
const v = api.runtimeVersion;
console.log('spec', v.specVersion.toNumber(), 'tx', v.transactionVersion.toNumber());

// 3. THE IMPORTANT ONE: your client resolved ChargeMotra, not ChargeTransactionPayment.
//    If this prints ChargeTransactionPayment, your signing WILL fail — the client is
//    using the stock extension set instead of reading metadata.
console.log('signed extensions:', api.registry.signedExtensions);

// 4. Sign and submit one real extrinsic. A dry-run does not exercise the extension
//    encoding, so it will not catch the tip-byte failure. Only a submitted, included
//    transaction proves the signing path.
```

Step 4 is not optional. The `ChargeMotra` failure is an encoding mismatch that only surfaces when the runtime verifies a real signature — every offline check passes right up until submission.

## Getting test funds

The gateway exposes a faucet for preprod:

```bash
curl -X POST https://materios.fluxpointstudios.com/preprod-blobs/faucet/drip \
  -H 'content-type: application/json' \
  -d '{"address":"<your SS58 address>"}'
```

One drip per address. A second call returns `Address already received a drip` rather than topping up. After the drip, allow a few blocks for MOTRA to accrue before your first transaction.

## Where to go next

* [Materios overview](/materios-partner-chain/materios) — architecture, pallets, current network parameters
* [Node requirements](/materios-partner-chain/node-requirements) — running your own node or RPC endpoint
* [Cardano L1 anchoring](/materios-partner-chain/cardano-anchoring) — how Materios state settles to Cardano

If you hit something this page does not cover, open an issue on [Flux-Point-Studios/docs](https://github.com/Flux-Point-Studios/docs) — integration friction is worth documenting for the next team.


# Mainnet Roadmap

Materios mainnet readiness tracker — current status and remaining milestones

Materios is currently running as a **preprod network** (`materios_preprod_v6`, runtime spec 235) with live data, real game integrations, and mainnet Cardano anchoring. This page tracks what's done and what remains before the network is designated as mainnet.

***

## Current Status: Preprod Network

The Materios preprod network (`materios_preprod_v6`) is fully operational with real workloads:

* **Live game integration** — Clay Monster Dash submits certified receipts through the full pipeline
* **Cardano mainnet anchoring** — Checkpoint transactions are submitted to Cardano L1 with label `8746` ([view format](/materios-partner-chain/cardano-anchoring))
* **Permissionless attestation** — External operators join the attestation committee with a single command ([operator guide](/materios-partner-chain/operator-guide))
* **Permissionless SPO validators** — Cardano preprod SPOs can register via `smart-contracts register` and compete for the open registered committee seat (D = `(15, 1)`); see [SPO Onboarding](/materios-partner-chain/spo-onboarding)
* **\~12-second certification** — Receipts go from submitted to certified in approximately 12 seconds
* **Runtime overrides** — IOG IDP-None fallback + Ariadne output dedup ship as `--wasm-runtime-overrides`; upstream fixes pending
* **GRANDPA finality** — Working with 4 permissioned validators (Gemtek, 2× GMKtec Ultra 6, MacBook Pro M1 native arm64)

The preprod network uses the same codebase, pallets, and protocols that will run on mainnet. The transition is about token economics and governance, not a rewrite. The previous staging/preview network is deprecated.

***

## Completed Milestones

### Infrastructure & Pipeline

| Milestone                                    | Status | Details                                                                                                           |
| -------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| Substrate chain (Aura + GRANDPA)             | Done   | 3 validators (preprod), 6-second blocks, BFT finality                                                             |
| Receipt pipeline (submit → certify → anchor) | Done   | End-to-end proven, \~12s certification                                                                            |
| Cardano L1 anchoring                         | Done   | Mainnet metadata TXs, label `8746`, v2 format                                                                     |
| Blob gateway + locator registry              | Done   | Off-chain data storage with integrity verification                                                                |
| Content validation schemas                   | Done   | Per-game plausibility checks (Clay Monster Dash v1 live)                                                          |
| Explorer dashboard                           | Done   | [fluxpointstudios.com/materios/explorer](https://fluxpointstudios.com/materios/explorer) (Preprod/Preview toggle) |

### Attestation Committee

| Milestone                          | Status      | Details                                                 |
| ---------------------------------- | ----------- | ------------------------------------------------------- |
| Threshold attestation              | Done        | Multi-party certification with configurable quorum      |
| Permissionless attestor onboarding | Done        | One-command install, auto-join committee, auto-register |
| Health watchdog for operators      | Done        | Discord/email alerting for daemon issues                |
| External attestors onboarding      | In progress | Multiple external operators joining the committee       |

### Governance

| Milestone                    | Status  | Details                                                                                                                                                   |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Multisig governance          | Done    | Runtime v114 — `pallet-multisig` + `pallet-utility`. Sudo requires 2-of-3 approval.                                                                       |
| MOTRA projected balance      | Done    | Runtime v115 — `motra_getBalance` RPC returns projected balance for fresh accounts immediately.                                                           |
| Preprod chain launch         | Done    | Runtime spec 235 — clean genesis (`materios_preprod_v6`), 5-seat committee, GRANDPA finality working. Operators bootstrap from the current-room snapshot. |
| Validator key rotation       | Done    | Production keypairs (mnemonic-derived, April 12 2026). External validators joining.                                                                       |
| Cardano governance contracts | Planned | On-chain voting by MATRA/cMATRA holders via Cardano smart contracts                                                                                       |

### Token Economics

| Milestone                          | Status  | Details                                                                                                                    |
| ---------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| Dual-token model (MATRA + MOTRA)   | Done    | MATRA for staking/governance, MOTRA for fees (generation + decay)                                                          |
| cMATRA token merger                | Planned | 7 legacy Cardano assets → cMATRA ([details](https://docs.fluxpointstudios.com/materios-partner-chain/cmatra-token-merger)) |
| Validator rewards (stake-weighted) | Planned | Transition from block-count to stake-weighted distribution                                                                 |

***

## Remaining Milestones

### 1. cMATRA Token Merger

Seven legacy Cardano assets (AGENT, SHARDS, and 5 NFT collections) will consolidate into **cMATRA**, a Cardano-native transitional token. cMATRA will bridge to become native **MATRA** on the Materios mainnet.

* Maximum supply: 1 billion cMATRA
* **Public Redemption Pool:** 722.5M (72.25%)
* **Network Incentives Reserve:** 277.5M (27.75%) — split into five purpose-built sub-buckets:
  * Validator Emissions — 115M (11.5%)
  * Attestor Emissions — 65M (6.5%)
  * Ecosystem Treasury — 40M (4%)
  * Strategic Allocation — 30M (3%) — long-term on-chain vesting
  * Liquidity — 27.5M (2.75%) — POL, bridge peg reserve, CLOB maker rebates
* 6-month public redemption window (open May 28 – November 28, 2026)

See the full merger specification: [cMATRA Token Merger](https://docs.fluxpointstudios.com/materios-partner-chain/cmatra-token-merger)

### 2. Stake-Weighted Validator Rewards

Transition from the current block-count reward model to stake-weighted distribution, aligning validator incentives with network security contribution. Target scale: **1,000 validators + 3,000 attestors** at steady state, with per-validator target reward of \~5K MATRA/year and per-attestor target of \~2K MATRA/year.

### 3. Cardano Governance

Long-term governance will be managed through Cardano smart contracts, enabling MATRA/cMATRA holders to participate in on-chain governance proposals. This aligns with the Cardano Partner Chains vision where ADA holders benefit from partner chain participation.

### 4. Launch Liquidity

Seed the cMATRA/ADA and cMATRA/USDM markets on **SaturnSwap CLOB** (primary) with secondary AMM listings on Minswap and WingRiders at launch. Funded by the 27.5M Liquidity sub-bucket plus a strategic pair-sourcing arrangement:

* **SaturnSwap CLOB:** $250K book depth within 2% of mid at launch; resting orders at 25/50/100/200/400 bps from mid.
* **Minswap AMM:** $75–100K depth.
* **WingRiders AMM:** $25–50K depth.
* **Maker-rebate program:** 5M MATRA over 24 months, 50% annual decay, \~15 bps rebate on 30 bps maker fee, 20% cap per MM address with two-sided-quote requirements.

### 5. Strategic Fundraise

A **Strategic Allocation** of 30M MATRA (3% of supply) is reserved for institutional partners who commit capital ahead of public launch. Allocations are subject to long-term on-chain vesting, with no liquidity ahead of schedule. Proceeds are intended to fund Protocol-Owned Liquidity seeding, security audits, and post-window team runway. Partner identities and commitment amounts will be disclosed on-chain at mint time.

***

## Network Parameters

| Parameter             | Current (preprod)                                       | Mainnet target                 |
| --------------------- | ------------------------------------------------------- | ------------------------------ |
| Runtime version       | spec 235, tx version 4 (MATRA 6-dec, MOTRA 15-dec)      | TBD                            |
| Chain ID              | `materios_preprod_v6`                                   | `materios`                     |
| Block time            | 6 seconds                                               | 6 seconds                      |
| Finality              | GRANDPA BFT                                             | GRANDPA BFT                    |
| Validators            | 4 permissioned cores + 1 SPO-registered (D = `(15, 1)`) | 7–15+                          |
| Attestation threshold | 2-of-N                                                  | 2-of-N (scales with committee) |
| Cardano anchoring     | Mainnet, label `8746`                                   | Same                           |
| Governance            | 2-of-3 multisig                                         | Cardano governance contracts   |
| WASM overrides        | None needed                                             | None                           |

***

## Timeline

The mainnet transition depends primarily on the cMATRA token merger, which requires a 6-month public redemption window (closes November 28, 2026). The merger defines the initial MATRA distribution, which is a prerequisite for stake-weighted rewards and Cardano governance.

All infrastructure milestones (pipeline, anchoring, attestation, multisig governance, validator key rotation) are already complete. The remaining work is token economics and decentralization.

### Long-term sustainability

Validator and attestor rewards are paid from the published **Network Incentives Reserve emission schedules** (115M Validator Emissions, 65M Attestor Emissions); the attestor pot (`mat/attr`) is the designated accrual account for attestor-side economics. Transaction fees themselves are paid in **MOTRA** — generated from MATRA holdings, decaying if unused, consumed when spent — so fee flow never burns, mints, or dilutes MATRA. Live pot balances, the v5.1 allocation table, and active vesting schedules are visible on the [Materios explorer's Tokenomics State panel](https://fluxpointstudios.com/materios/explorer#overview).

At the 1,000-validator + 3,000-attestor target scale, the combined annual reward requirement is approximately 11M MATRA/year. The 180M combined Validator + Attestor Emissions sub-buckets provide \~16 years of runway at that scale on emissions alone — MOTRA fees are burned when spent and never fund rewards. With the unredeemed cMATRA rollover pallet (6-month post-launch trigger), residual redemption-pool balances flow back into the reserve sub-buckets on a governance-directed split, making the reserve effectively perpetual at any realistic level of network activity.

***

## Links

* [Explorer](https://fluxpointstudios.com/materios/explorer) — Live network dashboard (Preprod/Preview toggle)
* [Operator Guide](/materios-partner-chain/operator-guide) — Run an attestor node
* [Cardano L1 Anchoring](/materios-partner-chain/cardano-anchoring) — Metadata format for anchor transactions
* [Game Integration](/materios-partner-chain/game-integration) — Add certified anti-cheat to your game
* [cMATRA Token Merger](https://docs.fluxpointstudios.com/materios-partner-chain/cmatra-token-merger) — Legacy asset consolidation


# Cardano L1 Anchoring

Cardano L1 Anchoring — Metadata format for Materios checkpoint transactions

## What Are Materios Anchor Transactions?

Every batch of certified receipts on the Materios chain is periodically checkpointed to Cardano mainnet as a **metadata transaction**. These anchor transactions carry a Merkle root covering all receipts in the batch, giving each receipt Cardano-grade finality without the cost of writing every receipt individually to L1.

* **Metadata label `8746`** is reserved for Materios receipt checkpoint anchors.
* The anchor worker submits a new checkpoint roughly **every \~2 minutes** when new receipts have been certified.
* Each anchor transaction costs approximately **0.18 ADA**.

## Metadata Format (v2)

All anchor transactions carry a JSON metadata payload under label `8746`:

```json
{
  "p": "materios",
  "v": 2,
  "chain": "5663079a485b93fdc9e386b862b4cf8d25499427df6b8c5f018535acfd2e5020",
  "root": "<merkle root of certified receipt batch>",
  "manifest": "<SHA-256 hash of batch manifest>",
  "blocks": [<from_block>, <to_block>],
  "leaves": <number of receipts in batch>
}
```

### Field Definitions

| Field      | Type        | Description                                                                                      |
| ---------- | ----------- | ------------------------------------------------------------------------------------------------ |
| `p`        | string      | Protocol identifier. Always `"materios"`.                                                        |
| `v`        | int         | Metadata schema version. Current: `2`.                                                           |
| `chain`    | string      | Materios chain genesis hash (first 64 hex chars). Identifies which chain this anchor belongs to. |
| `root`     | string      | Merkle root of the checkpoint batch. SHA-256 hash covering all certified receipts in this batch. |
| `manifest` | string      | SHA-256 hash of the batch manifest JSON (contains leaf hashes, block range, timestamps).         |
| `blocks`   | \[int, int] | Materios block range \[from, to] covered by this checkpoint.                                     |
| `leaves`   | int         | Number of certified receipts included in this batch.                                             |

## How to Verify

1. **Find the TX on cexplorer.** Search for the transaction hash at [cexplorer.io](https://cexplorer.io). The metadata payload will be displayed under the transaction's metadata tab with label `8746`.
2. **Understand the Merkle structure.** Each leaf in the Merkle tree is computed as:

   ```
   SHA-256("materios-checkpoint-v1" || chain_genesis || receipt_id || cert_hash)
   ```

   The `root` field in the metadata is the root of this tree.
3. **Verify individual receipts.** Download the batch manifest (referenced by `manifest` hash). The manifest contains the ordered list of leaf hashes. Recompute the leaf hash for the receipt you want to verify and confirm it is present in the manifest; then recompute the Merkle root from all leaves and compare it to the on-chain `root`.
4. **Use the Materios Explorer.** The explorer at [materios.fluxpointstudios.com/explorer](https://materios.fluxpointstudios.com/explorer/) shows verification status for every checkpoint, including the corresponding Cardano TX hash and a direct link to cexplorer.

## Example Transaction

First mainnet anchor with v2 metadata, submitted April 10, 2026:

**TX hash:** `b2b55a984af345b3ae758d7c92ee033e3066b24c17b7b1755f07a30e9bababf3`

View it on cexplorer: [cexplorer.io/tx/b2b55a984af345b3ae758d7c92ee033e3066b24c17b7b1755f07a30e9bababf3](https://cexplorer.io/tx/b2b55a984af345b3ae758d7c92ee033e3066b24c17b7b1755f07a30e9bababf3)

## Anchor Frequency and Cost

| Parameter           | Value                                           |
| ------------------- | ----------------------------------------------- |
| Submission interval | \~2 minutes (when new certified receipts exist) |
| Cost per anchor TX  | \~0.18 ADA                                      |
| Metadata label      | `8746`                                          |
| Schema version      | `2`                                             |


# Intent Settlement

M-of-N committee-attested settlement of Cardano-anchored DeFi intents on Materios

Materios runs a permissionless M-of-N committee that **autonomously settles Cardano-anchored DeFi intents** without a central keeper, batcher, or trusted middleman.

A user posts a Cardano transaction containing the settlement evidence. The committee — running open-source cert-daemons on independent nodes — observes the Cardano L1 tx, cross-checks 8 falsifiable facts, signs the canonical settlement digest, peer-shares signatures, and lands one M-sig `attest_settle` extrinsic on Materios. Sub-10s from request to settled, end-to-end cryptographically verifiable, zero manual intervention.

It is the first production Cardano L2 path where the settlement decision is made by independent committee observation of L1, not by a single batcher or a single archive node.

***

## Why This Exists

DeFi settlement on Cardano today depends on one of:

1. **A single batcher** (Minswap, SundaeSwap pre-Gummiworm) — the operator decides which orders settle, in what order, at what price. Reorgs, BEV, and frontrun risk all concentrate on one party.
2. **A bridged sidechain** — Materios's category. Trust depends on who watches L1, who signs the settlement, and how falsifiable the chain of custody is.

Materios's intent-settlement pallet inverts the failure modes of category (2):

| Centralized batcher             | **Materios intent-settlement**                                                                               |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| One operator decides settlement | M-of-N committee, any N-M can be offline                                                                     |
| No cryptographic provenance     | Public on-chain, **every sig verifies sr25519 against canonical bytes the pallet rebuilds from chain state** |
| Operator can frontrun           | Committee cannot frontrun — they sign chain-state-derived digests, not orderings                             |
| No skin in the game             | Slashable MATRA bond per attestor (#286 follow-on shipping)                                                  |

The committee's job isn't to **decide** — it's to **observe and confirm**. The pallet defines exactly which Cardano L1 fact must be true for the settlement to be valid; the committee's signature is just a multi-party witness that the fact is true. Anyone running a follower node can refute a forged settlement.

***

## How It Works

The flow has two on-chain phases plus a permissionless intermediate step:

```
   Phase 1: PIN THE CLAIM
   ─────────────────────
1. User (or anyone) submits a Cardano L1 tx that pays the beneficiary
   the voucher amount.
2. Anyone (typically the beneficiary or a keeper) calls
       IntentSettlement::request_settle(claim_id, cardano_tx_hash,
                                         observed_at_depth, observed_slot)
   which PINS the Cardano evidence into ClaimSettlementRequests storage.
   The pallet validates observed_at_depth >= MinFinalityDepth and
   observed_at_depth fits in u32.

   Phase 2: COMMITTEE ATTESTATION (autonomous)
   ────────────────────────────────────────────
3. Each cert-daemon polls ClaimSettlementRequests every 12s.
4. For each pending request, the daemon INDEPENDENTLY:
       a. queries Kupo for the Cardano tx → outputs + slot + block hash
       b. resolves block height via Ogmios chain-sync mini-protocol
          (header_hash → block height) — see PR #31
       c. cross-checks 8 facts (see "The Eight Facts" below)
       d. computes the canonical STCA preimage from chain state
          (213 bytes, byte-exact match against the pallet)
       e. signs blake2_256(preimage) with its sr25519 committee key

5. The daemon POSTs its (pubkey, sig, digest) to the gateway's
       /v2/multisig_sigs/{kind}/{key}
   bulletin board. Gateway verifies sr25519 before storing.

6. The daemon GETs peer sigs filtered to its locally-computed digest
   (defense-in-depth — peer sigs over a different digest are dropped
   client-side even if the gateway misbehaves).

7. When >= MinSignerThreshold sigs are assembled, the daemon submits
   one M-sig envelope:
       IntentSettlement::attest_settle(claim_id, [(pubkey, sig), ...])

8. The pallet's `ensure_threshold_signatures` re-runs sr25519 verify on
   every sig against the digest it rebuilds from chain state. First
   successful submission emits:
       IntentSettlement::ClaimSettled {
         claim_id, cardano_tx_hash, settled_direct
       }
   Concurrent submissions from other daemons bounce with
   `SettlementRequestMissing` (already-consumed → idempotent).
```

***

## The Eight Facts

Every cert-daemon must INDEPENDENTLY confirm all eight before signing. A refusal on any fact is logged with the specific reason and is the central safety property — auditors grep `settle_attestor: REFUSE` to find any committee member who disagreed with a request.

| #  | Fact                                              | Sourced from                    |
| -- | ------------------------------------------------- | ------------------------------- |
| 1  | The Cardano tx exists                             | Kupo `/matches?transaction_id=` |
| 2  | observed\_at\_depth ≥ MinFinalityDepth blocks     | Ogmios chain-sync resolution    |
| 3  | observed\_slot matches Kupo's slot for the tx     | Kupo                            |
| 4  | amount\_lovelace to beneficiary matches voucher   | Kupo + chain state              |
| 5  | mainchain\_genesis\_hash pins preprod vs mainnet  | Ogmios networkMagic table       |
| 6a | voucher.amount\_lovelace matches request          | Vouchers\[claim\_id]            |
| 6b | voucher.beneficiary\_addr\_hash matches request   | Vouchers\[claim\_id]            |
| 7  | live chain\_id (Materios genesis) matches request | Materios RPC                    |
| 8  | voucher\_digest derived from chain state matches  | Vouchers\[claim\_id]            |

The pallet does NOT trust the daemon's word on any of these — it independently rebuilds the canonical STCA preimage from `ClaimSettlementRequests[claim_id]` + `Vouchers[claim_id]` and verifies every committee sig against the resulting digest. Daemons signing over the wrong digest get `InvalidSignature` and the settlement does not land. This is the "two-phase B+D" architecture from audit-P0 task #266.

***

## Live Status

Production on Materios preprod as of **2026-05-15**.

| Component                                           | Status                                                                           |
| --------------------------------------------------- | -------------------------------------------------------------------------------- |
| spec-220 (settle\_claim L1 verification)            | LIVE since 2026-05-15                                                            |
| spec-221 (expire\_policy\_mirror B+D)               | LIVE since 2026-05-15                                                            |
| Cert-daemon M-of-N envelope coordination            | LIVE since 2026-05-15                                                            |
| First fully-autonomous **ClaimSettled** (spec-220)  | Block **#200660**, claim `0xe08c94624cdc3991…`, Cardano tx `bb59881af429ad09…`   |
| First fully-autonomous **IntentExpired** (spec-221) | Block **#201354**, intent `0x8f4af94bb6aefaec…`, reason `PolicyExpiredOnCardano` |
| Active committee members (preprod)                  | 2 (Gemtek + Node-3); MinSignerThreshold = 2                                      |
| Committee MaxSize                                   | 64                                                                               |

### What "autonomous" actually means

Both M-of-N paths are now proven end-to-end with no human or script in the loop after the first request.

**Settle path** (spec-220), 4 seconds end-to-end:

```
16:40:00.472  Node-3 daemon : assembled 2/2 sigs for e08c94624cdc3991... — submitting envelope
16:40:00.???  Materios block #200660 produced with the envelope inside
              IntentSettlement::ClaimSettled emitted
16:40:04.703  Gemtek daemon : assembled 2/2 sigs for same claim — submitting
16:40:06.017  Gemtek daemon : SettlementRequestMissing (already consumed — correct)
```

**Expire path** (spec-221), under 2 seconds:

```
18:06:46.242  expire_attestor: 1 pending expiry request(s) — processing under sem cap 8
18:06:46.973  expire_attestor: assembled 2/2 sigs for 8f4af94bb6aefaec... — submitting envelope
18:06:48.017  expire_attestor: attest_expire_policy OK — depth=299 ext_hash=0x91680c7e…
              Materios block #201354 emits IntentSettlement::IntentExpired
              { reason: PolicyExpiredOnCardano }
```

Two committee members independently observed the same Cardano L1 facts, computed byte-identical canonical digests (STCA for settle, EXPP for expire), peer-shared sigs through the gateway bulletin board, and submitted M-sig envelopes. The first to land won the race in both cases; concurrent submissions bounced with the expected idempotent refusal.

***

## Cryptographic Chain of Custody

The thing that makes a Materios settlement un-forgeable is the chain that ties the signed claim back to four independent sources of truth.

```
1. Cardano L1 transaction          ─── observed via Kupo+Ogmios
        │                              (independent followers per attestor)
        ▼
2. Materios on-chain Voucher       ─── stored in Vouchers[claim_id]
        │                              by the M-of-N issuance pallet
        ▼
3. Pinned settlement evidence       ─── ClaimSettlementRequests[claim_id]
        │                              with (cardano_tx_hash, observed_at_depth,
        │                              observed_slot, mainchain_genesis_hash)
        ▼
4. Canonical STCA digest             ─── blake2_256(213-byte preimage)
        │                              rebuilt by the pallet from (2)+(3)+chain_id
        ▼
5. M-of-N sr25519 envelope            ─── each sig must verify against (4)
                                         OR the pallet rejects entire submit
```

Every level is verifiable on chain. Forge any one and the verification chain breaks. The committee's sigs **commit to a 213-byte canonical structure containing every chain-state-derived field** — they cannot be replayed onto a different claim, a different Cardano tx, or a different network.

***

## What This Unlocks

Spec-220's settle path is the bottom-of-stack primitive that enables everything Materios will ship in 2026:

| Layer                                         | Status                     | Depends on                                |
| --------------------------------------------- | -------------------------- | ----------------------------------------- |
| **Settle claim** (spec-220)                   | LIVE 2026-05-15            | (this page)                               |
| **Expire policy** (spec-221)                  | LIVE 2026-05-15            | spec-220 committee path                   |
| **MM rebate program v0**                      | Design locked, impl queued | spec-220 attestation                      |
| **Perp engine v0**                            | Design locked, impl queued | spec-220 attestation + Aegis price oracle |
| **Materios Oracle Network Phase 1**           | Design locked, impl queued | spec-220 committee + Aegis publishers     |
| **Compute portal Wave 3 (heterogeneous TEE)** | LIVE on attestation pallet | spec-220 committee path                   |

Every product line above re-uses the same committee, the same canonical-digest pattern, the same gateway aggregator, the same on-chain verification primitive. **One M-of-N path; many DeFi flows.**

***

## Comparison Frame

|                            | Materios intent-settlement            | Gummiworm (Sundae L2) | Generic bridge         |
| -------------------------- | ------------------------------------- | --------------------- | ---------------------- |
| Settlement decision        | M-of-N committee observation          | Off-chain archive     | Custodian / federation |
| Plutus parity              | No (Substrate runtime)                | Yes (planned)         | N/A                    |
| Cardano L1 anchor          | Periodic checkpoint (CIP-31 metadata) | Periodic archive      | Variable               |
| TEE attestation            | Optional (Wave 3 pallet, LIVE)        | None                  | None                   |
| MEV / BEV exposure         | Committee cannot front-run            | TBD                   | Custodian-dependent    |
| Throughput baseline (live) | \~250 TPS measured, 10k target        | TBD                   | Variable               |
| Autonomous settle witness  | YES (this page)                       | TBD                   | NO                     |

Materios targets intent flows that need **production-grade, attested, permissionless throughput** and can run on a Substrate-based runtime without Plutus parity.

***

## Architecture

### Pallets

* **`pallet-intent-settlement`** — owns `Vouchers`, `ClaimSettlementRequests`, `Intents`, `PolicyExpireRequests`. The `attest_settle` and `attest_expire_policy` extrinsics each require M-of-N committee sigs in a single envelope. No cross-call accumulation; threshold checked in one shot. (spec-220, spec-221)
* **`pallet-orinq-receipts`** — provides the M-of-N committee membership + sr25519 sig verifier used across all settlement paths. (Live since spec-219.)
* **`pallet-tee-attestation`** — vendored Acurast verifier for the Witness Network. Re-uses the same committee. Genesis kill-switch off; ARM TrustZone path live since 2026-05-13.

### Off-chain services

* **`services/blob-gateway`** — TypeScript Express server. New `/v2/multisig_sigs/{kind}/{key}` bulletin board (`kind` ∈ `settle` | `expire`) brokers sig sharing between cert-daemons. sr25519 verify on every POST, 24-hour TTL, defense-in-depth digest filter on GET.
* **`daemon/` (operator-kit)** — Python cert-daemon. Two new modules: `settle_claim_attestor.py` (spec-220 path) and `expire_policy_attestor.py` (spec-221 path). Both share the same multisig\_aggregator client and submit\_\*\_envelope methods.

### Trust assumptions

The committee threshold is governance-set. With M=2 today on a 2-active committee (Gemtek + Node-3), both must agree for any settlement to land. As the committee grows to N=4 (MacBook re-registration + Hetzner SPO pending), M=2 becomes 2-of-4 and gains 2 fault-tolerance. The cryptoeconomic gate per attestor (slashable bond) lands in the v2 rewards/slashing wave (#286 follow-on).

***

## Running a Committee Daemon

The cert-daemon is open source. Anyone can run it; the on-chain pallet is the gate:

1. Operator deploys `materios-operator-kit` cert-daemon container (image at `ghcr.io/flux-point-studios/materios-operator-kit:7c88e0456b6941030af4619b578b0a41ec3d1ed0` or later). Sets `BLOB_GATEWAY_URL` to point at the public Materios blob gateway.
2. Operator registers as a partner-chain candidate on Cardano L1 (IOG Partner Chains pallet flow). On Ariadne selection, their pubkey joins `CommitteeMembers`.
3. Operator funds a Kupo + Ogmios pair pointing at their own Cardano node. (Public Materios infrastructure includes a fallback, but independent observation is the point.)
4. Daemon starts polling, signing, peer-sharing. Refusals are logged at WARNING with the specific fact mismatch — operators can grep `settle_attestor: REFUSE` to audit any disagreement.

No bond, no whitelist, no committee admission tx today. The single gate is the partner-chain candidate selection on Cardano L1 — the same mechanism that gates Materios block production. As mainnet approaches, a slashable MATRA bond per attestor will be the second gate.

***

## Roadmap

| Phase                         | Quarter | Deliverable                                                                        |
| ----------------------------- | ------- | ---------------------------------------------------------------------------------- |
| **Spec-220** (settle path)    | Live    | Committee-attested settle, 8-fact verification, M-of-N envelope, Cardano L1 anchor |
| **Spec-221** (expire path)    | Live    | Symmetric attested-expire for stale intents                                        |
| **MON Phase 1** (oracle rail) | Q2 2026 | Aegis publishers post prices to Materios pallet-oracle as a second output rail     |
| **Perp engine v0**            | Q3 2026 | i128 positions, premium-index funding, pull-based oracle                           |
| **MM rebate program v0**      | Q3 2026 | 5M MATRA over 24 months, bonded-permissionless                                     |
| **Slashable attestor bond**   | Q3 2026 | Cryptoeconomic gate per committee member                                           |
| **Cross-chain intent dApp**   | Q4 2026 | First-party SDK for posting intents + watching settlements                         |

***

## On-chain Receipts

Verifiable today on preprod:

* **First autonomous ClaimSettled (spec-220)**: claim `0xe08c94624cdc3991b7715a7f7f5030e1946afb5187c8f67f29ef6898f00c2992` at Materios block **#200660**, Cardano tx `0xbb59881af429ad09ca0edead5a8d93acb37decabf83d6008f600fefbea2a8664`
* **First autonomous IntentExpired (spec-221)**: intent `0x8f4af94bb6aefaec5ca485d55d1a8068046130f29ba3e2d1d35640d17a09d03d` at Materios block **#201354**, event `IntentSettlement.IntentExpired { reason: PolicyExpiredOnCardano }`, evidence Cardano tx `0xbb59881af429ad09ca0edead5a8d93acb37decabf83d6008f600fefbea2a8664`
* **Earlier same-day settle demos** (manual aggregator pre-fix): claims `0xf9ef6b1f…`, `0xbab7a053…`, `0xfeb61d09…`, `0x2a675332…`
* **Spec-220 + spec-221 ceremonies** executed via multisig sudo 2-of-3 the same day

Anyone with a Materios RPC connection can independently verify every settlement: the pallet's rebuilt STCA digest, the M-of-N sigs, the Cardano tx existence at the pinned depth + slot, and the byte-exact `cardano_tx_hash` match. Nothing is taken on trust.

***

## Getting Involved

| You are a…           | Next step                                                                                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Cardano DeFi project | Open an issue at <https://github.com/Flux-Point-Studios/materios> with your intent shape — we'll work with you to map it onto the pallet                                    |
| SPO / validator      | Run a cert-daemon. See [SPO Onboarding](/materios-partner-chain/spo-onboarding)                                                                                             |
| Researcher / auditor | Read the spec-220 design memo + the on-chain pallet code at `pallets/intent-settlement` — the canonical STCA preimage is byte-pinned, the verification flow is one function |
| Integrator           | The off-chain SDK is `@fluxpointstudios/orynq-sdk-payer-materios-x402` — pay-per-use on the existing 402 middleware                                                         |
| Investor / partner   | <hello@fluxpointstudios.com> — the M-of-N committee is the substrate every Materios product compounds on                                                                    |

The intent-settlement pallet is the keel. Everything Materios ships in 2026 is a sail on it.


# Node Requirements

Hardware, software, keys, and infrastructure needed to run a Materios validator (SPO or permissioned), attestor, or full node on the preprod network.

> **🧪 Preprod is a public testnet, not mainnet.** Rewards on this network are paid in **tMATRA** — testnet tokens with no economic value. Running a preprod node is for testing the operator workflow and demonstrating uptime; it is not a revenue stream. Mainnet (with real MATRA + economic rewards) has not launched yet — see [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap).

Materios is a Cardano Partner Chain. Committee selection uses Ariadne with two tracks: a **permissioned-candidate allowlist** managed via partner-chains governance, and an **SPO-registered pool** weighted by preprod-ADA delegation. The current preprod D-parameter is `(15, 1)` — 15 permissioned seats, 1 SPO-registered seat. The registered seat is filled; the parameter is raised as more external SPOs register. **You can run a validator without being a Cardano SPO** by joining the permissioned-candidate list (see below).

There are four roles:

| Role                       | What it does                                                                                                                                                                                          | Requires Cardano SPO?                                                                                                                                                                                       |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SPO Validator**          | Produces blocks, votes on finality, signs attestations. Earns **tMATRA** (testnet, no economic value) on preprod; real MATRA after mainnet launch. Selected by Ariadne weighted by preprod-ADA stake. | **Yes** — register on Cardano preprod via `partner-chains-node smart-contracts register`.                                                                                                                   |
| **Permissioned Validator** | Same chain duties as SPO Validator. Same **tMATRA** preprod reward; same future mainnet earning curve. Selected from the operator-managed permissioned-candidate list.                                | **No** — submit your sidechain/Aura/Grandpa pubkeys to Flux Point Studios; we add you to the permissioned-candidates list via governance tx. No Cardano stake pool, no tADA, no 10-day stake-snapshot wait. |
| **Attestor**               | Verifies blobs and signs attestations. Earns **10 tMATRA** (testnet, no economic value) per certified receipt on preprod.                                                                             | No. Permissionless, one-liner install.                                                                                                                                                                      |
| **Full Node**              | RPC + archive / read-only peer.                                                                                                                                                                       | No.                                                                                                                                                                                                         |

See the [Operator Guide](/materios-partner-chain/operator-guide) for end-to-end setup flows.

## Current Network

| Field                   | Value                                                                                                                      |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Chain                   | `Materios Preprod v6`                                                                                                      |
| Chain ID                | `materios_preprod_v6`                                                                                                      |
| Genesis hash            | `0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf`                                                       |
| Cardano genesis UTXO    | `13313ea0119e0c4330f64f1809159064a371a1bbf2050b1fe13d5492280dca50#0`                                                       |
| spec\_version           | 211+ (live runtime upgrades; check `state_getRuntimeVersion`)                                                              |
| Block time              | 6 seconds                                                                                                                  |
| Session length          | 60 blocks (\~6 minutes)                                                                                                    |
| Cardano L1              | Preprod testnet                                                                                                            |
| Main-chain epoch length | 5 days                                                                                                                     |
| D-parameter             | `(15, 1)` — 15 permissioned seats, 1 SPO-registered seat (preprod). The registered bucket grows as external SPOs register. |
| Public RPC (WSS)        | `wss://materios.fluxpointstudios.com/preprod-rpc`                                                                          |
| Explorer                | [fluxpointstudios.com/materios/explorer](https://fluxpointstudios.com/materios/explorer)                                   |

> **🔁 v6 chain reset, 2026-04-28.** Preprod was reset from v5 to v6 to fix accumulated state issues. v5 registrations did NOT carry over — operators previously on v5 must re-onboard. The v5 → v6 incident notes are documented in our internal runbook.

The **15 permissioned seats** are filled from the partner-chains permissioned-candidate list. **External operators can apply for a permissioned seat** without becoming a Cardano SPO — see [Operator Guide → Permissioned Validator](/materios-partner-chain/operator-guide#permissioned-validator-non-spo). The **SPO-registered seat is live and filled** by an external Cardano SPO that self-registered on L1 with no FPS approval — that path is open to you today, see [SPO Onboarding](/materios-partner-chain/spo-onboarding). The registered bucket grows as more SPOs register.

## Static Asset Distribution

Everything an operator needs to download lives under `materios.fluxpointstudios.com`:

| Asset                                   | URL                                                                                                                      | sha256                     |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
| Bootstrap installer (canonical)         | [`releases/bootstrap-validator.sh`](https://materios.fluxpointstudios.com/releases/bootstrap-validator.sh)               | see SHA256SUMS             |
| Node binary v6 (x86\_64 Linux)          | [`releases/materios-node-v6-x86_64-linux`](https://materios.fluxpointstudios.com/releases/materios-node-v6-x86_64-linux) | `dda4f3a7…58ebc`           |
| Chain spec v6 (raw JSON)                | [`releases/chain-spec-v6-raw.json`](https://materios.fluxpointstudios.com/releases/chain-spec-v6-raw.json)               | `77877aa6…65aaa`           |
| Data snapshot (current rocksdb pointer) | [`operator-snapshots/preprod/latest.json`](https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json) | sha256 inside the manifest |
| SHA256SUMS manifest                     | [`releases/SHA256SUMS`](https://materios.fluxpointstudios.com/releases/SHA256SUMS)                                       | —                          |
| LICENSE files                           | [`/releases/`](https://materios.fluxpointstudios.com/releases/)                                                          | —                          |
| Releases index                          | [`releases/`](https://materios.fluxpointstudios.com/releases/) (directory listing)                                       | —                          |

**Always verify the sha256 of downloaded binaries against `SHA256SUMS`.**

> **The recommended path is `bootstrap-validator.sh`** — it handles binary download + verification + keystore seeding + systemd unit generation + validator startup in one command. See [Operator Guide → Permissioned Validator](/materios-partner-chain/operator-guide#permissioned-validator-non-spo) for the full walkthrough.

> **Data snapshot is required.** partner-chains-node v1.8.0 has a known historical-sync bug — fresh validators stall at block #0 (`Inherent error: Candidates inherent required`). Restore the **current** snapshot from [`operator-snapshots/preprod/latest.json`](https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json) (published hourly, sha256-verified) into the rocksdb directory immediately after the bootstrap script finishes. The tarball contains only `data/chains/materios_preprod_v6/db/` — no keystore, no peer-id keys. The one-page recipe with the post-sync divergence self-check is [Current-Snapshot Bootstrap](/materios-partner-chain/current-snapshot-bootstrap).

> **arm64 / macOS:** the native binary is x86\_64 Linux only. macOS operators either build from source (see [Operator Guide → Supported Environments](/materios-partner-chain/operator-guide#supported-environments) for the home-lab MacBook recipe) or run a Linux VM via UTM / Parallels / Hyper-V. Cert-daemon (attestor role) works natively on macOS via Docker Desktop.

> **glibc:** the binary is dynamically linked against glibc ≥ 2.38 (Ubuntu 22.04+ / Debian 12+ / RHEL 9+). Alpine / musl-libc systems are not supported.

## Hardware

Materios is lightweight. Most SPOs already run boxes that exceed these specs many times over for their Cardano node.

### SPO Validator and Permissioned Validator

The hardware spec is identical for both validator paths — same `materios-node` binary, same chain duties.

**Materios validator process alone** (the substrate node):

| Resource             | Minimum   | Recommended |
| -------------------- | --------- | ----------- |
| CPU                  | 2 vCPU    | 4 vCPU      |
| RAM                  | 4 GB      | 8 GB        |
| Disk (Materios data) | 40 GB SSD | 100 GB SSD  |

But you also need to run the **Cardano follower stack** on the same host — `cardano-node` (preprod) + `cardano-db-sync` + Postgres + Ogmios — because the Materios mainchain-follower reads committee state from your local db-sync via direct Postgres connection, not HTTP. That stack is **memory-heavy**. Realistic full-host requirements:

| Resource | Minimum (full stack)                                                                                   | Recommended (full stack) |
| -------- | ------------------------------------------------------------------------------------------------------ | ------------------------ |
| CPU      | 4 vCPU                                                                                                 | 8 vCPU                   |
| RAM      | **24 GB**                                                                                              | 32 GB                    |
| Disk     | **150 GB NVMe/SSD**                                                                                    | 250 GB NVMe/SSD          |
| Network  | 10 Mbps, inbound TCP 30333 reachable                                                                   | 100 Mbps                 |
| OS       | Native Linux x86\_64 + glibc ≥ 2.38 + systemd. Cloud VPS, bare-metal, or Hyper-V/VMware/VirtualBox VM. |                          |

Per-component memory budget (approximate, preprod):

| Component                                          | Typical RAM                                       |
| -------------------------------------------------- | ------------------------------------------------- |
| `cardano-node` (preprod block producer / follower) | 8–12 GB                                           |
| `cardano-db-sync`                                  | 4–6 GB                                            |
| Postgres (db-sync DB)                              | 4–8 GB (depends on `shared_buffers` / `work_mem`) |
| `ogmios`                                           | 0.5 GB                                            |
| `materios-node-spo` (the Materios validator)       | 1–2 GB                                            |
| OS + headroom                                      | 2 GB                                              |
| **Total realistic**                                | **\~20–28 GB**                                    |

Per-component disk budget (measured on the live preprod fleet, June 2026):

| Component                                | Disk                                           |
| ---------------------------------------- | ---------------------------------------------- |
| `cardano-node` chain db                  | \~18 GB                                        |
| db-sync Postgres database                | \~26 GB                                        |
| `materios-node-spo` chain data           | \~2 GB fresh, \~12 GB after weeks (cumulative) |
| Binaries, images, logs, snapshot staging | \~10–15 GB                                     |
| **Total day-one**                        | **\~60–70 GB**                                 |

The 150 GB minimum is not padding: a db-sync re-sync (version bump, rollback recovery) transiently needs a **second full Postgres database** alongside the old one, Postgres needs vacuum/WAL slack, and everything above grows with chain history. A 100 GB disk starts \~65% full and hits the wall on the first re-sync event.

**A 12 GB host will not work** — Postgres + db-sync + cardano-node alone routinely exceed that under preprod load and the OOM killer will reap one of them, taking the validator with it. A 16 GB host is marginal: it can hold steady-state but tends to OOM during initial db-sync catch-up unless you tune `shared_buffers` down and add swap. **Treat 24 GB as the real floor; Hetzner CPX51 (16 vCPU / 32 GB / 360 GB NVMe, \~€42/mo) or CCX33 (8 dedicated vCPU / 32 GB / 240 GB) is the comfortable spec.** x86\_64 only — the materios-node binary does not ship ARM builds, so skip the cheap Ampere/CAX tiers.

> **Cheaper option:** if you don't want to run the full Cardano stack yourself, use a hosted db-sync provider (TxPipe Dolos / Demeter.run / Blockfrost — check endpoint compatibility before committing). That lets you run materios-node-spo on a small host (4 vCPU / 8 GB / 40 GB SSD is plenty), with the Cardano-side state coming from the hosted provider over the network. Trade-off: dependency on a third party for L1 state.

> **Not supported:** WSL2, Docker Desktop running an amd64 Linux container on macOS or Windows, Alpine / musl-libc. The bootstrap script refuses to run on these. See [Operator Guide → Supported Environments](/materios-partner-chain/operator-guide#supported-environments) for the full list and recommended alternatives (UTM, Hyper-V, cloud VPS).

Observed preprod usage of the Materios validator process alone: \~800 MiB RAM, \~12 GB disk after several weeks, <1% average CPU. **Budget for growth** — chain history is cumulative.

The infrastructure differences between the two validator paths are:

* **SPO Validator:** runs cardano-node in *block-producer* mode (signing Cardano blocks), cardano-db-sync, Postgres, Ogmios, plus the Materios validator. Largest footprint; Cardano BP node is more memory-hungry than a passive follower.
* **Permissioned Validator:** runs cardano-node in *follower* mode (just consuming Cardano blocks), cardano-db-sync, Postgres, Ogmios, plus the Materios validator. Slightly lighter than SPO. **Or use a hosted db-sync provider** to avoid the Cardano stack entirely (recommended for low-budget operators).

### Separate requirement: cardano-db-sync

The Materios mainchain-follower reads Cardano preprod state from a **`cardano-db-sync` Postgres** that you provide. Choose one:

| Option                     | Good for                                               | Notes                                                                                                                                                                                                 |
| -------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Run your own**           | Operators who already run cardano-db-sync for preprod. | Lowest ops risk. See [IOG docs](https://github.com/IntersectMBO/cardano-db-sync).                                                                                                                     |
| **Use a managed provider** | Operators who don't want another stateful service.     | Public / paid options include [TxPipe Dolos](https://txpipe.io/), [Demeter.run](https://demeter.run/), [Blockfrost](https://blockfrost.io/) preprod (check endpoint compatibility before committing). |

The follower needs a direct Postgres connection to db-sync (not HTTP). If your provider only exposes HTTP/gRPC, it won't work — operators in this situation typically run db-sync themselves in a small VM.

Disk for db-sync is \~26 GB on preprod (measured June 2026) and grows with L1 history; keep room for a second full database during re-sync events.

### Ogmios

Required for **SPO registration** (`smart-contracts register`) and for the Materios node's Cardano RPC queries when running as an SPO. Either:

* run your own Ogmios pointed at your own cardano-node preprod, or
* use your db-sync provider's Ogmios endpoint if they expose one.

**Permissioned validators don't need Ogmios** unless they also plan to register as an SPO later. You can add it any time without restarting the node.

### Attestor

Standalone attestors only need the cert daemon (no Substrate node, no db-sync). One line to install:

| Resource | Minimum                                     |
| -------- | ------------------------------------------- |
| CPU      | 1 vCPU                                      |
| RAM      | 512 MB                                      |
| Disk     | 1 GB                                        |
| Network  | Outbound HTTPS + WSS only; no inbound ports |
| OS       | Linux, macOS, or Windows with Docker        |

See [Operator Guide → Attestor](/materios-partner-chain/operator-guide#attestor-permissionless).

## Network Ports

| Port          | Direction       | Purpose                                 | Who opens it                                                                                                                   |
| ------------- | --------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **30333/tcp** | Inbound         | libp2p P2P                              | SPO validators + full nodes. Must be reachable from `bootnode.materios.fluxpointstudios.com` (the public bootnode dials back). |
| **9945/tcp**  | Localhost       | JSON-RPC (HTTP + WS) for status queries | Everyone running a node; **never expose publicly**                                                                             |
| **9615/tcp**  | Localhost / LAN | Prometheus metrics                      | Optional                                                                                                                       |

A validator with RPC exposed to the public internet (`--rpc-external`, `--unsafe-rpc-external`, or `--rpc-methods unsafe` on a reachable address) is a misconfiguration and will be treated as such.

## Keys

An SPO validator holds three sets of keys. **All are generated locally — none of them ever leave your machine.**

| Key set       | Purpose                                                                             | Algorithm         | Format                                           |
| ------------- | ----------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------ |
| **Sidechain** | Partner-chain identity. Binds your SPO registration to a specific Materios account. | secp256k1 (ECDSA) | 64-char hex (compressed 33-byte pubkey → 66 hex) |
| **Aura**      | Block authoring slot key.                                                           | sr25519           | SS58 + hex                                       |
| **Grandpa**   | Finality voting.                                                                    | ed25519           | SS58 + hex                                       |

The Partner Chains CLI (`partner-chains-node wizards generate-keys`, v1.8.0 binary) produces all three in one step plus a keystore directory the bootstrap script will pre-seed. See the [Operator Guide → Generate Materios validator keys](/materios-partner-chain/operator-guide#1-generate-materios-validator-keys). Note: the original IOG `input-output-hk/partner-chains` repo was [archived 2026-04-23](https://github.com/input-output-hk/partner-chains#warning-archived); upstream development moved into [`midnightntwrk/midnight-node`](https://github.com/midnightntwrk/midnight-node) under the new name `midnight-node-toolkit`. **The v1.8.0 binary remains the correct CLI for current Materios preprod** — it's the version Materios's runtime is built against. Don't substitute newer toolkit versions without coordination.

The bootstrap script (`bootstrap-validator.sh`) reads the JSON files in `~/materios-keys/` and pre-seeds the substrate keystore automatically. Manual `author_insertKey` is no longer required. You **do not** need to send the private keys to us — only the *public* portions, which we register on the Cardano-side permissioned-candidates list (or which you submit yourself in your SPO registration).

**Your sidechain private key authorizes your committee seat.** Losing it means your registration is effectively abandoned until you re-register with a new key. Back the mnemonic up offline.

## Runtime overrides — not needed on v6

v6 ships with the IDP-None fallback, Ariadne output deduplication, GRANDPA queue-depth guard (W-5 prevention), and other operational patches **baked into the on-chain runtime** (spec\_version 211+). The `--wasm-runtime-overrides` flag is no longer required. Operators on v5 used to need a separate override WASM file; that path is retired.

Future runtime upgrades (spec\_version bumps) are deployed via the standard Substrate `authorize_upgrade` + `apply_authorized_upgrade` flow, coordinated by the multisig sudo. As an operator you don't need to do anything for these — your node picks up the new runtime from the chain itself.

## Registration Requirements

### SPO Validator path

Before you can submit `smart-contracts register`, your Cardano preprod SPO needs:

* A registered stake pool (`stake-pool-registration-certificate` on-chain).
* **Active stake delegation** to that pool. Ariadne reads from the 2-epoch-stable snapshot, so your delegation must be live for at least **2 full preprod epochs (\~10 days)** before you can be selected.
* Preprod tADA for:
  * Pool pledge + registration deposit (covered by normal SPO setup — not Materios-specific).
  * `smart-contracts register` transaction (\~3 tADA).
  * `smart-contracts register` consumes one UTXO from your pool payment address as the `--registration-utxo`; leave a small unused UTXO there.

Detailed flow: [Operator Guide → SPO Validator](/materios-partner-chain/operator-guide#spo-validator).

### Permissioned Validator path

**No Cardano stake pool, no tADA, no 10-day stake-snapshot wait.** You generate Materios keys locally and send the *public* portions to Flux Point Studios. We submit a Cardano-side `upsert-permissioned-candidates` tx adding your sidechain pubkey to the partner-chains permissioned-candidates policy; you become eligible at the next stable mc\_epoch boundary (typically \~3 hours, not 2 Cardano epochs).

What you submit to FPS:

* Sidechain (ECDSA) public key — 66-char hex.
* Aura (sr25519) public key — 64-char hex.
* Grandpa (ed25519) public key — 64-char hex.
* A label / contact (Discord handle is fine).

Private keys never leave your host. The pubkeys are public on-chain anyway once you're selected.

Detailed flow: [Operator Guide → Permissioned Validator](/materios-partner-chain/operator-guide#permissioned-validator-non-spo).

## Faucet Access

For the on-chain tx fees your Materios node needs once it's running (MATRA → MOTRA for the few extrinsics the operator-kit submits on your behalf), the preprod faucet auto-drips the node operator account when your cert daemon first registers.

No approval or whitelist — the gateway dedups on SS58, so each validator account gets exactly one drip.

## Chain Spec

Chain spec is served with CORS enabled so operators can curl it directly:

```
curl -o chain-spec.json https://materios.fluxpointstudios.com/releases/chain-spec-v6-raw.json
```

(The bootstrap script fetches this for you — only do this manually if you're not using `bootstrap-validator.sh`.)

Pin by verifying the genesis hash on first start:

```
expected_genesis=0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf
```

`chain_getBlockHash(0)` on your synced node must match.

## Bootnodes

```
/dns4/bootnode.materios.fluxpointstudios.com/tcp/30333/p2p/12D3KooWPueKoxRAirTTKH4Y2qQAsJDegWMjS4k89Z7izCbZKgkM
```

One bootnode is enough to discover the rest. More bootnodes may be added as SPO validators come online; additions are published to this page.

## Monitoring

### Health

```bash
curl -s -X POST http://localhost:9945 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"system_health"}'
```

Fields: `peers`, `isSyncing`, `shouldHavePeers`.

### Finality

Healthy = finalized trails best by ≤ 3 blocks. Any gap > 10 persisting for more than a minute is suspicious; check peer connectivity first and our [explorer](https://fluxpointstudios.com/materios/explorer) to see if the whole network is gapping or just you.

### Prometheus

`--prometheus-port 9615 --prometheus-external` exposes Substrate's standard metric set at `http://<node>:9615/metrics`. Bind it to LAN only unless you're happy to publish.

### Watchdog

We run a chain-level watchdog that pages Discord on finality stalls > 5 minutes. If something breaks at the network level, we'll know. For SPO-local alerting, wire Prometheus to your existing paging stack.

## Syncing

Preprod genesis → tip is fast (minutes on an SSD). During sync your node reports `isSyncing: true` and won't produce blocks even if it's in the committee. Insert Aura + Grandpa + sidechain keys **after** sync completes — not before.

## Platform Support

| Platform                                              | Validator   | Attestor | Path                                                                                                                                              |
| ----------------------------------------------------- | ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Linux x86\_64 (native, cloud VPS, bare metal)         | ✅           | ✅        | `bootstrap-validator.sh`                                                                                                                          |
| Linux arm64                                           | ⚠️          | ✅        | Build validator from source — see [materios](https://github.com/Flux-Point-Studios/materios) `Dockerfile`. Attestor multi-arch image works as-is. |
| Hyper-V / VMware / VirtualBox VM running native Linux | ✅           | ✅        | Same as native Linux                                                                                                                              |
| macOS arm64                                           | 🛠 (manual) | ✅        | Validator: build from source + launchd; recipe is validated only on home LAN. Attestor: Docker Desktop.                                           |
| macOS x86\_64 (Rosetta)                               | ❌           | ✅        | Rosetta-translated libp2p drops peers; Attestor (multi-arch image) still works.                                                                   |
| Windows + WSL2                                        | ❌           | ✅        | WSL2 NAT breaks libp2p P2P; bootstrap script refuses. Use Hyper-V Linux VM instead. Attestor (Docker Desktop on WSL2) still works.                |
| Windows + Hyper-V Linux VM                            | ✅           | ✅        | Treat as native Linux                                                                                                                             |
| Alpine / musl-libc                                    | ❌           | ⚠️       | Validator binary is glibc-linked; bootstrap refuses.                                                                                              |

See [Operator Guide → Supported Environments](/materios-partner-chain/operator-guide#supported-environments) for the rationale on each row. Pre-built arm64 binaries will be published when there's an SPO who needs them. Open an issue on [materios](https://github.com/Flux-Point-Studios/materios) if that's you.

## Troubleshooting

| Symptom                                                                                                                            | Likely cause                                                                   | Fix                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Validator stuck at block #0 with `Inherent error: Candidates inherent required: committee needs to be stored one epoch in advance` | Known partner-chains-1.8.0 historical-sync bug                                 | Apply the v6 data snapshot — see [Operator Guide → Permissioned Validator step 4](/materios-partner-chain/operator-guide#4-apply-the-v6-data-snapshot)                                 |
| 0 peers immediately after start (peers connect briefly then drop)                                                                  | Running on WSL2 / Docker Desktop on macOS / aggressive NAT                     | WSL2 NAT breaks libp2p — move to native Linux or a Hyper-V/UTM Linux VM. See [Operator Guide → Supported Environments](/materios-partner-chain/operator-guide#supported-environments). |
| 0 peers on a real Linux host                                                                                                       | Firewall blocking inbound TCP 30333                                            | `sudo ufw allow 30333/tcp` + check NAT + cloud-provider security group; confirm with `nc -zv <your-public-ip> 30333` from a different network                                          |
| `isSyncing` stuck                                                                                                                  | Wrong chain spec or all bootnodes unreachable                                  | Verify genesis hash matches `0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf`; re-check bootnode                                                                    |
| Not producing blocks (but in committee)                                                                                            | Keystore not seeded, or pre-seeded against the wrong chain ID                  | Confirm `~/materios-preprod/data/chains/materios_preprod_v6/keystore/` has 3 files (one per scheme). Re-run `bootstrap-validator.sh` if not.                                           |
| Cert-daemon `Heartbeat rejected: 403 {"error":"Validator not registered"}`                                                         | Gateway's api\_keys registry doesn't have your SS58 (e.g. after a chain reset) | Contact Flux Point Studios to re-register your SS58                                                                                                                                    |
| Finality gap growing                                                                                                               | Your validator's GRANDPA vote isn't reaching peers                             | Check outbound network, clock skew (`timedatectl`), db-sync freshness                                                                                                                  |
| `Inability to pay some fees`                                                                                                       | Account out of MOTRA                                                           | Wait for a few blocks (MATRA auto-mints MOTRA); or request a faucet drip                                                                                                               |
| `State already discarded` in cert-daemon logs                                                                                      | Cert-daemon cursor is older than the node's pruning window                     | Wipe `daemon-state.json`, restart daemon                                                                                                                                               |

## Source

Chain + runtime: [`Flux-Point-Studios/materios`](https://github.com/Flux-Point-Studios/materios) Operator kit (attestor, monitoring): [`Flux-Point-Studios/materios-operator-kit`](https://github.com/Flux-Point-Studios/materios-operator-kit)

Both are public. The same binary you download from `/releases/` is built from the `main` branch.


# Operator Guide

Overview of how to run a Materios partner-chain validator. Lead with the trustless SPO path; permissioned and attestor paths covered briefly with links.

> **Preprod is a public testnet.** Rewards on this network are paid in **tMATRA** (test tokens, no economic value). See [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap) for the path to real-MATRA rewards.

A Materios validator is a Substrate node that produces blocks and signs finality for the Materios partner-chain, with committee membership rotated each Cardano `mc_epoch` (\~5 days on preprod) by IOG's Ariadne selection algorithm. Settlement anchors back to Cardano L1; rewards accrue on Materios.

## Paths to validate

| Path                            | Who it's for                             | Onboarding                                                                                   | Time to first block                                                                              |
| ------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **Trustless SPO** *(canonical)* | Anyone with a Cardano preprod stake pool | Register a candidate tx on Cardano L1 binding your pool to a sidechain key. No FPS approval. | One `mc_epoch` boundary after your registration's snapshot becomes `set` — \~10 days on preprod. |
| Permissioned                    | Vetted operators on the FPS allowlist    | Send three pubkeys to FPS; we submit `upsert-permissioned-candidates`.                       | \~3 hours after the Cardano tx lands.                                                            |
| Attestor                        | Anyone                                   | One-line installer, runs `cert-daemon` only — does not run a Materios node.                  | Immediate.                                                                                       |

**The trustless SPO path is the right answer for new operators.** Skip the FPS approval loop, own your registration end-to-end, and earn the same rewards as a permissioned validator once selected. The permissioned path exists for the initial backbone and stays available for vetted partners; new operators should not request it.

If you don't have a Cardano stake pool, you have two options: register one (the [SPO Onboarding](/materios-partner-chain/spo-onboarding) recipe is end-to-end including the pool itself), or run an attestor instead (no Cardano-side prerequisite, attestation rewards only).

## Hardware

Minimum for a self-hosted stack (cardano-node + db-sync + Postgres + Ogmios + materios-node on one host):

* **4 vCPU**
* **8 GB RAM**
* **NVMe SSD, ≥ 100 GB** (db-sync alone grows past 40 GB on preprod)
* **Inbound TCP 30333** reachable from the public internet (bootnode dial-back + peer gossip)
* **glibc ≥ 2.38**, systemd, x86\_64 Linux (Ubuntu 22.04/24.04 LTS or Debian 12)

Hetzner CX52 (\~€21/mo) is the floor. Do not attempt on a 4-GB host — Postgres + db-sync + cardano-node will OOM-kill each other under preprod load.

Hosted db-sync (TxPipe Dolos, Demeter.run, Blockfrost) cuts the requirement to **4 vCPU / 8 GB / 40 GB** because cardano-node and Postgres move off-host.

**Not supported:** WSL2 (NAT breaks libp2p), Docker Desktop amd64-on-arm64 (Rosetta breaks libp2p noise handshake), Alpine / musl-libc (glibc-linked binary).

## Timeline

| Day                          | Action                                                                   |
| ---------------------------- | ------------------------------------------------------------------------ |
| **0**                        | Register Cardano preprod stake pool (skip if already registered).        |
| **0**                        | Generate Materios sidechain/aura/grandpa keys.                           |
| **0**                        | Submit partner-chain candidate registration tx on Cardano L1.            |
| **+2 epochs (\~10 days)**    | Stake snapshot becomes `set`; Ariadne starts considering your candidate. |
| **Next `mc_epoch` boundary** | First selection cycle. If drawn, your node enters `currentCommittee`.    |
| **+\~6s per slot**           | You produce your first block.                                            |

Probability of being drawn each epoch is your active delegated stake divided by the total stake of all registered candidates, weighted by the D-parameter's registered-bucket count. The current preprod D-parameter is `(15, 1)` — 15 permissioned + 1 registered seat.

## Next step

For the concrete step-by-step recipe, see [SPO Onboarding](/materios-partner-chain/spo-onboarding).

For chain spec, ports, and per-component memory budgets, see [Node Requirements](/materios-partner-chain/node-requirements).

## Attestor (permissionless)

Anyone can run an attestor; no Cardano-side prerequisite, no Materios validator node, no approval step. The cert-daemon polls Materios for new receipts, verifies blob integrity, signs an attestation, and submits on-chain. Each attestation that helps a receipt cross the threshold pays 10 tMATRA.

```bash
curl -sSL https://raw.githubusercontent.com/Flux-Point-Studios/materios-operator-kit/main/install.sh \
  | bash -s -- --mode attestor --label my-attestor-01
```

Requirements: Docker 20+, 1 vCPU, 512 MB RAM, 1 GB disk, outbound HTTPS+WSS. macOS / Windows + Docker Desktop both work for the attestor role (the image is multi-arch).

Full details, double-clickable installers, and operating commands: [materios-operator-kit](https://github.com/Flux-Point-Studios/materios-operator-kit).

## Permissioned validator (legacy / FPS-vetted)

If you have a standing arrangement with Flux Point Studios — partner SPO, ecosystem grantee, or invited operator — the permissioned path is faster: send your three pubkeys, we submit a Cardano-side `upsert-permissioned-candidates` tx, and your node is eligible \~3 hours later.

Generate keys with `partner-chains-node wizards generate-keys`, DM the three pubkeys to FPS, then run the bootstrap script:

```bash
curl -fsSL https://materios.fluxpointstudios.com/releases/bootstrap-validator.sh -o bootstrap-validator.sh
curl -fsSL https://materios.fluxpointstudios.com/releases/SHA256SUMS | grep bootstrap-validator.sh
sha256sum bootstrap-validator.sh   # must match
chmod +x bootstrap-validator.sh

sudo -E ./bootstrap-validator.sh \
  --operator-label <your-label> \
  --db-sync 'postgres://<user>:<pw>@127.0.0.1:5432/cexplorer' \
  --ogmios ws://127.0.0.1:1337 \
  --aura-pubkey 0x<your-aura-pub>
```

The script downloads the v6 binary, seeds the keystore, restores the latest snapshot from `https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json`, writes a systemd unit, and starts the validator.

New operators: **prefer the trustless SPO path.** It puts you in control of your own onboarding without an FPS bottleneck.

## Rewards

| Pool             | Reserve (mainnet design)                                                                                               | Per-event reward                                  | Earners                              |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
| Block production | 115M MATRA ([Validator Emissions](/materios-partner-chain/cmatra-token-merger#network-incentives-reserve-sub-buckets)) | Per-block credit, distributed at era end (\~24 h) | Validators (SPO + permissioned)      |
| Attestation      | 65M MATRA ([Attestor Emissions](/materios-partner-chain/cmatra-token-merger#network-incentives-reserve-sub-buckets))   | 10 per certification per signer, instant          | All signers (validators + attestors) |

On preprod the same pools mint tMATRA at the same rates. tMATRA is not exchangeable; preprod participation is for operational hardening and leaderboard credit ahead of mainnet.

## Security

* Mnemonics are generated locally and never leave your host.
* Session keys live only in your node's local keystore.
* Bind node RPC to 127.0.0.1; do not use `--rpc-external` on a public IP.
* Cardano cold keys never leave your SPO host; FPS tooling never asks for them.

## Getting help

* Chain / runtime issues: [Flux-Point-Studios/materios](https://github.com/Flux-Point-Studios/materios/issues)
* Operator-kit / attestor: [Flux-Point-Studios/materios-operator-kit](https://github.com/Flux-Point-Studios/materios-operator-kit/issues)
* Cardano-side registration: [preprod.cexplorer.io](https://preprod.cexplorer.io/)
* Live committee + leaderboard: [explorer](https://fluxpointstudios.com/materios/explorer)


# SPO Onboarding

Trustless registration recipe — bind a Cardano preprod stake pool to a Materios sidechain identity, get selected by Ariadne, and run a validator.

> **Preprod is a public testnet.** Rewards are paid in **tMATRA** (no economic value). See [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap) for the path to real-MATRA rewards.

This recipe takes a Cardano preprod SPO from zero to a producing Materios validator. No FPS approval is required; selection is driven by Ariadne over your Cardano-side stake.

## Prerequisites

* A **registered Cardano preprod stake pool**. If you don't have one yet, follow the [official Cardano SPO course](https://cardano-course.gitbook.io/cardano-course/handbook) on preprod (testnet-magic 1) before continuing. You'll come back here with `cold.skey`, `vrf.skey`, `kes.skey`, `op.cert`, a payment address, and a registered pool ID.
* **\~100 tADA** in the pool's payment address (\~3 tADA for the registration UTXO + buffer for fees).
* **Linux host:** 4 vCPU, 8 GB RAM, NVMe SSD, ≥ 100 GB free, Ubuntu 22.04/24.04 LTS or Debian 12, inbound TCP 30333 reachable from the internet. Not WSL2, not Alpine, not Docker Desktop's amd64 emulation. See [Operator Guide → Hardware](/materios-partner-chain/operator-guide#hardware) for why.
* **Outbound** HTTPS to `materios.fluxpointstudios.com` and `github.com`.

You'll also need a synced Cardano preprod stack:

* `cardano-node` on preprod (testnet-magic `1`)
* `cardano-db-sync` writing to Postgres
* `ogmios` exposing `ws://<host>:1337`

A managed provider (TxPipe Dolos, Demeter.run, Blockfrost) is an acceptable substitute for db-sync + Ogmios; you still need a local `cardano-cli`-capable wallet for the registration tx.

## Chain parameters

These values are stable for the lifetime of the v6 preprod chain. Hard-code them in your scripts.

| Field                            | Value                                                                                                             |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Cardano network                  | preprod (testnet-magic `1`)                                                                                       |
| **Genesis UTXO**                 | `13313ea0119e0c4330f64f1809159064a371a1bbf2050b1fe13d5492280dca50#0`                                              |
| Partner-chain genesis hash       | `0x0e46e33f639a56cc8780fd871d9a15e16d99af248526f907cb560cb40849f7bf`                                              |
| Governance authority hash        | `0x680a93dd4deb4873fc0aa31678eb02c57258717953ffc9a654b0af78` (single key, threshold 1)                            |
| CommitteeCandidate validator     | `addr_test1wrld9uhaepas48twjy3qevncsyrhjdqnkz2wzu4yzjc2qhq24f4v4`                                                 |
| PermissionedCandidates validator | `addr_test1wzyzwx0kcdgs2hc8t5w0d3g4l7s2qhvv2qcyws0m8sypwxgghu099`                                                 |
| D-parameter                      | `(15, 1)` — 15 permissioned + 1 registered                                                                        |
| Chain spec                       | `https://materios.fluxpointstudios.com/releases/chain-spec-v6-raw.json`                                           |
| Latest data snapshot             | `https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json`                                    |
| Public bootnode                  | `/dns4/bootnode.materios.fluxpointstudios.com/tcp/30333/p2p/12D3KooWPueKoxRAirTTKH4Y2qQAsJDegWMjS4k89Z7izCbZKgkM` |

Convenience env vars (used throughout):

```bash
export GENESIS_UTXO="13313ea0119e0c4330f64f1809159064a371a1bbf2050b1fe13d5492280dca50#0"
export CANDIDATES_ADDR="addr_test1wrld9uhaepas48twjy3qevncsyrhjdqnkz2wzu4yzjc2qhq24f4v4"
export OGMIOS_URL="ws://127.0.0.1:1337"
export PAYMENT_SKEY=/path/to/your/pool/payment.skey
export COLD_SKEY=/path/to/your/pool/cold.skey
```

## 1. Provision Postgres for cardano-db-sync

Partner-chains queries db-sync's Postgres on every block import. The defaults are too small, and one missing index will stall your validator.

Create the partner-chains index before starting materios-node:

```bash
psql "$DB_SYNC_CONNECTION_STRING" -c \
  "CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_ma_tx_out_ident ON ma_tx_out(ident);"
```

The index takes 2-5 min to build on a fresh db-sync. If materios-node starts before it completes, every block import takes 2.5s+ and your peers will drop you.

Apply the tuning baseline (`/etc/postgresql/15/main/postgresql.conf`, adjust path for your version):

```
shared_buffers = 2GB
effective_cache_size = 6GB
work_mem = 64MB
maintenance_work_mem = 1GB
random_page_cost = 1.1
effective_io_concurrency = 200
```

Then `sudo systemctl restart postgresql && psql "$DB_SYNC_CONNECTION_STRING" -c "ANALYZE;"`. Scale up proportionally on larger hosts.

Full background, diagnostics, and slow-sync recovery: [OPERATOR\_KIT.md → Postgres prerequisites](https://github.com/Flux-Point-Studios/materios/blob/main/docs/OPERATOR_KIT.md#postgres-prerequisites-for-cardano-db-sync).

## 2. Download the partner-chains CLI

The IOG `partner-chains-node` v1.8.0 binary handles key generation, signature production, and registration submission. Materios's runtime is pinned to v1.8.0 — do not substitute a newer toolkit version.

```bash
curl -sSLo partner-chains-node \
  https://github.com/input-output-hk/partner-chains/releases/download/v1.8.0/partner-chains-node-v1.8.0-x86_64-linux
chmod +x partner-chains-node
sudo mv partner-chains-node /usr/local/bin/
partner-chains-node --version   # → 1.8.0-...
```

## 3. Generate Materios validator keys

The `wizards generate-keys` flow creates one 24-word mnemonic and derives all three Substrate keys from it (ECDSA sidechain, sr25519 aura, ed25519 grandpa), seeding the node keystore in one shot.

```bash
mkdir -p ~/materios-keys && cd ~/materios-keys
partner-chains-node wizards generate-keys
```

When the wizard prompts for a base path, answer `./data`. It writes three JSON files into `~/materios-keys/` and prints the three pubkeys:

```
sidechain (ECDSA)  : 0x<66-char-hex>
aura  (sr25519)    : 0x<64-char-hex>
grandpa (ed25519)  : 0x<64-char-hex>
```

**Back up the mnemonic offline immediately.** Losing it means re-registering on Cardano.

Extract the hexes you'll pass to the next steps:

```bash
SIDECHAIN_PUB=$(jq -r '.publicKey' sidechain.json)   # 66-char hex
AURA_PUB=$(jq -r '.publicKey' aura.json)             # 64-char hex
GRANDPA_PUB=$(jq -r '.publicKey' grandpa.json)       # 64-char hex
```

### Manual sidechain-key derivation

If you'd rather derive the secp256k1 key yourself (e.g. importing an existing 32-byte hex secret), the public key is the compressed-point encoding:

```python
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import serialization

sk_hex = "<your 32-byte secret hex, no 0x prefix>"
sk = ec.derive_private_key(int(sk_hex, 16), ec.SECP256K1())
pk = sk.public_key().public_bytes(
    encoding=serialization.Encoding.X962,
    format=serialization.PublicFormat.CompressedPoint,
)
print("0x" + pk.hex())   # 33-byte compressed pubkey, 66 hex chars
```

The Substrate keystore wants the secret as the `secretSeed` field of `sidechain.json` (`0x`-prefixed 32-byte hex) and the corresponding public as the `publicKey` field. Write both before starting materios-node.

## 4. Pick a registration UTXO

The Cardano-side registration tx consumes one UTXO from your pool's payment address as a uniqueness nonce.

```bash
cardano-cli conway query utxo \
  --testnet-magic 1 \
  --address $(cat /path/to/pool/payment.addr) \
  --output-json | jq -r 'to_entries[0].key'

# Pick any UTXO with ≥ 3 tADA:
export REGISTRATION_UTXO="<txhash>#<ix>"
```

If your address has only one large UTXO, split off a small one first (`cardano-cli conway transaction build` against your own address).

## 5. Sign the registration

This step is fully offline-capable: it produces signatures from your Cardano cold key and your sidechain ECDSA key, bound to the `GENESIS_UTXO` + `REGISTRATION_UTXO` pair so they can't be replayed.

Strip the CBOR prefix from your cold key (cardano-cli wraps the 32-byte scalar in a CBOR `5820` byte-string):

```bash
COLD_SKEY_RAW=$(jq -r '.cborHex' "$COLD_SKEY" | sed 's/^5820//')
SIDECHAIN_SKEY=$(jq -r '.secretSeed' ~/materios-keys/sidechain.json | sed 's/^0x//')

partner-chains-node registration-signatures \
  --genesis-utxo "$GENESIS_UTXO" \
  --registration-utxo "$REGISTRATION_UTXO" \
  --mainchain-signing-key "$COLD_SKEY_RAW" \
  --sidechain-signing-key "$SIDECHAIN_SKEY" \
  > phase-a.json

cat phase-a.json
```

Output:

```json
{
  "spo_public_key":       "0x...",
  "spo_signature":        "0x...",
  "sidechain_public_key": "0x...",
  "sidechain_signature":  "0x..."
}
```

## 6. Submit the registration

```bash
SPO_PUB=$(jq -r '.spo_public_key'        phase-a.json)
SPO_SIG=$(jq -r '.spo_signature'         phase-a.json)
SIDE_SIG=$(jq -r '.sidechain_signature'  phase-a.json)

partner-chains-node smart-contracts register \
  --genesis-utxo "$GENESIS_UTXO" \
  --registration-utxo "$REGISTRATION_UTXO" \
  --ogmios-url "$OGMIOS_URL" \
  --payment-key-file "$PAYMENT_SKEY" \
  --partner-chain-public-keys "${SIDECHAIN_PUB}:${AURA_PUB}:${GRANDPA_PUB}" \
  --spo-public-key "$SPO_PUB" \
  --spo-signature "$SPO_SIG" \
  --partner-chain-signature "$SIDE_SIG"
```

Successful output ends with `Transaction submitted. ID: <txhash>`. Record the txhash; you'll confirm it on Cardano next.

### Verify the registration landed

Registration is **immediate on Cardano L1**. The moment your tx is in a block you are registered — there is no pending state, and nothing on the Materios side has to accept it. The \~2-epoch wait everyone hears about is Ariadne **seating** ([step 9](#9-wait-for-the-stake-snapshot)), which is a separate thing that happens after you're already registered.

Your registration is a UTxO at the CommitteeCandidate validator (`$CANDIDATES_ADDR`, from [Chain parameters](#chain-parameters)) whose inline datum embeds your `spo_public_key`.

**What the checks below do and don't tell you.** Each one answers exactly this: *is there an unspent UTxO at the candidates address whose datum contains my public key?* That is the thing that goes wrong in practice — a tx that never landed, or a registration you later replaced — so a clean result is the signal you want before you start waiting on [step 9](#9-wait-for-the-stake-snapshot).

It is not a validity proof. The candidates address is a **permissionless script address**: anyone can pay a UTxO there carrying any datum they like, and these checks only substring-match your key inside the datum bytes. They do not verify your SPO or sidechain signatures, do not confirm the datum is well-formed, and do not confirm Ariadne will accept the registration. Only the chain decides that, and it tells you by seating you. If all three checks look right and you are still unseated well past E+2, the [troubleshooting table](#troubleshooting) is the next stop — not a re-registration.

> **Don't use `partner-chains-node registration-status` or `ariadne-parameters`.** Both fail on Materios with:
>
> ```
> Application(Execution(Other("Exported method CandidateValidationApi_validate_registered_candidate_data is not found")))
> ```
>
> The reason is specific, and worth stating precisely because the obvious sanity-check appears to contradict it. Neither command talks to your running node. Both take `--chain <CHAIN_SPEC>`, build a throwaway **genesis** state from the WASM embedded in that chain spec, and call the runtime API there. The genesis runtime inside `chain-spec-v6-raw.json` does not export `CandidateValidationApi`, so the call fails before any registration is examined.
>
> The **live** runtime is a different binary and *does* export it — a runtime upgrade added it after genesis. So if you query the chain directly (`state_getRuntimeVersion`, or the exports of the on-chain `:code`) you will find `CandidateValidationApi` present and conclude these commands should work. They still won't: they never load the live runtime. Fixing this needs a re-issued chain spec, not a runtime upgrade.
>
> Your registration and your odds of selection are unaffected either way — the running node validates candidates over its own internal path, not this CLI. Use a check below instead.

**A — your own db-sync** (you already run one, [step 1](#1-provision-postgres-for-cardano-db-sync)):

```bash
SPO_PUB_HEX=$(jq -r '.spo_public_key' phase-a.json | sed 's/^0x//')

psql "$DB_SYNC_CONNECTION_STRING" -X -v ON_ERROR_STOP=1 \
  -v addr="$CANDIDATES_ADDR" -v spo="$SPO_PUB_HEX" <<'SQL'
SELECT encode(tx.hash, 'hex') || '#' || txo.index AS registration_utxo,
       NOT EXISTS (SELECT 1 FROM tx_in ti
                    WHERE ti.tx_out_id    = txo.tx_id
                      AND ti.tx_out_index = txo.index) AS unspent
  FROM tx_out txo
  JOIN tx      ON tx.id = txo.tx_id
  JOIN datum d ON d.id  = txo.inline_datum_id
 WHERE txo.address = :'addr'
   AND encode(d.bytes, 'hex') LIKE '%' || :'spo' || '%';
SQL
```

One row with `unspent = t` is the answer you want: registered, current. Zero rows means the tx is not on Cardano — look up your txhash on [preprod.cexplorer.io](https://preprod.cexplorer.io/). `unspent = f` means that registration was later replaced or deregistered.

**B — Koios**, if you use a managed Cardano provider and have no local db-sync:

```bash
curl -s -X POST https://preprod.koios.rest/api/v1/address_utxos \
  -H 'content-type: application/json' \
  -d "{\"_addresses\":[\"$CANDIDATES_ADDR\"],\"_extended\":true}" \
| jq -r --arg k "$(jq -r '.spo_public_key' phase-a.json | sed 's/^0x//')" \
     '.[] | select(((.inline_datum.bytes) // "") | contains($k)) | "\(.tx_hash)#\(.tx_index)"'
```

One line back means you are registered and that UTxO is current. No output means no unspent registration carrying your key.

The `// ""` is load-bearing — don't drop it. The candidates address is permissionless, so a UTxO posted by anyone else may carry no inline datum at all; without the fallback `jq` aborts the whole pipeline on that entry (`null and string cannot have their containment checked`) and, if the datum-less UTxO sorts before yours, prints **nothing at all** — a false "not registered" for a perfectly good registration.

Note the scope: `address_utxos` returns only **unspent** UTxOs, so this check cannot distinguish "you never registered" from "your registration was spent — replaced or deregistered". Both look like empty output. If you get no output and you know your tx landed on Cardano, use check **A** (its `unspent` column tells the two apart) or **C**, or look the txhash up on [preprod.cexplorer.io](https://preprod.cexplorer.io/) and see whether the output has been consumed.

**C — the explorer**, no tooling at all. Open

```
https://materios.fluxpointstudios.com/materios/explorer/spo-journey/<SIDECHAIN_PUB>
```

with your `0x`-prefixed sidechain pubkey from [step 3](#3-generate-materios-validator-keys). It runs check A server-side and renders the whole path — registered → selected → authoring → liveness → finality — so it also answers steps 9 and 10.

Download the chain spec now; step 8 needs it in place:

```bash
curl -fsSL https://materios.fluxpointstudios.com/releases/chain-spec-v6-raw.json \
  -o ~/chain-spec-v6-raw.json
```

## 7. Restore the latest data snapshot

partner-chains-node v1.8.0 has a known historical-sync bug: a fresh node stalls at block 0 with `Inherent error: Candidates inherent required`. The fix is to import a rocksdb snapshot from a synced node.

The latest snapshot is published hourly; older ones are pruned after 48h. Read the manifest, restore, verify:

```bash
mkdir -p ~/materios-preprod/data/chains
cd ~/materios-preprod

# Fetch the manifest and pull the current tarball
MANIFEST=$(curl -fsSL https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json)
TARBALL_URL=$(echo "$MANIFEST" | jq -r .url)
EXPECTED_SHA=$(echo "$MANIFEST" | jq -r .sha256)

curl -fLo snapshot.tar.gz "$TARBALL_URL"
echo "${EXPECTED_SHA}  snapshot.tar.gz" | sha256sum -c -

tar xzf snapshot.tar.gz && rm snapshot.tar.gz
```

The tarball contains only `data/chains/materios_preprod_v6/db/` — no keystore, no peer-id keys, so your validator identity stays yours.

## 8. Start materios-node

The bootstrap script handles binary download, SHA verification, keystore wiring, snapshot restore (if not already done), and systemd unit. The snapshot restore in [step 7](#7-restore-the-latest-data-snapshot) is the authoritative manual fallback — if the script's restore is ever skipped or fails, your node will genesis-replay and stall at block 0, so do step 7 by hand and re-run with `--skip-snapshot`:

```bash
curl -fsSL https://materios.fluxpointstudios.com/releases/bootstrap-validator.sh -o bootstrap-validator.sh
curl -fsSL https://materios.fluxpointstudios.com/releases/SHA256SUMS | grep bootstrap-validator.sh
sha256sum bootstrap-validator.sh   # must match
chmod +x bootstrap-validator.sh

sudo -E ./bootstrap-validator.sh \
  --operator-label <your-pool-ticker> \
  --db-sync 'postgres://<user>:<pw>@127.0.0.1:5432/cexplorer' \
  --ogmios "$OGMIOS_URL" \
  --aura-pubkey 0x"$AURA_PUB"
```

If you build your own systemd unit instead, the validator must run with:

```
materios-node-spo \
  --chain ~/materios-preprod/chain-spec-v6-raw.json \
  --base-path ~/materios-preprod/data \
  --validator \
  --name <your-pool-ticker> \
  --port 30333 \
  --rpc-port 9945 \
  --public-addr /ip4/<YOUR.PUBLIC.IP>/tcp/30333 \
  --bootnodes /dns4/bootnode.materios.fluxpointstudios.com/tcp/30333/p2p/12D3KooWPueKoxRAirTTKH4Y2qQAsJDegWMjS4k89Z7izCbZKgkM
```

`--public-addr` is required for SPOs. Without it, peers can't dial you back and the blocks you author won't gossip.

Verify health:

```bash
curl -s -X POST http://127.0.0.1:9945 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"system_health"}'
```

Expect `isSyncing: false` and `peers ≥ 1` within a couple of minutes of starting (snapshot floor is the published `head_block_at_publish`; you should sync past it to the live tip).

### Post-sync divergence self-check

Once synced, confirm you landed in the **canonical** GRANDPA room, not a divergent fork. Fetch the network's finalized `{number, hash}` and compare your local block hash at that height:

```bash
NET=$(curl -fsSL https://materios.fluxpointstudios.com/chain-info)
H=$(echo "$NET" | jq -r .finalized_block)
HNET=$(echo "$NET" | jq -r .finalized)   # network's finalized hash at H

# Ask YOUR node for its block hash at the network's finalized height
HLOCAL=$(curl -s -X POST http://127.0.0.1:9945 \
  -H 'content-type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"chain_getBlockHash\",\"params\":[$H]}" | jq -r .result)

if [ "$HLOCAL" = "$HNET" ]; then
  echo "CANONICAL room ✓ (local $H == network $HNET)"
else
  echo "DIVERGENT room ✗ — local $HLOCAL != network $HNET; re-restore from the snapshot (step 7) and restart"
fi
```

Compare at the **network's** finalized height — your local node may still be a few blocks behind. A `null` local result just means you haven't reached `H` yet; wait and re-run. A non-null hash that differs is a real fork: wipe `data/chains/materios_preprod_v6/db/`, re-restore the snapshot, and restart.

## 9. Wait for the stake snapshot

Ariadne reads the **2-epoch-stable** Cardano stake snapshot. Your registration becomes selectable two preprod epochs (\~10 days) after the epoch it was included in.

| Cardano epoch | What's happening                                                       |
| ------------- | ---------------------------------------------------------------------- |
| E             | Registration tx included.                                              |
| E+1           | Stake snapshot captured (`mark`).                                      |
| E+2           | Snapshot becomes `set` → Ariadne considers you from this epoch onward. |

There is nothing to submit and nothing to retry during this window. Your registration is already final on L1 — re-run [the verify check](#verify-the-registration-landed) any time to confirm it's still there and unspent. All that changes at E+2 is that Ariadne starts counting you.

To watch the transition, open your [SPO journey page](#verify-the-registration-landed) (check C) and wait for the **selected** milestone to light up.

`ariadne-parameters` fails the same way `registration-status` does — it runs the same genesis runtime from the chain spec, which doesn't export `CandidateValidationApi`. See the note in [step 6](#verify-the-registration-landed).

## 10. Verify selection

At the next Materios `mc_epoch` boundary after your snapshot becomes `set`, Ariadne runs a fresh committee draw. With the current D-parameter `(15, 1)` you compete with other SPOs for 1 registered seat; probability is proportional to your active delegated stake.

Watch the [explorer Committee tab](https://fluxpointstudios.com/materios/explorer) — your SS58 (derived from your sidechain pubkey) shows up when selected.

Or query directly. The call returns the committee SCALE-encoded, so match your own sidechain pubkey against it:

```bash
COMMITTEE=$(curl -s -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"state_call","params":["SessionValidatorManagementApi_get_current_committee","0x"]}' \
  https://materios.fluxpointstudios.com/preprod-rpc | jq -r .result)

case "$COMMITTEE" in
  *"${SIDECHAIN_PUB#0x}"*) echo "SEATED — you are in the current committee" ;;
  *)                       echo "not seated yet" ;;
esac
```

Once you're in `currentCommittee`, Aura assigns slots automatically. Your validator starts producing blocks \~6s per assigned slot; rewards accrue per block + per attestation.

## 11. Operating

| Task           | Command                                                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Logs           | `sudo journalctl -u materios-node-spo -f`                                                                                                   |
| Restart        | `sudo systemctl restart materios-node-spo`                                                                                                  |
| Peer count     | `curl -s -X POST http://127.0.0.1:9945 -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"system_health"}'`          |
| Finalized head | `curl -s -X POST http://127.0.0.1:9945 -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"chain_getFinalizedHead"}'` |
| Upgrade binary | Re-run `bootstrap-validator.sh` (idempotent — fetches the new SHA-verified binary, restarts the unit)                                       |

### Show your stats in the explorer (optional)

Your validator shows a green **Producing** badge in the explorer as soon as it authors blocks — that comes straight from the chain and needs nothing extra. But **Best Block / Fin. Gap / Version / Uptime** read `—` for a node-only validator, because those come from a heartbeat that a cert-daemon normally sends. If you want those columns filled, run the **lite-heartbeat** — a \~120-line Python client that reads those stats from your node's RPC and posts them signed with your aura key. It only reports liveness; it can't upload data or spend anything, and your key never leaves the box.

No sign-up needed — the gateway accepts heartbeats from any active committee member automatically (being seated on-chain is the enrollment; expect a 403 until your first committee selection).

```bash
pip install substrate-interface
cd /opt && sudo curl -fsSLO https://materios.fluxpointstudios.com/releases/materios-lite-heartbeat.py
curl -s https://materios.fluxpointstudios.com/releases/SHA256SUMS | grep lite-heartbeat.py | sha256sum -c   # -> OK

# test one beat (points at your node's keystore dir; nothing secret is typed or stored):
ONESHOT=1 AURA_KEYSTORE_DIR=/path/to/base-path/chains/<chain-id>/keystore \
  python3 materios-lite-heartbeat.py            # expect: ... -> OK {"status":"ok",...,"auth_tier":"sig-only"}
```

Within \~30s your explorer row fills in. To run it continuously, grab the systemd unit + env template alongside it:

```bash
sudo curl -fsSLo /usr/local/bin/materios-lite-heartbeat.py https://materios.fluxpointstudios.com/releases/materios-lite-heartbeat.py
sudo curl -fsSLo /etc/systemd/system/materios-lite-heartbeat.service https://materios.fluxpointstudios.com/releases/materios-lite-heartbeat.service
curl -fsSL https://materios.fluxpointstudios.com/releases/lite-heartbeat.env.example | sudo tee /etc/materios-lite-heartbeat.env >/dev/null   # then edit: set AURA_KEYSTORE_DIR + NODE_PROC + VALIDATOR_LABEL (your explorer display name)
sudo systemctl daemon-reload && sudo systemctl enable --now materios-lite-heartbeat
```

Set `NODE_PROC` in the env file to your node's process name (default `partner-chains-node`) so uptime reports correctly. These stats are display-only — your real liveness and finality are proven on-chain by the blocks you author, heartbeat or not.

### KES renewal

Cardano KES op-certs expire \~every 9 days on preprod. Re-issue with a fresh KES period and restart your `cardano-node`; no Materios-side action is needed (your partner-chain registration is independent of KES).

```bash
CURRENT_KES=$(cardano-cli conway query tip --testnet-magic 1 \
  --socket-path /ipc/node.socket | jq -r '.slot / 129600 | floor')

cardano-cli conway node issue-op-cert \
  --kes-verification-key-file kes.vkey \
  --cold-signing-key-file cold.skey \
  --operational-certificate-issue-counter-file cold.counter \
  --kes-period "$CURRENT_KES" \
  --out-file op.cert
```

### Rotating Materios keys

Submit a fresh `smart-contracts register` with new keys. The old registration stays on-chain until you call `smart-contracts deregister`. Wait 2 epochs after the new tx before expecting selection with the rotated keys.

### Going offline

If selected but offline, the slots you would have minted go unclaimed and your Grandpa vote is absent — no slashing on preprod. Finality stays healthy while 2f+1 of the committee is online. Drop out of Ariadne's pool entirely by stopping your Cardano pool (depledge, missed snapshot) or calling `smart-contracts deregister`.

## Troubleshooting

| Symptom                                                                                                                                            | Cause                                                                                                                                                                                                                                                                                                                            | Fix                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Node stuck at block 0, log says `Inherent error: Candidates inherent required`                                                                     | Fresh DB without snapshot                                                                                                                                                                                                                                                                                                        | Apply the snapshot per [step 7](#7-restore-the-latest-data-snapshot)                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Node stalls below tip, peers loop on "Banned, disconnecting"                                                                                       | Your node is requesting a historical range the FPS nodes can't serve, and gets scored as a repeat-requester and banned. Reputation decays in \~69s, it reconnects, re-requests the same range, and is re-banned — so it idles at a fixed height with 0-1 peers. This is on our side, not yours, and no peer-list change fixes it | Restore the **current** snapshot per [step 7](#7-restore-the-latest-data-snapshot) — landing at tip skips the ranges that trigger it, and forward-sync from there is clean. Do **not** add `--reserved-only`: it removes your ability to route around a banned peer and turns a transient ban into permanent isolation. Background: [OPERATOR\_KIT.md → Sync stuck at snapshot floor](https://github.com/Flux-Point-Studios/materios/blob/main/docs/OPERATOR_KIT.md#sync-stuck-at-snapshot-floor--peer-ban-loop) |
| `sqlx::query: slow statement ... elapsed=2.5s` in node logs + repeated peer drops                                                                  | Postgres missing `idx_ma_tx_out_ident` or untuned                                                                                                                                                                                                                                                                                | Re-run [step 1](#1-provision-postgres-for-cardano-db-sync)                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `registration-signatures` errors on `mainchain-signing-key`                                                                                        | Didn't strip the `5820` CBOR prefix from cold.skey                                                                                                                                                                                                                                                                               | `jq -r '.cborHex' cold.skey \| sed 's/^5820//'`                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `smart-contracts register` fails with `UTxO already spent`                                                                                         | Your `$REGISTRATION_UTXO` was consumed between prep + submit                                                                                                                                                                                                                                                                     | Pick a fresh UTXO; re-sign (same sidechain / SPO keys are fine)                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `registration-status` or `ariadne-parameters` errors with `Exported method CandidateValidationApi_validate_registered_candidate_data is not found` | Both commands run the **genesis** runtime embedded in `chain-spec-v6-raw.json`, which doesn't export that API. The live runtime does export it, but these commands never load the live runtime — see the note in [step 6](#verify-the-registration-landed)                                                                       | Nothing is wrong with your registration. Use the db-sync / Koios / explorer check in [step 6](#verify-the-registration-landed)                                                                                                                                                                                                                                                                                                                                                                                   |
| The [step 6](#verify-the-registration-landed) check returns zero rows minutes after submit                                                         | Your registration tx never made it onto Cardano                                                                                                                                                                                                                                                                                  | Look the txhash up on [preprod.cexplorer.io](https://preprod.cexplorer.io/). If it's absent, re-run [step 6](#6-submit-the-registration) with a fresh `$REGISTRATION_UTXO`                                                                                                                                                                                                                                                                                                                                       |
| You registered before, the tx is on Cardano, but [step 6](#verify-the-registration-landed) now finds nothing                                       | That registration UTxO has been spent — replaced by a later registration, or deregistered                                                                                                                                                                                                                                        | Use check **A** (`unspent = f` proves this) or check **C**. Check **B** cannot tell you this: Koios `address_utxos` returns only unspent UTxOs, so a spent registration and a missing one both come back empty. Re-register with a fresh `$REGISTRATION_UTXO` if you didn't intend to replace it                                                                                                                                                                                                                 |
| Registration is unspent on L1 but you're not in the committee                                                                                      | Normal for the first \~2 epochs — registration is immediate, Ariadne seating is not                                                                                                                                                                                                                                              | Confirm the \~10-day window in [step 9](#9-wait-for-the-stake-snapshot) has elapsed, then see the next row                                                                                                                                                                                                                                                                                                                                                                                                       |
| Registered and past E+2 but never selected                                                                                                         | Stake too low vs other pools, or the registered bucket is already filled                                                                                                                                                                                                                                                         | Grow your pool's stake or wait for variance; D-parameter is `(15, 1)` today                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Validator at peers=0 on a real Linux host                                                                                                          | Inbound TCP 30333 unreachable                                                                                                                                                                                                                                                                                                    | Open 30333/tcp on your firewall + cloud security group; confirm with `nc -zv <your-public-ip> 30333` from another network                                                                                                                                                                                                                                                                                                                                                                                        |
| Finality gap > 10 in explorer authority-lag panel                                                                                                  | Committee under-quorum or your node behind                                                                                                                                                                                                                                                                                       | Compare your `chain_getFinalizedHead` to the explorer's — if you're the lagger, restart; if the chain is the lagger, check Discord for an active incident                                                                                                                                                                                                                                                                                                                                                        |

Full sync diagnostics, RPC reference, and recovery playbooks: [OPERATOR\_KIT.md](https://github.com/Flux-Point-Studios/materios/blob/main/docs/OPERATOR_KIT.md).

## Getting help

* Materios Discord: open a `#support-ticket`
* Chain explorer: [fluxpointstudios.com/materios/explorer](https://fluxpointstudios.com/materios/explorer)
* Issue tracker: [Flux-Point-Studios/materios-operator-kit](https://github.com/Flux-Point-Studios/materios-operator-kit/issues)
* Preprod faucet: [docs.cardano.org/cardano-testnets/tools/faucet](https://docs.cardano.org/cardano-testnets/tools/faucet)


# Current-Snapshot Bootstrap

One-page verified rocksdb restore for a returning Materios preprod validator — fetch the current snapshot, sha256-verify, restore, point at the live bootnode, and confirm you're in the canonical GRAND

This is the hand-off recipe for a returning external validator (Draupnir, TrueAiData, Runir, or any operator re-joining after downtime). It does one thing: get your node onto the **current** preprod state without genesis-replaying into a stall or a divergent fork.

> **Why you need this.** partner-chains-node v1.8.0 has a historical-sync bug — a fresh node genesis-replays and stalls at block 0 with `Inherent error: Candidates inherent required`. Worse, a node that replays from an old database can finalize into a **divergent GRANDPA room** that never re-merges. The cure for both is to restore the published rocksdb snapshot, then prove you landed in the canonical room.

## 1. Restore the current snapshot

The snapshot is published hourly and sha256-verified. Read the manifest, pull the tarball, verify, restore:

```bash
mkdir -p ~/materios-preprod/data/chains
cd ~/materios-preprod

# Pull the current pointer
MANIFEST=$(curl -fsSL https://materios.fluxpointstudios.com/operator-snapshots/preprod/latest.json)
TARBALL_URL=$(echo "$MANIFEST" | jq -r .url)
EXPECTED_SHA=$(echo "$MANIFEST" | jq -r .sha256)

echo "$MANIFEST" | jq '{url, sha256, size_bytes, head_block_at_publish, published_at}'

# Download + verify before touching your data dir
curl -fLo snapshot.tar.gz "$TARBALL_URL"
echo "${EXPECTED_SHA}  snapshot.tar.gz" | sha256sum -c -   # MUST print "snapshot.tar.gz: OK"

# Restore only on a clean checksum
tar xzf snapshot.tar.gz && rm snapshot.tar.gz
```

The tarball contains only `data/chains/materios_preprod_v6/db/` — no keystore, no peer-id keys. Your validator identity stays yours. If the `sha256sum -c -` line does not print `OK`, stop: the download is corrupt or the manifest moved under you. Re-fetch the manifest and retry.

> **Re-restoring over an existing DB:** if you already have a stalled or divergent database, wipe it first — `rm -rf ~/materios-preprod/data/chains/materios_preprod_v6/db` — then untar. Leaving the old `db/` in place can leave you on the wrong fork.

## 2. Point at the live bootnode

There is exactly one reliable public bootnode. Use the DNS form — it tracks the node's WAN IP so it survives IP changes:

```
/dns4/bootnode.materios.fluxpointstudios.com/tcp/30333/p2p/12D3KooWPueKoxRAirTTKH4Y2qQAsJDegWMjS4k89Z7izCbZKgkM
```

Pass it on the command line:

```bash
materios-node-spo \
  --chain ~/materios-preprod/chain-spec-v6-raw.json \
  --base-path ~/materios-preprod/data \
  --validator \
  --name <your-label> \
  --port 30333 \
  --rpc-port 9945 \
  --public-addr /ip4/<YOUR.PUBLIC.IP>/tcp/30333 \
  --bootnodes /dns4/bootnode.materios.fluxpointstudios.com/tcp/30333/p2p/12D3KooWPueKoxRAirTTKH4Y2qQAsJDegWMjS4k89Z7izCbZKgkM
```

Do not use any `/ip4/...` bootnode address you may have from an older runbook — those egresses are dead. `--public-addr` is required for SPOs so peers can dial you back.

## 3. Post-sync divergence self-check

Restoring the snapshot is necessary but not sufficient — you must confirm you finalized into the **canonical** room. Compare your node's block hash at the network's finalized height against the network's hash at the same height:

```bash
NET=$(curl -fsSL https://materios.fluxpointstudios.com/chain-info)
H=$(echo "$NET" | jq -r .finalized_block)    # network's finalized height
HNET=$(echo "$NET" | jq -r .finalized)        # network's finalized hash at H

# Ask YOUR node for its block hash at the network's finalized height
HLOCAL=$(curl -s -X POST http://127.0.0.1:9945 \
  -H 'content-type: application/json' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"chain_getBlockHash\",\"params\":[$H]}" | jq -r .result)

if [ "$HLOCAL" = "$HNET" ]; then
  echo "CANONICAL room ✓  (local hash at $H == network $HNET)"
elif [ "$HLOCAL" = "null" ]; then
  echo "Not caught up yet — local node hasn't reached $H. Wait and re-run."
else
  echo "DIVERGENT room ✗  local=$HLOCAL  network=$HNET  → re-restore from step 1 and restart"
fi
```

**How to read it:**

* **Match** → you're in the canonical room. Done.
* **`null`** → your node simply hasn't synced up to `H` yet (the network tip moves while you sync). Wait a minute and re-run; this is not a fork.
* **Different non-null hash** → you finalized a different block at the same height as the network. That is a real divergent fork: wipe `data/chains/materios_preprod_v6/db`, re-restore from [step 1](#1-restore-the-current-snapshot), and restart.

Always compare at the **network's** finalized height (`H` from `/chain-info`), never at your local tip — your local node legitimately lags the network by a few blocks while catching up, and comparing at your own tip would give a false "diverged" reading.

## What "good" looks like

After restore + start, within a couple of minutes:

```bash
curl -s -X POST http://127.0.0.1:9945 \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"system_health"}'
```

Expect `peers ≥ 1` and `isSyncing` flipping to `false` once you pass the snapshot floor (`head_block_at_publish` from the manifest) and reach the live tip. Then run the [step 3](#3-post-sync-divergence-self-check) self-check — a `CANONICAL room ✓` is your green light to start producing.

For the full onboarding flow (keys, Cardano registration, Ariadne selection), see [SPO Onboarding](/materios-partner-chain/spo-onboarding). For hardware and network requirements, see [Node Requirements](/materios-partner-chain/node-requirements).


# Game Integration

How to add Materios chain-of-custody anti-cheat to your game

Materios provides **on-chain proof that a game score is real**. When a player finishes a run, your game client uploads the telemetry blob and submits a receipt to the Materios chain. A decentralized committee of attestors independently verifies the blob — and if it passes, the receipt is certified and anchored to Cardano L1.

This gives you tamper-proof, publicly auditable leaderboards with zero backend trust.

> **Permissionless by default.** Submitting receipts to Materios does not require an API key — any sr25519 keypair can sign and submit. Games need MATRA, which generates the MOTRA capacity that pays TX fees (free from the faucet on testnet). Blob uploads also use sr25519 signature auth with no API key. The **Orynq managed service** (API key) is an optional offering for studios that want Flux Point Studios to manage the full pipeline on their behalf.

***

## How It Works

```
Game Run Ends
    │
    ▼
Upload blob to Materios Blob Gateway
    │ (JSON telemetry: score, duration, fields...)
    ▼
Submit receipt to Materios chain
    │ (links receipt_id to content_hash)
    ▼
Cert daemon network verifies blob
    │ (fetch blob → integrity check → schema validation → sign attestation)
    ▼
Receipt certified on-chain (threshold met)
    │
    ▼
Checkpoint anchored to Cardano L1
    │ (Merkle root of certified receipts → Cardano metadata TX)
    ▼
Score is provably real — anyone can verify
```

***

## Step 1: Define Your Schema

Every game defines a **validation schema** that tells the attestor network what fields to expect and what bounds are plausible. Schemas live in the [schema registry](https://github.com/Flux-Point-Studios/materios/blob/main/cert-daemon/schemas/registry.json).

### Schema Format

```json
{
  "my_game_v1": {
    "game": "My Game Name",
    "version": 1,
    "description": "Run-complete payload for My Game",
    "fields": {
      "score":  { "type": "int",   "min": 0, "max": 1000000 },
      "level":  { "type": "int",   "min": 1, "max": 100 },
      "dur":    { "type": "float", "min": 1.0 },
      "player": { "type": "string" }
    },
    "computed_checks": [
      {
        "name": "score_rate",
        "condition": "dur > 0",
        "expr": "score / dur",
        "max": 500.0,
        "error": "Score rate implausible: {value:.1f}/s > {max}/s"
      }
    ]
  }
}
```

### Field Types

| Type     | Description   | Example                          |
| -------- | ------------- | -------------------------------- |
| `int`    | Integer value | `score`, `level`, `combo`        |
| `float`  | Decimal value | `dur` (seconds), `dist` (meters) |
| `string` | Text value    | `player` (address or ID)         |
| `bool`   | Boolean       | `completed`                      |

### Bounds

Each field can have optional `min` and `max` bounds. Values outside bounds cause the attestation to fail (the receipt is **not** certified).

### Computed Checks

For more sophisticated validation, computed checks evaluate expressions against field values:

| Property    | Description                                                         |
| ----------- | ------------------------------------------------------------------- |
| `name`      | Human-readable check name                                           |
| `expr`      | Arithmetic expression using field names (e.g., `score / dur`)       |
| `condition` | Optional guard — skip check if condition is false (e.g., `dur > 0`) |
| `max`       | Static maximum for the expression result                            |
| `max_expr`  | Dynamic maximum computed from fields (e.g., `(level * 100) * 1.1`)  |
| `error`     | Error message template with `{value}` and `{max}` placeholders      |

### Submitting Your Schema

Open a PR to the [materios](https://github.com/Flux-Point-Studios/materios) adding your schema to `cert-daemon/schemas/registry.json`, or contact the Materios team in [Discord](https://discord.gg/MfYUMnfrJM).

You will also need a version number assigned in the `schema_lookup` table:

```json
{
  "schema_lookup": {
    "1": "clay_monster_dash_v1",
    "2": "my_game_v1"
  }
}
```

***

## Step 2: Upload Blobs

When a game run ends, upload the telemetry as a JSON blob to the Materios Blob Gateway.

### Blob Format

Your blob must be valid JSON with at minimum:

```json
{
  "v": 2,
  "score": 4500,
  "level": 12,
  "dur": 45.3,
  "player": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
}
```

* `v` — **Required.** Schema version number (matches `schema_lookup` in the registry).
* All fields defined in your schema must be present.
* Additional fields are allowed and ignored by validation.

### Upload API

```bash
# 1. Upload the blob (sr25519 signature auth — no API key needed)
curl -X POST https://materios.fluxpointstudios.com/blobs/blobs \
  -H "Content-Type: application/json" \
  -H "X-Public-Key: YOUR_SR25519_PUBLIC_KEY" \
  -H "X-Signature: SR25519_SIGNATURE_OF_BODY" \
  -d '{
    "data": "{\"v\":2,\"score\":4500,\"level\":12,\"dur\":45.3,\"player\":\"5Grw...\"}",
    "content_type": "application/json"
  }'
```

Response:

```json
{
  "contentHash": "0xabcdef1234567890..."
}
```

The `contentHash` is a SHA-256 hash of the blob data. You need this for the on-chain receipt.

The blob gateway authenticates uploads via **sr25519 signature** — no API key is required. Sign the request body with your sr25519 keypair and include the public key and signature in headers.

> **Orynq managed service (optional):** Studios that prefer a managed pipeline can request an API key from the Materios team in [Discord](https://discord.gg/MfYUMnfrJM). The Orynq service handles blob uploads, receipt submission, and monitoring on your behalf.

***

## Step 3: Submit Receipt On-Chain

After uploading the blob, submit a receipt to the Materios chain linking the `receipt_id` to the `content_hash`.

### Using Polkadot.js SDK

```typescript
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";
import { blake2AsHex } from "@polkadot/util-crypto";

const api = await ApiPromise.create({
  provider: new WsProvider("wss://materios.fluxpointstudios.com/rpc"),
});

const keyring = new Keyring({ type: "sr25519" });
const signer = keyring.addFromUri("YOUR_STUDIO_MNEMONIC");

// Generate a unique receipt ID (or derive deterministically)
const receiptId = blake2AsHex(contentHash + Date.now().toString());

// Submit receipt (v2 with player signature for anti-cheat attribution)
await api.tx.orinqReceipts
  .submitReceiptV2(
    playerPubkey,     // Player's sr25519 public key (32 bytes)
    playerSignature,  // Player's signature over the telemetry (64 bytes)
    1,                // sig_type: 1 = sr25519
    receiptId,
    contentHash,
    baseRootSha256,
    null,             // zk_root_poseidon (optional)
    null,             // poseidon_params_hash (optional)
    baseManifestHash,
    safetyManifestHash,
    monitorConfigHash,
    attestationEvidenceHash,
    storageLocatorHash,
    schemaHash,
  )
  .signAndSend(signer);
```

### Hash Fields

Most hash fields can be set to a zeroed 32-byte array (`0x00...00`) during initial integration. The critical fields are:

| Field              | Required | Description                                            |
| ------------------ | -------- | ------------------------------------------------------ |
| `receipt_id`       | Yes      | Unique identifier for this game run                    |
| `content_hash`     | Yes      | SHA-256 of the blob (returned by the gateway)          |
| `base_root_sha256` | Yes      | Merkle root of the blob chunks                         |
| `schema_hash`      | Yes      | Hash of the schema used for validation                 |
| `player_pubkey`    | v2       | Player's public key for anti-cheat attribution         |
| `player_sig`       | v2       | Player's signature proving they produced the telemetry |

***

## Step 4: Wait for Certification

After the receipt is on-chain, the attestor network automatically:

1. Detects the new receipt via chain polling
2. Fetches the blob from the gateway using the `content_hash`
3. Verifies chunk integrity (SHA-256)
4. Validates the blob against your registered schema (field presence, types, bounds, computed checks)
5. Signs an attestation and submits it on-chain
6. Once threshold attestations are met (currently 2), the receipt is **certified**

Certified receipts are periodically flushed into a checkpoint Merkle tree and anchored to Cardano L1 as a metadata transaction.

### Checking Receipt Status

```bash
# Via RPC
curl -s -X POST https://materios.fluxpointstudios.com/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "orinq_getReceipt",
    "params": ["0xYOUR_RECEIPT_ID"]
  }'
```

A certified receipt will have a non-zero `availability_cert_hash`.

***

## Step 5: Read Certified Scores

### On-Chain Query

Use the Materios explorer or RPC to query certified receipts:

```bash
# Get receipt count
curl -s -X POST https://materios.fluxpointstudios.com/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"orinq_getReceiptCount","params":[]}'
```

### Cardano L1 Verification

Every checkpoint is anchored to Cardano as a metadata transaction. The checkpoint contains a Merkle root of all certified receipts in the batch. Anyone can:

1. Find the Cardano TX on a Cardano explorer
2. Extract the Materios checkpoint metadata
3. Verify the Merkle proof for any individual receipt
4. Confirm the receipt was certified by the Materios attestor network

This gives you **Cardano-grade finality** for game scores.

***

## Architecture Overview

```
┌──────────────┐     ┌──────────────────┐     ┌──────────────────┐
│  Game Client │────▶│  Blob Gateway    │     │  Materios Chain  │
│              │     │  (stores blobs)  │     │  (stores receipts│
│  Uploads blob│     └────────┬─────────┘     │   + attestations)│
│  Submits TX  │──────────────┼──────────────▶│                  │
└──────────────┘              │               └────────┬─────────┘
                              │                        │
                    ┌─────────▼──────────┐             │
                    │  Attestor Network  │◀────────────┘
                    │  (cert daemons)    │  polls for new receipts
                    │                    │
                    │  Fetches blob      │
                    │  Validates schema  │
                    │  Signs attestation │
                    └─────────┬──────────┘
                              │
                    ┌─────────▼──────────┐
                    │  Cardano L1        │
                    │  (anchor TXs)      │
                    │  Merkle checkpoint  │
                    └────────────────────┘
```

***

## Example: Clay Monster Dash (Reference)

Clay Monster Dash is the first game integrated with Materios. Its schema (v1) requires these fields:

| Field       | Type   | Constraints | Description           |
| ----------- | ------ | ----------- | --------------------- |
| `v`         | int    | `1`         | Schema version        |
| `score`     | int    | `>= 0`      | Final score           |
| `dist`      | float  | `>= 0`      | Distance in meters    |
| `dur`       | float  | `>= 3.0`    | Duration in seconds   |
| `crystals`  | int    | `>= 0`      | Crystals collected    |
| `combo`     | int    | `0-10`      | Max combo achieved    |
| `near_miss` | int    | `>= 0`      | Near-miss events      |
| `slides`    | int    | `>= 0`      | Slide events          |
| `diff`      | int    | `1-20`      | Difficulty level      |
| `peak_mult` | float  | `1.0-10.0`  | Peak score multiplier |
| `player`    | string | —           | Player identifier     |

Plausibility checks:

* **Speed**: `dist / dur` must be < 30 m/s
* **Crystal density**: `crystals / dist` must be < 0.65/m
* **Event density**: `(near_miss + slides) / dist` must be < 0.25/m
* **Score cap**: Score must be below a computed theoretical maximum based on distance, crystals, events, and peak multiplier

[View the Clay Monster Dash schema](https://github.com/Flux-Point-Studios/materios/blob/main/cert-daemon/schemas/registry.json)

***

## FAQ

### What happens if validation fails?

The receipt stays on-chain but is **not certified**. It's visible but ignored by any leaderboard that requires certification. There's no slashing or penalty — the score just doesn't get the Materios seal of approval.

### Can I update my schema?

Yes. Create a new schema version (e.g., `my_game_v2` with `"version": 2`), update the `schema_lookup`, and have your game client send `"v": 2` in new blobs. Old blobs with `"v": 1` continue to validate against the v1 schema.

### What if a field isn't in my schema?

Extra fields in the blob are ignored. Only fields defined in the schema are validated. This means you can include debug data, metadata, or future fields without breaking validation.

### How many attestors need to verify?

The current threshold is **2 of 10** committee members. This means at least 2 independent cert daemons from the 10-member committee must verify and sign before a receipt is certified. In practice, certification takes \~12 seconds.

### What does it cost?

* **Blob storage**: Free during testnet
* **Receipt submission**: Costs MOTRA (fee token), currently waived (min\_fee=0)
* **Attestation**: Free for game developers — attestors pay their own TX fees

### Can I run my own attestor?

Yes. Anyone can run a cert daemon and earn **tMATRA** (testnet tokens, no economic value) for every receipt they help certify on preprod. Real-MATRA economics start at mainnet — see [Mainnet Roadmap](/materios-partner-chain/mainnet-roadmap). See the [Attestor Guide](/materios-partner-chain/operator-guide#attestor-only) for the one-command setup.


# Witness Network

TEE-attested distributed uptime + probe network on consumer Android phones

The **Materios Witness Network** is a decentralized network of consumer Android phones that produce TEE-rooted attestations of off-chain facts — uptime probes, URL availability, certificate validity, version drift — and anchor every observation to the Materios chain.

Every observation is signed inside the phone's hardware-isolated secure element (Android KeyMint / StrongBox). The signing key's attestation challenge cryptographically commits to the observation payload, so the on-chain signature is **un-forgeable proof that this specific result came out of this specific device at this specific moment**.

It is the first public network where a $200 phone is a load-bearing piece of cryptographic infrastructure.

***

## Why This Exists

Centralized uptime monitoring (Pingdom, UptimeRobot, StatusCake) has three structural problems:

1. **A single operator decides what "up" means.** If their probes see a 200 and yours don't, the operator wins.
2. **No cryptographic provenance.** A status page screenshot is unfalsifiable in either direction.
3. **No skin in the game.** A monitor that misreports has no economic consequence.

The Witness Network inverts all three:

| Problem                  | Centralized monitor | Materios Witness Network                                     |
| ------------------------ | ------------------- | ------------------------------------------------------------ |
| Who decides "up"?        | The operator        | M-of-N independent phones                                    |
| Cryptographic provenance | None                | Android Key Attestation chain rooted at Google's hardware CA |
| Skin in the game         | None                | Slashable MATRA bond per attestor (v2)                       |

The same Android Key Attestation chain that banks use to gate sensitive operations is what gates a Witness Network attestor. A divergent attestation is provable on chain, in real time, by anyone.

***

## How It Works

```
Real-world event (URL probe, cert check, version fetch)
    │
    ▼
Phone's WitnessWorker executes the probe
    │ (HTTPS GET / DNS lookup / TLS handshake)
    ▼
Result + timestamp committed as Android KeyMint attestation challenge
    │ (KeyMint generates a fresh key whose attestation cert chain
    │  includes the challenge bytes — proof the result is bound to
    │  this exact key, which is bound to this exact device)
    ▼
Result + cert chain POSTed to Materios blob gateway
    │
    ▼
Gateway verifies the Android Key Attestation chain → Materios
    │ (root CA: Google; leaf: this device's KeyMint key)
    ▼
On-chain event: TeeAttestation::EvidenceVerified
    │ (binds the probe result to the device's attest_key_hash)
    ▼
Periodically anchored to Cardano L1 via the Materios checkpoint cadence
    │
    ▼
Anyone can verify, no trusted intermediary
```

***

## Live Status

The Witness Network is live on Materios preprod as of **2026-05-13**. Current state:

| Component                            | Status                                                                                                              |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| First TEE-attested probe on chain    | Block **#179467** (Pixel StrongBox), block **#180364** + #180370 + #180371 (Moto G TEE)                             |
| KeyMint signing algorithms supported | sr25519 (envelope), ed25519, **secp256r1 (KeyMint native, P-256, live 2026-05-14)**                                 |
| APK pairing                          | Self-registration via Android attestation cert chain; zero-touch onboarding                                         |
| Probe targets (today)                | `materios.fluxpointstudios.com`, `github.com`, `cardano.org` — configurable via gateway `/witness/targets` endpoint |
| Witness landing + dashboard          | <https://fluxpointstudios.com/materios/witness>                                                                     |
| Pallet on chain                      | `pallet-tee-attestation`, kill-switch OFF, multi-arch verifier (ARM TrustZone + AMD/Intel SGX stubs)                |

### What "live on chain" actually means

For the Moto G witness (`attest_key_hash = 0x0c4c6f81…`) the event chain in `IntentSettlement` storage looks like this:

```
TeeAttestation::EvidenceVerified {
  attestor: <Moto G's sr25519 envelope key>,
  attest_key_hash: 0x0c4c6f81…,
  evidence_type: arm_trustzone,
  composite_trust_score: 1,
}
```

And in `pallet-tee-attestation::CompositeTrustScores`:

```
CompositeTrustScores[0x0c4c6f81…] = 1
```

That's the on-chain proof that the device is a real ARM TrustZone phone, anchored to Google's root attestation CA, with no human-introduced trust. Any wallet, any explorer, any reader can verify.

***

## Cryptographic Chain of Custody

The thing that makes a Witness attestation un-spoofable is the chain that ties the probe result back to silicon. There are four links:

```
1. Google root attestation CA  (baked into every Android device at factory)
        │
        ▼
2. KeyMint TEE root key  (per-device, sealed in hardware, never leaves the SE)
        │
        ▼
3. Per-attestation leaf key  (freshly generated for THIS probe)
        │   ← attestation challenge bytes = blake2_256(probe_result || timestamp)
        ▼
4. Signature on the probe payload  (signed by the leaf key)
```

Every level is verifiable on chain. The Materios `pallet-tee-attestation` vendors the Acurast verifier and walks the cert chain to the Google root.

If any link is broken — counterfeit device, tampered KeyMint, replaying old attestations, or signing a payload the challenge doesn't commit to — the verifier rejects.

***

## How to Become a Witness

Witness onboarding is intentionally frictionless. You need:

* A modern Android phone with hardware-backed KeyMint (any device shipped after 2018 with API level ≥ 28)
* The Witness APK (download link on <https://fluxpointstudios.com/materios/witness>)
* An internet connection

### Install + self-register

1. **Scan the QR code at fluxpointstudios.com/materios/witness.** This deep-links the APK and pre-fills the gateway URL.
2. **Open the app, tap "Become a Witness".** The phone:
   * Generates a fresh KeyMint key for the device's witness identity
   * Builds an Android Key Attestation cert chain over it
   * POSTs the chain + a self-generated sr25519 envelope key to `https://materios.fluxpointstudios.com/preprod-blobs/v2/attestor_registration`
3. **Gateway verifies the cert chain** (Google root → device → KeyMint → leaf), creates the on-chain `pallet-tee-attestation::register_attestor` call, and the device is live.

End-to-end install-to-first-probe takes under 60 seconds in practice on a clean phone with no prior witness state.

### What the app does in the background

* Tick interval is configurable on the gateway side (currently 60s).
* Each tick fetches `/witness/targets` and runs every probe in that list.
* For each probe result, the app **generates a fresh KeyMint key** with an attestation challenge equal to `blake2_256(target_url || result || timestamp)`.
* Posts the result + cert chain to the gateway via the `attestation_evidence` route. The gateway accepts polyalg signatures (sr25519, ed25519, secp256r1 KeyMint-native).
* The on-chain event commits the result to chain state.

### Compensation

v1 ships in observe-only mode. v2 (Q3 2026) introduces:

* **MATRA reward emission** per attested probe
* **Slashable bond** for divergent attestations
* **Heat-map dashboard** ranking attestors by uptime + agreement

***

## What Else This Network Can Do

URL uptime is the first probe class. The architecture is general — anything a phone can observe and commit inside KeyMint is a viable Witness Network probe:

| Probe class                                        | Use case                                                       | Status    |
| -------------------------------------------------- | -------------------------------------------------------------- | --------- |
| HTTPS availability                                 | DEX frontend monitoring, infra SLAs                            | **LIVE**  |
| TLS certificate transparency                       | Detect cert-misissuance against your domain in real time       | Q3 2026   |
| Wallet RPC liveness                                | Independent monitoring of public Cardano + Materios RPCs       | Q3 2026   |
| Software version drift                             | Verify a specific git SHA is what's actually served at a URL   | Q4 2026   |
| Geographic latency probes                          | Edge-network performance baselines                             | Q4 2026   |
| Compliance auditing (jurisdiction-anchored attest) | Prove a piece of content was unavailable in region X at time T | Exploring |

***

## Network Effects

Every new Witness multiplies the network's value to the others:

* **More witnesses → more URLs covered → better-grained uptime maps.** Adding a phone in Manila doesn't dilute the network — it adds an observation point the others can't replicate.
* **More witnesses → harder to corrupt a result.** An adversary controlling 10% of witnesses can't move the threshold M-of-N reading. The cost of attack scales with N.
* **More witnesses → more MATRA demand.** v2 rewards scale with total network capacity, sized to keep marginal-witness incentives positive.

The network is permissionless. We don't gatekeep on country, carrier, device model, or operator identity. The TEE attestation is the gate.

***

## Architecture Deep Dive

### Pallets

* **`pallet-tee-attestation`** ([materios main, commit 1623de7](https://github.com/Flux-Point-Studios/materios/tree/main/pallets/tee-attestation)) — vendored Acurast verifier; ARM TrustZone path is the only path enabled in v1, AMD SEV-SNP / Intel TDX / build-attestation / ZK paths are stubs gated by Phase 2.5 onboarding.
* **`pallet-orinq-receipts`** (existing) — provides the M-of-N committee + cert chain for the on-chain registry of witnesses. Reused, not forked.
* **`pallet-intent-settlement`** (existing, post-spec-221) — same chain; settlement of attestation-class disputes ride on this.

### Off-chain services

* **Blob Gateway** (TypeScript, `services/blob-gateway`) — `/v2/attestor_registration` for onboarding, `/v2/attestation_evidence` for tick submission, `/witness/targets` for tick-time probe list, polyalg signature verification (sr25519 + ed25519 + secp256r1 KeyMint).
* **WitnessWorker APK** (Kotlin) — Android-side prober. KeyMint key generation, attestation cert chain construction, probe execution, gateway POST.
* **Cert daemon committee** — the same operator-kit committee that attests AvailabilityCert + ClaimSettlement; signs `TeeAttestation::EvidenceVerified` calls.

### Cross-chain

Periodic Materios checkpoints anchor to Cardano L1 via metadata-label-2222. A Witness probe at block #194467 is durably anchored to Cardano via the next Materios → Cardano anchor (typically within 5 minutes).

***

## Roadmap

| Phase                          | Quarter | Deliverable                                                                                                |
| ------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------- |
| **v1: Live**                   | Q2 2026 | TEE-attested URL probe, multi-arch verifier, APK self-registration, on-chain anchoring (DONE)              |
| **v2: Rewards + slashing**     | Q3 2026 | MATRA reward emission, slashable bond, divergent-attestation auto-dispute                                  |
| **v3: Probe diversity**        | Q4 2026 | TLS-CT, RPC liveness, version-drift, geographic-latency probes                                             |
| **v4: Subscriber API**         | Q1 2027 | Pay-per-query gateway over the witness dataset (consume from any chain via x402 or Cardano metadata)       |
| **v5: Federated sub-networks** | Q2 2027 | Domain-scoped witness pools (e.g. "all Manila witnesses", "all Pixel 9+ witnesses") for SLO-shaped queries |

***

## Getting Involved

| You are a…                                        | Next step                                                                                                                              |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Android user with a spare phone                   | <https://fluxpointstudios.com/materios/witness> — scan + install the APK                                                               |
| Cardano project worried about an infra dependency | Open an issue at <https://github.com/Flux-Point-Studios/materios> proposing a probe class; we'll wire your URL into `/witness/targets` |
| Developer who wants to consume witness data       | The gateway's `/witness/observations` API is open + permissionless; pay-per-query lands in v4                                          |
| Investor / partner                                | <hello@fluxpointstudios.com> — the witness fleet is dual-use: same APK ships TEE-attested billing AND TEE-attested distributed QA      |

The Witness Network is one of the few places in Web3 where running unbalanced consumer hardware is a load-bearing role, not a tourist task. If you have a phone, you have a job.


# cMATRA Token Merger

Seven legacy Cardano assets are consolidating into cMATRA — the Cardano-side form of MATRA, the native network token of the Materios blockchain. This page covers the eligibility rules and redemption m

Seven legacy Cardano assets are being consolidated into **cMATRA**, the Cardano-side transitional token for [Materios](https://materios.fluxpointstudios.com). cMATRA is intended to converge into **MATRA**, the native network token of the Materios blockchain.

> **Before you redeem:** read the [Legal & Disclaimers](/materios-partner-chain/legal-and-disclaimers) and check the [Launch Readiness](/materios-partner-chain/launch-readiness) status board for the live launch date, audit posture, and support channel.

***

## What You Are Redeeming For

When you surrender a legacy asset, you are trading it in for one thing: **the network token of the Materios blockchain**. MATRA is to Materios what ADA is to Cardano — the asset that secures the chain, meters its capacity, and carries its governance.

* **Staking and delegation.** Holders can earn additional MATRA by delegating — to Cardano SPOs that participate in Materios cross-validation (Minotaur), and to Materios validators as mainnet staking rolls out — the same way ADA holders delegate to stake pools and earn block rewards. These rewards are **protocol block rewards paid by the network for securing it**, funded by the published Validator and Attestor Emissions schedules. They are not payments from Flux Point Studios and not a share of any company's revenue.
* **Network capacity.** Holding MATRA generates [MOTRA](/materios-partner-chain/faq#6-what-is-motra), the non-transferable capacity token that pays transaction fees — so using the network never requires spending the network token itself.
* **Governance.** MATRA is the transferable, stakeable governance asset of the Materios chain as its governance decentralizes.

### Why one network token

Flux Point's early ecosystem spread utility across seven separate assets — two fungible tokens and five NFT collections, each with its own bolted-on perks. That chapter is closed. The merger consolidates everything into a single asset with a single job: **MATRA is the utility token of the Materios blockchain, and its utility is the network itself.** There are no revenue-sharing programs, no app-by-app reward schemes, and no Cardano-side staking program for cMATRA. Hold it to use the chain, delegate it to help secure the chain and earn block rewards, and vote with it as governance opens up.

***

## Quick Facts

| Item                       | Value                                           |
| -------------------------- | ----------------------------------------------- |
| Output token               | cMATRA / MATRA                                  |
| Max supply                 | 1,000,000,000                                   |
| Decimals                   | 6                                               |
| Network Incentives Reserve | 277,500,000 (27.75%)                            |
| Public Redemption Pool     | 722,500,000 (72.25%)                            |
| Public window              | 6 months from launch                            |
| Public model               | Surrender legacy assets, receive cMATRA         |
| Snapshot role              | Audit baseline, not normal fungible entitlement |

***

## Included Assets

### Fungible Tokens

| Token  | Policy ID                                                  | Decimals |
| ------ | ---------------------------------------------------------- | -------: |
| AGENT  | `97bbb7db0baef89caefce61b8107ac74c7a7340166b39d906f174bec` |        0 |
| SHARDS | `ea153b5d4864af15a1079a94a0e2486d6376fa28aafad272d15b243a` |        6 |

### NFT Collections

| Collection                   | Policy ID                                                  | Redeemable Count |
| ---------------------------- | ---------------------------------------------------------- | ---------------: |
| Flux Point Team Pass         | `0889a2d542897f0c7eefed47d2d809bd8d8ec78881bd4ff9464f683a` |              401 |
| SE Brawlers                  | `25c75bbf105310685d51cd3adbdd50b72fdbd99be2cc3757dde7eafc` |              242 |
| Brawl Pass: Enter the Dragon | `d3a197c4814054623432c882c60e6a81e8f3b94158033432529a02d2` |               44 |
| T1 ADAM Launch Pass          | `b46891456b77dbc77c16090fd92a37f087f9a68e953c56b00a20332f` |               43 |
| T2 ADAM Launch Pass          | `06a64965c0ac1144a72a6ddfcb23aa9d4d7742a5b20ddd5cfb1164b9` |               95 |

***

## Supply Model

The merger uses a fixed supply model with a **Network Incentives Reserve** carved out at genesis, split into five purpose-built sub-buckets.

* The **27.75% Network Incentives Reserve (277.5M cMATRA)** is non-circulating at launch and funds long-term network security, ecosystem growth, strategic partnerships, and launch liquidity. It is not a later inflation switch — it is part of the genesis supply plan.
* The **72.25% Public Redemption Pool (722.5M cMATRA)** is the only pool used for ordinary public redemptions. Network Incentives sub-bucket distributions do not draw from this pool.
* **Fee model — no MATRA burn.** Transaction fees are paid in **MOTRA**, the non-transferable capacity token generated from MATRA holdings (it decays if unused and is consumed when spent). Fee flow therefore never burns, mints, or dilutes MATRA. Validator and attestor incentives draw on the genesis reserve emission schedules; the attestor pot (`mat/attr`) is the designated accrual account for attestor-side economics, visible live on the [Materios explorer](https://fluxpointstudios.com/materios/explorer#overview).
* **Team treasury softening** is handled through explicit waiver and disclosure. Team treasury balances locked in on-chain DAOs are waived from the public rate denominator and receive cMATRA directly at mint time at the same published rate. This reduces the surrender pool by the carve amount (\~26.7M cMATRA at v5.1 rates) but does not change public rates. See [FAQ](/materios-partner-chain/faq) for details.

### Network Incentives Reserve sub-buckets

| Sub-bucket           |           MATRA |    % of 1B | Purpose                                                         |
| -------------------- | --------------: | ---------: | --------------------------------------------------------------- |
| Validator Emissions  |     115,000,000 |      11.5% | Block-production rewards schedule; Cardano SPO cross-validation |
| Attestor Emissions   |      65,000,000 |       6.5% | Threshold-attestation rewards + bond/slash economics            |
| Ecosystem Treasury   |      40,000,000 |       4.0% | Grants, dev funding, governance-directed programs               |
| Strategic Allocation |      30,000,000 |       3.0% | Strategic/institutional partners (long-term on-chain vesting)   |
| Liquidity (total)    |      27,500,000 |      2.75% | Bridge peg reserve, Protocol-Owned Liquidity, maker rebates     |
| **Total reserve**    | **277,500,000** | **27.75%** |                                                                 |

The Liquidity bucket breaks down as 5M for bridge peg reserve, 17.5M for Protocol-Owned DEX Liquidity (POL), and 5M for maker rebates on the CLOB launch venue.

***

## Launch Venue

Materios is launching cMATRA on [**SaturnSwap**](https://saturnswap.io), a Central Limit Order Book (CLOB) DEX on Cardano, as the primary venue.

* **Primary venue — SaturnSwap CLOB:** cMATRA/ADA and cMATRA/USDM pairs, seeded with resting orders at 25/50/100/200/400 bps from mid. Target book depth: $250K within 2% of mid at launch. CLOB gives better capital efficiency and price discovery than AMMs for a launch of this size; native maker-rebate economics are also a better fit than fixed-schedule LP mining.
* **Secondary venues — AMMs:** [Minswap](https://minswap.org) ($75–100K depth) and [WingRiders](https://www.wingriders.com) ($25–50K depth) for users and routers that only interact with AMMs. These act as arbitrage targets against the CLOB.

A CLOB-primary launch is enabled by SaturnSwap's CIP-68 Liftoff integration, which lets new tokens list with full order-book functionality on day one rather than waiting for AMM liquidity to deepen. The maker-rebate program funded by the Liquidity sub-bucket (5M MATRA over 24 months, 50% annual decay, paid in MATRA at \~15 bps of a 30 bps maker fee, 20% cap per market-maker address with two-sided-quote requirements) keeps spread tight from the first block.

***

## Strategic Allocation

The 30M MATRA Strategic Allocation sub-bucket (3% of supply) is reserved for institutional partners who commit capital to the network ahead of the public launch.

* **Vesting:** All strategic allocations are subject to long-term on-chain vesting, with no liquidity ahead of schedule.
* **Purpose:** The strategic round is expected to fund Protocol-Owned Liquidity seeding, security audits, and runway for team expansion beyond the redemption window.
* **Transparency:** All strategic allocations will be disclosed on-chain at mint time and the vesting contracts will be independently verifiable via the Materios explorer.

This bucket is held by Materios until strategic partners are confirmed. None of these tokens enter circulation ahead of their vesting schedule regardless of partner timing.

***

## Post-Reconciliation Dilution Rationale

The v5.1 allocation represents a **15% downward adjustment** from the v3.3 (March 2026) reference rates: public holders now receive approximately 85% of what the previous rate table published, and the Team carve-out takes exactly the same 15% haircut.

This falls squarely within the governance-approved correction clause stated in the "Window mechanics" section above:

> *"The rate table remains fixed for the full window unless a documented governance-approved correction is required for a launch bug or reconciliation error."*

The v3.3 rates assumed a pure 85% public / 15% reserve split that did not account for attestor emissions (already committed in the runtime code as a separate 50M reserve), left no room for ecosystem treasury or strategic partners, and produced rate-table totals that were mathematically inconsistent with the committed reserve architecture. The v5.1 rebalance reconciles published rates with the runtime's actual reserve structure, builds in strategic and liquidity sub-buckets that enable a real launch, and applies the haircut evenly — including to the Team carve (31.3M → 26.7M cMATRA) — so no holder class is disadvantaged relative to any other.

Final fixed rates are republished below as of the v5.1 publication date.

***

## Public Redemption Model

The merger uses a **surrender-and-redeem model** for normal public holders.

### Core rule

A public holder redeems by **actually controlling and surrendering an eligible legacy asset during the redemption window**.

* Redemption follows **present control plus surrender**, not snapshot ownership alone.
* A holder who acquires an eligible legacy asset before the deadline may redeem it.
* A holder who sells an eligible legacy asset before redeeming no longer controls the redeemable unit.
* The public process is intended to feel like a real trade-in, not a snapshot-only entitlement airdrop.

### Window mechanics

* The standard public window is **6 months** from the published launch date.
* A **fixed rate table** is published before the window opens.
* The rate table remains fixed for the full window unless a documented governance-approved correction is required for a launch bug or reconciliation error.
* Holders can redeem in **multiple transactions** during the window.

***

## What the Reference Snapshot Still Does

A published reference snapshot still exists, but its role has changed.

**The snapshot is used for:**

* Auditability and public reconciliation
* Publication of Team treasury waivers and other disclosed non-public balances
* Legacy reward reconciliation before launch
* NFT collection inventory review and CIP-68 filtering
* Sanity checks for the final launch package

**The snapshot is NOT the normal fungible entitlement rule.** For AGENT and SHARDS, the snapshot does not give ordinary public holders their redemption right by itself.

***

## Fungible Asset Rules

### Redeemable units

The redeemable fungible assets are AGENT, SHARDS, and any valid legacy rewards that Materios explicitly honors and **materializes into actual redeemable units before launch**.

### Current control matters

For ordinary public redemption, redeemability follows **current control of the fungible unit at redemption time**. Materios is not relying on provenance tracking of ordinary fungible units once they are circulating.

### Explicit exclusions

The following categories do not compete with the public redemption pool:

1. **Disclosed Team treasury balances** that are explicitly waived from public redemption.
2. **Balances already burned, quarantined, or permanently immobilized** under the published launch controls.
3. **Any other specifically disclosed non-public balances** that the final launch package excludes by explicit publication.

#### Disclosed Team treasury addresses

| Address                                                      | Label                | AGENT Waived   | SHARDS Waived  |
| ------------------------------------------------------------ | -------------------- | -------------- | -------------- |
| `addr1w9u9mw864yszpqk7374wtwtwludpa0rc9dmante78c7c9sqqdlyy9` | $SHARDS DAO Treasury | 9,902          | 446,969.70     |
| `addr1wx84ytuumke8gxex0l8par4852ey7l4eq6h325rnez0yluc56x0dj` | $AGENT DAO Treasury  | 29,634,754     | 0              |
| **Total waived**                                             |                      | **29,644,656** | **446,969.70** |

#### Why treasury balances are waived

Since the creation of both on-chain treasuries, there has been a complete lack of independent DAO proposals — the only proposals submitted were those proposed by the FPS Team itself. Given this, it makes the most sense for these funds to be returned to the team where they can be put to better use with more flexibility, rather than sitting idle in governance structures that have seen no community participation. The same rationale applies to the $AGENT DAO treasury.

All waived balances are published transparently so any holder can verify them on-chain.

### LP farms, DEX positions, and DeFi custody

If AGENT or SHARDS are in a Minswap or WingRiders liquidity pool, a farm, a lending protocol, or another script-controlled DeFi position, the holder must first **unfarm / withdraw / remove liquidity** so the underlying tokens return to a wallet they control.

* **LP tokens do not redeem.** They are receipts for positions, not merger assets.
* You redeem the **underlying AGENT and/or SHARDS** once they are back in your wallet.
* If impermanent loss or trading activity changed the amount, you redeem **what you actually withdraw and control**.

### Custodial and exchange balances

Assets held on a centralized exchange or by another custodian are not directly redeemable unless the holder can move them into self-custody during the window.

***

## NFT Rules

Eligible NFTs redeem on an asset-by-asset basis.

* Only assets with **on-chain quantity exactly 1** count as NFTs for merger eligibility.
* For CIP-68 collections, only the **user token** counts. The reference token does not redeem.
* The redeeming holder must control the **exact NFT asset** during the redemption window.
* If an NFT is listed on a marketplace or held by a script, it must first be withdrawn back to a wallet the holder controls.

***

## Legacy Reward Materialization

If a user has valid legacy staking rewards or dashboard-tracked rewards that Materios commits to honor, those rewards are intended to be:

1. Reconciled before launch.
2. Credited or minted into actual redeemable AGENT or SHARDS units before the window opens.
3. Redeemed through the same public surrender path as any other eligible unit.

No separate manual side-claim should be necessary for ordinary honored legacy rewards.

***

## Rate Methodology

### Asset weighting

Each asset receives a weighted share of the **722,500,000 public redemption pool** using the published valuation methodology:

* **Fungible tokens:** 7-day TWAP from top-pool market data
* **NFT collections:** 7-day TWAP of collection floor prices
* **Final allocation:** Deterministic weighted split of the public redemption pool

### Rate formulas

For fungible assets:

```
asset_bucket = asset_weight × 722,500,000
redemption_rate = asset_bucket / final_redeemable_supply
```

For NFTs:

```
asset_bucket = asset_weight × 722,500,000
per_nft_redemption = asset_bucket / final_redeemable_nft_count
```

### What you get (reference rates — April 19, 2026)

The following table shows how much cMATRA you receive for each legacy asset you surrender at the v5.1 rate table. These rates are derived by applying the post-reconciliation 0.85 multiplier to the locked TWAP weights, so the ordering and relative value between assets is unchanged — only the absolute cMATRA output is reduced. Final fixed rates are published after legacy reward materialization is reconciled.

| You surrender                  | You receive (cMATRA) |
| ------------------------------ | -------------------: |
| 1 AGENT                        |             \~0.4629 |
| 1 SHARDS                       |              \~29.12 |
| 1 Flux Point Team Pass         |             \~69,271 |
| 1 SE Brawler                   |             \~35,294 |
| 1 Brawl Pass: Enter the Dragon |            \~112,300 |
| 1 T1 ADAM Launch Pass          |          \~3,191,874 |
| 1 T2 ADAM Launch Pass          |            \~188,339 |

The SHARDS rate is computed from an exact rational ratio (`76,929,202,239,379 / 2,641,564,750,001` in base units) and rendered here to four significant figures. The on-chain mint uses the exact rational to guarantee the bucket sum is 722.5M to the base unit. All rates are fixed for the full 6-month redemption window once published and you can redeem in multiple transactions.

### Detailed rate breakdown

The rates above are derived from a 7-day TWAP valuation of each asset's market price, weighted against the 722,500,000 cMATRA public redemption pool.

| Asset                        | Bucket (cMATRA) | Redeemable Supply | Rate per Base Unit | Rate per Display Unit |
| ---------------------------- | --------------: | ----------------: | -----------------: | --------------------: |
| AGENT                        | 449,168,051.406 |       970,355,344 |            462,890 |    \~0.4629 per AGENT |
| SHARDS                       |  76,929,202.239 |  2,641,564.750001 |                 29 |    \~29.12 per SHARDS |
| Flux Point Team Pass         |  27,777,511.969 |          401 NFTs |                  — |      \~69,271 per NFT |
| SE Brawlers                  |   8,541,197.187 |          242 NFTs |                  — |      \~35,294 per NFT |
| Brawl Pass: Enter the Dragon |   4,941,188.455 |           44 NFTs |                  — |     \~112,300 per NFT |
| T1 ADAM Launch Pass          | 137,250,603.008 |           43 NFTs |                  — |   \~3,191,874 per NFT |
| T2 ADAM Launch Pass          |  17,892,245.735 |           95 NFTs |                  — |     \~188,339 per NFT |

*All values in display units (6 decimal places). AGENT has 0 decimals so base = display. SHARDS has 6 decimals (1 SHARDS = 1,000,000 base units). Buckets sum to exactly 722,500,000 cMATRA (verified against the canonical `rate_table_cmatra.json` in flux-merger `audit_pack/2026-04-19/`).*

### Team carve-out (from public pool)

The following amounts are minted directly to the team at the same published rates. The surrender pool is funded with the remainder. The Team takes exactly the same 15% haircut as public holders — the carve recomputes automatically at the new rates.

| Treasury  | Asset  | Waived Balance | Rate per Display Unit |         cMATRA Received |
| --------- | ------ | -------------: | --------------------: | ----------------------: |
| FPS DAO   | AGENT  |     29,644,656 |    \~0.4629 per AGENT |            \~13,722,223 |
| FPS DAO   | SHARDS |     446,969.70 |    \~29.12 per SHARDS |            \~13,016,914 |
| **Total** |        |                |                       | **\~26,739,137 cMATRA** |

**Surrender pool after carve: \~695,760,863 cMATRA** (96.3% of public pool).

### Rate publication conditions

Final fixed redemption rates are published only after:

* Legacy reward materialization is complete
* Final Team treasury waivers are published
* The launch reconciliation package is signed off

***

## Post-Surrender Treatment

Surrendered legacy assets are **not** intended to remain in free circulation. Where possible they are burned, permanently locked, quarantined, or otherwise removed from circulation under the published merger controls.

***

## Deadline and After-Window Handling

* The ordinary public window closes **6 months** after launch.
* After the deadline, the normal public surrender path is permanently closed. The on-chain validator enforces this — the `ProcessSurrender` spending path is disabled after the deadline.
* Any unreleased cMATRA remaining in the pool is withdrawn by the administrator and returned to the project treasury for future allocation decisions (validator incentives, ecosystem development, or other uses to be determined by governance).
* **There will be no extension** and no late-surrender mechanism. Holders should redeem well before the deadline.

***

## Legal and Disclosures

The cMATRA Merger Portal is operated by **Flux Point Studios, Inc.**, a Delaware corporation ("FPS"). Use of the Portal is governed by the FPS [Terms of Service](https://fluxpointstudios.com/tos) and the FPS [Privacy Policy](https://fluxpointstudios.com/privacy-policy), each of which is incorporated by reference into the disclosures below. By connecting a wallet and submitting a surrender transaction, you acknowledge and agree to the following:

1. **Eligibility.** You are at least 18 years old (or 13 or older with verifiable parental or legal-guardian consent, where permitted), have full legal capacity to enter into a binding agreement, and are not legally prohibited from using the Portal under the laws of the jurisdiction in which you access it.
2. **Restricted persons and jurisdictions.** The Portal is not offered to, and may not be used by, any person located in, organized under the laws of, or ordinarily resident in any jurisdiction subject to comprehensive U.S. OFAC sanctions (currently including Cuba, Iran, North Korea, Syria, and the Crimea, Donetsk, and Luhansk regions of Ukraine), nor by any person identified on any U.S., U.K., E.U., or U.N. sanctions or denied-persons list. You are solely responsible for compliance with the laws, regulations, and tax rules of your jurisdiction.
3. **One-way migration; no refunds.** A successful surrender is final and irreversible. Legacy assets you submit are sent to a Plutus-locked quarantine address from which they cannot be reclaimed, and the corresponding cMATRA is released to your wallet by the on-chain validator. The Portal does not offer cancellations, reversals, or refunds, and FPS cannot recover surrendered assets on your behalf.
4. **Utility token; no investment, no security.** cMATRA is a utility token intended for use within the Materios ecosystem. Nothing in these materials is, or should be construed as, an offer or solicitation to buy or sell a security, an investment recommendation, financial advice, or a promise of profit. cMATRA does not represent equity, debt, dividend rights, revenue share, or any other claim on FPS or any affiliate. No future price, listing, liquidity, or utility is guaranteed.
5. **Smart-contract and technical risk.** The Portal interacts with open-source Plutus validators and off-chain services published at [Flux-Point-Studios/matra-token-merger](https://github.com/Flux-Point-Studios/matra-token-merger) for independent inspection. The code has not been subjected to a formal third-party security audit. The Portal is provided "AS IS" and "AS AVAILABLE" without warranties of any kind, express or implied, as set forth in the Terms of Service. You bear all risk of bugs, exploits, network outages, wallet errors, or loss of access to your wallet keys.
6. **Tax responsibility.** A surrender transaction may be a taxable event under the laws of your jurisdiction. FPS does not provide tax advice. You are solely responsible for determining and discharging any tax obligations arising from your use of the Portal; consult a qualified tax professional.
7. **Blockchain transparency.** All surrender transactions are recorded permanently on the Cardano mainnet. Your wallet address, the assets you surrender, the amount of cMATRA you receive, and the time of the transaction are publicly visible on chain. The Portal does not control third-party indexers, explorers, or analytics tools that may surface this data.
8. **Network fees.** Cardano network (TX) fees required to settle a surrender are paid by you from your wallet at the time the transaction is signed. FPS does not set, control, or refund Cardano network fees.
9. **Disclaimers, liability, and dispute resolution.** The FPS [Terms of Service](https://fluxpointstudios.com/tos) govern (without limitation) warranty disclaimers, limitations of liability, indemnification, the controlling law of the State of Utah, binding individual arbitration administered by the American Arbitration Association under its Commercial Arbitration Rules and Supplementary Procedures for Consumer Related Disputes, a class-action and jury-trial waiver, and a 30-day right to opt out of the arbitration and class-action waiver provisions. Those terms apply to your use of the Portal. Internal corporate-law matters relating to FPS are governed by Delaware law and the exclusive jurisdiction of the Delaware Court of Chancery as set forth in the FPS Certificate of Incorporation.

Flux Point Studios, Inc. is a Delaware corporation. Registered office: 651 N Broad Street, Suite 201, Middletown, DE 19709 (c/o Legalinc Corporate Services, Inc.). Contact: <contact@fluxpointstudios.com>. These disclosures are provided for informational purposes, are not legal, tax, or investment advice, and do not modify the Terms of Service or Privacy Policy; in the event of any conflict, the Terms of Service control.

***

## Authoritative Launch Materials

If earlier reports, Discord posts, or snapshot-era drafts conflict with this document, the authoritative launch package is:

1. The final litepaper
2. The final eligibility rules
3. The final FAQ
4. The final fixed rate table
5. The legacy reward reconciliation / materialization package
6. The final Team waiver publication
7. The final redemption instructions

***

**Version:** 4.2 | **Date:** October 5, 2026 | **Status:** Public — redemption window open (closes November 28, 2026)

**What changed in 4.2 (October 2026):** no extension to the November 28 deadline (stated plainly; it was previously described as "not planned"); surrenders are co-signed automatically with no manual approval step ([FAQ Q35a](/materios-partner-chain/faq#35a-does-the-team-have-to-process-or-approve-my-surrender)); security model described in [Launch Readiness → Attacked, with dates](/materios-partner-chain/launch-readiness#attacked-with-dates). Eligibility, rates and the window are unchanged.


# cMATRA FAQ

Frequently asked questions about the cMATRA token merger, redemption process, rates, legacy rewards, NFTs, and the Materios transition.

***

## General

### 1. What is changing?

Seven legacy Cardano assets are being consolidated into cMATRA on Cardano, which is intended to converge into MATRA — the native network token of the Materios blockchain. Materios also uses MOTRA as a separate non-transferable capacity token for fees and sponsorship.

### 1a. What am I actually getting when I redeem?

The network token of the Materios blockchain. Flux Point's early ecosystem spread utility across many assets — tokens and NFT collections, each with its own bolted-on perks. The merger replaces all of that with one asset whose utility **is the network itself**:

* **Stake and delegate to earn more MATRA.** Delegate to Cardano SPOs participating in Materios cross-validation, or to Materios validators as mainnet staking rolls out, and earn block rewards — exactly the way ADA holders delegate to Cardano stake pools and earn ADA block rewards. See Q39–39b.
* **Use the network.** Holding MATRA generates MOTRA, which pays transaction fees (Q6).
* **Govern the network.** MATRA is the chain's stakeable governance asset as governance decentralizes.

There is no revenue-sharing program, no dividend, and no Cardano-side staking scheme attached to cMATRA. The value proposition is owning and operating a piece of the chain.

### 2. Is this still a snapshot merger?

Not in the old sense for normal fungible holders.

The merger now uses a **live surrender-and-redeem model** for public holders. You redeem by actually holding and surrendering eligible legacy assets during the six-month window.

A reference snapshot still exists, but it is used for audit, disclosure, Team-waiver publication, and launch reconciliation.

### 3. Why move away from a pure snapshot-entitlement model?

Because a pure snapshot model makes the old fungible tokens feel like zombie bags once the snapshot is over. A live redeem model is cleaner: the holder who controls the legacy asset during the window can trade it in for cMATRA.

### 4. Why does the reference snapshot still matter?

It still matters for:

* Public auditability
* Team treasury waiver disclosure
* Legacy reward reconciliation
* NFT inventory and CIP-68 filtering
* Launch-package sanity checks

It just is **not** the ordinary fungible entitlement rule anymore.

***

## cMATRA and Materios

### 5. What exactly is cMATRA?

cMATRA is the Cardano-side transitional redemption asset. MATRA is the long-term native network token of the Materios blockchain — used for staking, transfers, MOTRA generation, and governance. The goal is one economic supply story, not two unrelated supplies.

### 6. What is MOTRA?

MOTRA is the network capacity token. It is non-transferable, generated from MATRA holdings, decays if unused, and is burned when used for fees — the same holder-generates-capacity pattern as NIGHT generating DUST on the Midnight network. It exists so users do not have to sell MATRA just to use the network.

### 7. Is the supply fixed?

Yes. The current design uses a fixed maximum supply of 1,000,000,000 MATRA/cMATRA with 6 decimals.

**No MATRA is ever burned.** Transaction fees are paid in MOTRA (which is consumed on use), so fee flow neither reduces nor inflates the MATRA supply — 1B is both the ceiling and the floor.

### 8. How is the supply split at genesis?

27.75% (277.5M) is carved out at genesis as a non-circulating **Network Incentives Reserve** split into five sub-buckets, and 72.25% (722.5M) is assigned to the **Public Redemption Pool**. The reserve is not a later inflation switch; it is part of the genesis supply plan.

The five sub-buckets are:

* **Validator Emissions — 115M (11.5%)** — block-production rewards; includes Cardano SPO cross-validation rewards.
* **Attestor Emissions — 65M (6.5%)** — threshold-attestation rewards + bond/slash economics.
* **Ecosystem Treasury — 40M (4%)** — grants, ecosystem dev funding, governance-directed programs.
* **Strategic Allocation — 30M (3%)** — strategic/institutional partners, subject to long-term on-chain vesting.
* **Liquidity — 27.5M (2.75%)** — 5M bridge peg reserve, 17.5M Protocol-Owned DEX Liquidity, 5M maker rebates on CLOB.

### 9. Why does Materios need a Network Incentives Reserve?

Because network security, launch liquidity, and ecosystem growth all have to be funded honestly. MOTRA fees are burned and are not designed to pay validators. The Network Incentives Reserve handles all five obligations in transparent sub-buckets rather than surprise inflation later:

1. **Validator rewards** come from the 115M Validator Emissions sub-bucket, paid across the published emission schedule.
2. **Attestor rewards** come from the 65M Attestor Emissions sub-bucket; the attestor pot (`mat/attr`) is the designated on-chain accrual account for attestor-side economics.
3. **Ecosystem growth** — grants and game integrations — comes from the 40M Ecosystem Treasury.
4. **Strategic capital** — the 30M Strategic Allocation funds POL seeding, security audits, and team runway beyond the redemption window, under strict vesting.
5. **Launch liquidity** — the 27.5M Liquidity sub-bucket seeds the CLOB and AMM pairs, funds maker rebates, and holds the bridge peg reserve.

Transaction fees are paid in MOTRA and consumed on use — **no MATRA is ever burned**, and fee flow does not mint new MATRA. Live pot balances and vesting schedules are visible on the [Materios explorer's Tokenomics State panel](https://fluxpointstudios.com/materios/explorer#overview).

***

## Dilution and Team Policy

### 10. Am I being diluted?

Yes, by approximately **15% relative to the v3.3 published rates** — a post-reconciliation correction, not a post-launch inflation. The v5.1 rate table is the v3.3 rates multiplied by 0.85 across the board, which moves the public pool from 850M cMATRA to 722.5M and re-targets the freed 127.5M cMATRA into the five Network Incentives Reserve sub-buckets that were missing (or under-allocated) in v3.3.

This falls squarely within the governance-approved correction clause in the README's "Window mechanics" section: *"The rate table remains fixed for the full window unless a documented governance-approved correction is required for a launch bug or reconciliation error."* The v3.3 rates were mathematically inconsistent with the reserve architecture already committed in runtime code (attestor emissions were unbudgeted) and left zero capacity for ecosystem treasury, strategic partners, or launch liquidity. Shipping v3.3 unchanged would have meant either re-breaking the runtime or launching without POL — both worse outcomes than a proportional 15% correction before the window opens.

The Team takes exactly the same 15% cut (see Q12 below). No holder class is disadvantaged relative to any other.

### 10a. What changed vs v3.3?

| Item                            | v3.3 (March 2026)   | v5.1 (April 2026)                      |
| ------------------------------- | ------------------- | -------------------------------------- |
| Public Redemption Pool          | 850M (85%)          | 722.5M (72.25%)                        |
| Reserve                         | 150M validator only | 277.5M across 5 sub-buckets            |
| 1 AGENT →                       | \~0.5446 cMATRA     | \~0.4629 cMATRA                        |
| 1 SHARDS →                      | \~34.0 cMATRA       | \~29.12 cMATRA                         |
| 1 Flux Point Team Pass →        | \~81,495 cMATRA     | \~69,271 cMATRA                        |
| 1 SE Brawler →                  | \~41,523 cMATRA     | \~35,294 cMATRA                        |
| 1 Brawl Pass: ED →              | \~132,117 cMATRA    | \~112,300 cMATRA                       |
| 1 T1 ADAM Pass →                | \~3,755,146 cMATRA  | \~3,191,874 cMATRA                     |
| 1 T2 ADAM Pass →                | \~221,576 cMATRA    | \~188,339 cMATRA                       |
| Team carve total                | \~31.3M cMATRA      | \~26.7M cMATRA                         |
| Attestor Emissions sub-bucket   | not allocated       | 65M (resolves code↔docs inconsistency) |
| Ecosystem Treasury sub-bucket   | not allocated       | 40M                                    |
| Strategic Allocation sub-bucket | not allocated       | 30M (long-term vesting)                |
| Liquidity sub-bucket            | not allocated       | 27.5M (POL + bridge + maker rebates)   |

The TWAP-derived **weights** between assets are unchanged — only the absolute cMATRA output is reduced proportionally.

### 10b. How is the post-reconciliation dilution handled in practice?

* **Rates recompute by multiplier only.** Each asset's cMATRA-per-unit rate becomes (v3.3 rate) × 0.85. No asset class is singled out.
* **Team carve recomputes too.** 31.3M cMATRA → 26.7M cMATRA automatically — the Team takes the same haircut.
* **Weights unchanged.** The relative share that AGENT, SHARDS, and each NFT collection receive of the pool is identical to v3.3 (TWAP weights locked before v5.1).
* **Bucket totals verified.** The sum of all seven asset buckets is exactly 722.5M cMATRA in base units (audited in `rate_table_cmatra.json`).
* **No retroactive change after launch.** Once v5.1 is published as the final fixed table, it is locked for the full 6-month redemption window.

### 11. How is the hit being softened for holders?

Three ways:

1. **Disclosed Team treasury balances are waived** from public redemption (29.6M AGENT + 447K SHARDS). The rate denominator already excludes these, so the carve-out does not further dilute public holders.
2. **Team takes the same haircut.** The 15% dilution applies to the Team carve identically (31.3M → 26.7M cMATRA) — fairness signal, same ratio.
3. **Early redeemers** may receive time-limited MOTRA sponsorship or delegated capacity during onboarding; the Network Incentives Reserve is non-circulating until released on a protocol schedule.

### 12. Is the Team taking the same hit?

**Yes — the Team takes the full 15% haircut alongside public holders.** The carve amount drops from \~31.3M cMATRA at v3.3 rates to \~26.7M cMATRA at v5.1 rates, which is the v3.3 carve recomputed from v5.1 rational rates × team-held legacy balances (approximately × 0.85).

Mechanism: the Team's carve is computed as (waived balance) × (published rate). Because the published rate dropped by 15%, the carve drops by 15% too. No special Team-only adjustment was made.

The current waived balances (unchanged from v3.3) are:

* **AGENT:** 29,644,656 (FPS DAO: 9,902 + $TALOS: 29,634,754)
* **SHARDS:** 446,969.70 display units (all at FPS DAO)

Since the creation of both on-chain treasuries, there has been a complete lack of independent DAO proposals — the only proposals submitted were those proposed by the FPS Team itself. These funds are being returned to the team where they can be put to better use with more flexibility. All waived balances are published transparently so any holder can verify them on-chain.

Because these tokens are held in on-chain Agora DAOs and cannot be withdrawn without governance quorum (which has historically been unachievable), the team receives their cMATRA directly at mint time at the same published rates as public holders. The DAO treasuries effectively become dead wallets — the legacy tokens remain locked there permanently. This does not change public rates because the waiver already excluded these balances from the rate denominator.

### 12a. Why doesn't the team surrender through the pool like everyone else?

The AGENT and SHARDS treasury tokens are locked in on-chain Agora DAOs that require governance votes to move funds. Historically, there has not been enough voter participation to pass any proposals. Rather than risk the team allocation being permanently stuck, the equivalent cMATRA is minted directly to the team at the same published rate. This is economically identical to surrendering through the pool.

### 12b. Does the team carve-out change public rates?

No. The waiver already excluded the team's treasury balances from the rate denominator when computing per-unit rates. The carve-out simply delivers the corresponding cMATRA at those same rates and reduces the surrender pool by that amount (\~26.7M cMATRA out of 722.5M at v5.1). Public holders redeem at exactly the same rate regardless.

### 12c. Why does the v3.3 doc show a \~10% implicit team softening but v5.1 is a flat 15% cut?

The v3.3 model applied a treasury-waiver framing that the public could read as a partial team softening. The v5.1 rebalance makes this explicit: there is no team-specific softening in v5.1. The Team's carve recomputes at the same rate × 0.85 multiplier applied to all holders. This is cleaner to communicate and easier to audit — one multiplier, no class-specific carve-outs hidden inside the rate table. The Team is taking the haircut on the same line as every other holder.

***

## Eligibility

### 13. Which legacy assets are included?

AGENT, SHARDS, Flux Point Team Pass, SE Brawlers, Brawl Pass: Enter the Dragon, T1 ADAM Launch Pass, and T2 ADAM Launch Pass.

### 14. Do I need to still hold the old assets to get cMATRA?

Yes.

Under the revised model, normal public redemption requires you to **actually hold and surrender the eligible legacy assets during the window**.

### 15. If I buy AGENT, SHARDS, or an eligible NFT now, can I still redeem later?

Yes, as long as:

* The asset is one of the supported merger assets.
* The redemption window is still open.
* You control the asset at the time you surrender it.

The public path is based on possession and surrender during the window, not just on historical snapshot ownership.

### 15a. What about Flux Point NFTs that aren't on the eligible list, like banners or weapons?

NFTs with direct in-game utility (e.g. TRIB3 banners, weapons) are **not** part of the merger. They retain their original function in-game and would lose that utility if converted to a fungible token. Only the seven assets listed in Q13 are eligible for cMATRA redemption.

### 16. Do I need to use the same wallet that held the asset at the reference snapshot?

No, not for the ordinary public redemption path.

The important thing is that you control the eligible asset when you surrender it during the window and follow the published redemption instructions.

***

## Rates

### 17. Is AGENT 1:1 with cMATRA?

No.

AGENT is **not** 1:1 with cMATRA, and neither are the other legacy assets. The merger uses a weighted redemption model, not a same-supply shortcut.

### 17a. Why do I get less than 1 cMATRA per AGENT if the supply is also 1 billion?

Because this is not a simple 1:1 token rename. Seven separate assets — AGENT, SHARDS, and five NFT collections — are merging into a single token. The 722,500,000 public redemption pool is split across all of them weighted by market value.

The result is a single token with more holders, better decentralization, and consolidated liquidity instead of seven fragmented assets. The value story is the network token itself — stakeable, delegable, fee-generating, and governing the Materios blockchain (see Q1a) — not a per-unit supply match.

### 18. So what is the AGENT or SHARDS conversion rate?

The final fixed fungible redemption rates will be published **before** the redemption window opens, after:

* Legacy staking and dashboard-tracked rewards have been credited or minted into actual redeemable old units.
* Final Team treasury waivers have been published.
* The launch reconciliation package has been completed.

The rate table is fixed before launch, but it is not honest to call it final until supply reconciliation is finished.

### 19. Will the rate move during the six-month window?

No, that is not the intended design.

The goal is a **fixed published rate table for the full window**, not a floating live-price conversion that changes every day.

### 20. How are rates set in principle?

Each asset gets a weighted share of the 722,500,000 public redemption pool based on the published valuation methodology.

Then:

* Fungible rate = asset bucket / final redeemable supply for that asset
* NFT rate = asset bucket / final redeemable NFT count for that collection

### 20a. Can NFT holders manipulate the floor price to game their allocation?

The allocation weights are derived from a **7-day time-weighted average price (TWAP)**, not a single spot price. A 7-day window makes short-term wash trading or floor manipulation expensive and impractical — you would need to sustain artificial volume for an entire week to move the average meaningfully.

Additionally, the TWAP data used for the published reference rates has **already been captured**. The rate weights are locked. Even if someone manipulated a floor price today, it would not change the published allocation.

### 20b. Will rates be recalculated with new market data before launch?

No. The TWAP-derived **weights** (how the pool is split between assets) are locked based on the published reference data. The only thing that may cause a minor rate adjustment before final publication is a change in the **redeemable supply denominator** — specifically, if legacy reward materialization adds units to an asset's redeemable count. The market-price side of the formula is not being re-run.

### 21. Why are final fungible rates not frozen today?

Because Materios is choosing to materialize valid legacy rewards into actual redeemable old units before launch. Until that is finished, the final redeemable fungible supply is not fully reconciled.

***

## Legacy Rewards

### 22. What happens to legacy staking rewards that were tracked operationally or in dashboards?

Those rewards are intended to be **credited or minted into actual redeemable legacy units before the redemption window opens**.

Once that is done, they redeem through the same public path as any other eligible unit of that asset.

### 23. Will there be a separate manual side-claim for those legacy rewards?

That is not the intended policy. The point of the materialization step is to avoid a split system where some users redeem on-chain and others rely on a special-case spreadsheet queue.

***

## DeFi, LP, and Custody

### 24. What if my AGENT or SHARDS are in an LP farm on Minswap, WingRiders, or another DeFi platform?

You must first **unfarm / withdraw / remove liquidity** so the underlying AGENT and/or SHARDS return to a wallet you control.

The redeemable assets are the underlying supported legacy tokens once they are back in your wallet and surrendered during the redemption window.

Materios may try to coordinate with major venues to make this easier, but holders should not wait until the last minute.

### 25. Do LP tokens redeem?

No.

LP tokens are receipts for liquidity positions, not merger assets. To participate in the merger, you redeem the **underlying AGENT and/or SHARDS**, not the LP token itself.

### 26. What if I remove liquidity and get back less AGENT or SHARDS than I originally put in?

You redeem what you **actually withdraw and control** during the redemption window.

If impermanent loss, fees, or trading activity changed the amount of underlying tokens in the position, the merger does not recreate the old deposit for you.

### 27. What if my assets are on a centralized exchange or in someone else's custody?

You can only safely redeem assets you **actually control** in a supported wallet.

Exchange balances, custodial balances, or third-party managed balances are not directly redeemable through the ordinary public path unless you first move them into self-custody before the deadline.

***

## Redemption Process

### 28. Can I redeem in multiple transactions, or do I need to do it all at once?

The intended design is that you can redeem in **multiple transactions** during the window. The same fixed rate table applies throughout the window once published.

### 29. How do I redeem during the window?

The intended flow is:

1. Connect a supported Cardano wallet.
2. Select eligible legacy assets to redeem.
3. Sign a transaction surrendering those assets to the published merger destination.
4. Receive cMATRA at the fixed published rate.

The launch kit will publish the exact operational instructions.

### 30. What happens to the old assets after I surrender them?

They are not intended to remain in free circulation.

Where possible they may be burned. Where direct burn is not available or practical, they should be permanently locked, quarantined, or otherwise removed from public circulation under the published merger controls.

***

## NFTs

### 31. How are NFTs handled?

Eligible NFTs redeem on an asset-by-asset basis. Only true one-of-one user-side NFT units count. For CIP-68 collections, the user token counts and the reference token does not.

### 32. What if my NFT is listed on a marketplace or held in a script?

You need to regain normal wallet control of the NFT before redeeming it. The right follows control of the asset at redemption time, not just historical ownership.

### 33. Do CIP-68 reference tokens redeem?

No. Only the user token counts for redemption. The reference token does not.

### 33a. I hold a T1 or T2 ADAM Launch Pass — will I lose access to ADAM if I surrender it?

No. ADAM v2 will no longer require a pass or subscription to access. ADAM v2 will charge per-transaction fees only. The merger is essentially buying out the ADAM passes with cMATRA, since the passes will have no utility under the new ADAM v2 model.

### 34. What if I wait until the last day and the marketplace, DeFi venue, or network is congested?

Do not wait until the last day.

The six-month window is meant to give holders enough time to recover assets from farms, marketplaces, or other venues. Materios cannot guarantee third-party platform responsiveness or network conditions right at the deadline.

***

## After the Window

### 35. What happens after six months?

The public redemption window closes on **November 28, 2026**, and **there will be no extension**. The on-chain validator permanently disables the surrender path at the deadline, so late surrenders are not technically possible.

Unredeemed legacy assets (AGENT, SHARDS, and the eligible NFT collections) stay in your wallet, but they have no redemption path and no supported utility in any Flux Point product after the deadline. Redeem before November 28.

### 35a. Does the team have to process or approve my surrender?

No. There is no manual review or queue. When you sign the surrender in your wallet, the portal's signing services automatically add the two required administrator co-signatures and submit it. Your legacy assets go to the quarantine address and your cMATRA arrives in that same transaction.

The administrator keys exist so the pool can only be spent by a valid surrender. They are not a human approval step. If a surrender fails, it is almost always a wallet issue: not enough ADA for fees and collateral, or assets still in a farm or LP position. See Q24.

### 36. What happens to any unreleased cMATRA from the 722.5M public redemption pool after the deadline?

After the six-month window closes, the administrator withdraws any remaining cMATRA from the surrender pool. No further public surrenders are possible once the deadline has passed. The on-chain validator enforces this — the `ProcessSurrender` spending path is permanently disabled after the deadline, and only the `AdminWithdraw` path is available.

Unclaimed cMATRA returns to the project treasury for future allocation decisions (validator incentives, ecosystem development, or other uses to be determined by governance).

***

## Materios Onboarding

### 37. Do I need to bridge to Materios immediately after redeeming?

No. The intended flow is Cardano-first. Users redeem into cMATRA on Cardano first, then complete address association and later bridge or lock into Materios as the onboarding flow matures.

### 38. Will cMATRA and MATRA be separate supplies?

No. The intended model is one economic supply story. cMATRA is the transitional Cardano-side representation and MATRA is the native network token of the Materios blockchain.

***

## Validators

### 39. How are validators expected to be rewarded?

From the **Validator Emissions sub-bucket (115M MATRA, 11.5% of supply)** within the Network Incentives Reserve, not from MOTRA fees (which are consumed on use, not paid to anyone). Validator income follows the published emission schedule.

This includes **Cardano SPO delegation rewards**. Materios is integrating the IOG partner-chains cross-validation framework (Minotaur), which allows Cardano stake pool operators to participate in Materios consensus. Delegators to participating SPOs contribute to Materios security through cross-chain validation and receive cMATRA rewards from the Validator Emissions sub-bucket in proportion to their stake.

Attestors are rewarded separately from the **Attestor Emissions sub-bucket (65M MATRA, 6.5%)** — per-signer rewards paid on availability certification, with the `mat/attr` pot as the designated accrual account for attestor-side economics. Ecosystem-side activity (grants, integrations, governance-directed programs) is funded by the **Ecosystem Treasury sub-bucket (40M MATRA, 4%)**. Transaction fees themselves are paid in MOTRA and consumed on use — no MATRA is burned.

### 39a. How do Cardano SPO delegators earn MATRA?

Through cross-validation, Cardano stake pool operators participate in Materios consensus alongside dedicated Materios validators. Delegators to participating pools (starting with **TALOS**) contribute to Materios network security through their delegation, and receive cMATRA from the Validator Emissions sub-bucket in proportion to their stake.

* **Source:** The 115,000,000 MATRA Validator Emissions sub-bucket (11.5% of total supply), inside the 277.5M Network Incentives Reserve.
* **Rationale:** Cross-validation (Minotaur) means SPO delegators directly secure the Materios network. Distributing validator rewards to them is the sub-bucket doing its job.
* **Duration:** An initial distribution period with published start and end dates. Duration and rates are published before the first distribution.
* **Rate:** A fixed cMATRA-per-ADA-per-epoch rate, published in advance.
* **Distribution:** Periodic distribution to delegator wallets based on epoch snapshots.
* **Impact on public pool:** None. Delegation rewards draw exclusively from the Validator Emissions sub-bucket, not the 722,500,000 public redemption pool. Public redemption rates are completely unaffected.
* **ADA rewards:** Delegators continue to receive their normal ADA staking rewards. cMATRA delegation rewards are additional.

### 39b. Is there a cMATRA staking program on Cardano? Is staking a revenue share?

No, on both counts.

* **There is no Cardano-side staking or revenue-share program for cMATRA.** The legacy AGENT/SHARDS staking program — including its revenue-rewards streams — concluded with the merger launch and is not being replaced with a cMATRA equivalent.
* **Earning more MATRA means securing the network.** The paths to additional MATRA are delegation and validation: delegate ADA to SPOs participating in Materios cross-validation (Q39a), and stake or delegate MATRA to Materios validators as mainnet staking rolls out. Rewards come from the published Validator and Attestor Emissions schedules — protocol block rewards for validation work, in the same category as Cardano's ADA staking rewards.
* **Nothing here is a revenue share.** Staking rewards are paid by the protocol for securing the chain. They are not interest, not dividends, and not a share of Flux Point Studios' (or anyone's) revenue or profits.

### 40. Can unused reserve sub-buckets be repurposed later?

Not casually. The Network Incentives Reserve is not discretionary operating capital. Any later reassignment of clearly surplus reserve should require governance and should be communicated explicitly.

Distributing delegation rewards to SPO delegators who secure Materios through cross-validation (Q39a) is not a repurposing — it is the Validator Emissions sub-bucket fulfilling its stated purpose on Cardano L1 before the full cross-chain bridge is operational.

***

## Market and Valuation

### 41. Do we know the starting market cap of MATRA?

Materios does **not** set a guaranteed opening market cap. Market cap depends on what the market decides to pay once trading starts and on how much supply is actually circulating.

What Materios can publish in advance is the fixed supply model and the reference valuation package used to derive redemption weights.

### 41a. Why launch on SaturnSwap (CLOB) instead of Minswap (AMM)?

Materios chose a **CLOB-primary launch** on SaturnSwap for four reasons:

1. **Capital efficiency.** At the initial liquidity scale (\~$250K per pair), a CLOB delivers tighter spreads and deeper effective depth than an AMM pool with the same capital, because capital can be concentrated around the mid-price as resting orders rather than spread along an x·y=k curve.
2. **Native maker-rebate economics.** The Liquidity sub-bucket funds a maker-rebate program (5M MATRA over 24 months, 50% annual decay, \~15 bps rebate on a 30 bps maker fee, 20% cap per market-maker address with two-sided-quote requirements). Maker rebates map cleanly onto CLOB economics; forcing them onto AMM LP rewards creates wrong incentives (farm-and-dump, no spread obligation).
3. **Own infrastructure.** SaturnSwap is part of the same ecosystem Materios is building into (via CIP-68 Liftoff integration), which means the launch venue and the redemption venue share operational context, incident response, and upgrade cadence.
4. **Price discovery.** An order book makes the launch price legible in real time (visible bids and asks) rather than derived from whatever size happens to hit a bonding curve.

**Secondary AMM listings on Minswap and WingRiders** provide retail access for users and aggregators that only interact with AMMs. Arbitrageurs keep prices aligned between the CLOB and the AMMs. These AMM pools are smaller than the CLOB book and are intentionally designed as arbitrage targets, not as the primary price-discovery venue.

Materios considered a Liquidity Bootstrapping Pool (LBP) and decided against it: the offshore-entity and legal overhead ($30–80K legal, 2–3 month timeline) is not worth it at the $270K launch-pair scale.

***

## Legal and Disclosures

### 41b. Who operates the Portal, and what governs my use of it?

The cMATRA Merger Portal is operated by **Flux Point Studios, Inc.**, a Delaware corporation. Use of the Portal is governed by the FPS [Terms of Service](https://fluxpointstudios.com/tos) and [Privacy Policy](https://fluxpointstudios.com/privacy-policy), and by the cMATRA Merger Disclosures published on the Portal itself and in the [Legal and Disclosures](/materios-partner-chain/cmatra-token-merger#legal-and-disclosures) section of this docs page. By connecting a wallet and submitting a surrender transaction, you agree to those terms.

### 41c. Is cMATRA a security or an investment?

No. cMATRA is a **utility token** intended for use within the Materios ecosystem. Nothing in these docs or on the Portal is an offer or solicitation to buy or sell a security, an investment recommendation, financial advice, or a promise of profit. cMATRA does not represent equity, debt, dividend rights, revenue share, or any other claim on Flux Point Studios or any affiliate. No future price, listing, liquidity, or utility is guaranteed.

### 41d. Is the surrender taxable?

A surrender transaction may be a taxable event under the laws of your jurisdiction. Flux Point Studios **does not provide tax advice** — you are solely responsible for determining and discharging any tax obligations arising from your use of the Portal. Consult a qualified tax professional in your jurisdiction.

### 41e. Can I reverse a surrender if I change my mind?

No. A successful surrender is **final and irreversible**. Legacy assets you submit are sent to a Plutus-locked quarantine address from which they cannot be reclaimed, and the corresponding cMATRA is released by the on-chain validator. The Portal does not offer cancellations, reversals, or refunds, and FPS cannot recover surrendered assets on your behalf.

### 41f. Is the code audited?

Not by a point-in-time audit, which checks one moment in code that keeps changing. The Aiken validators and off-chain services are open source and published at [Flux-Point-Studios/matra-token-merger](https://github.com/Flux-Point-Studios/matra-token-merger) for independent inspection. The code is unit-tested, and an AI red team attacks it: what it finds gets fixed and re-attacked before it ships, and each run's results are published with its date in the repository's `audit_pack/` folder (see [Attacked, with dates](/materios-partner-chain/launch-readiness#attacked-with-dates)). Testing reduces risk but cannot rule out every bug. You bear all risk of bugs, exploits, network outages, wallet errors, or loss of access to your wallet keys, as set forth in the Terms of Service. The Portal is provided "AS IS" and "AS AVAILABLE."

### 41g. Where are disputes resolved?

The FPS [Terms of Service](https://fluxpointstudios.com/tos) govern dispute resolution: Utah law applies, disputes are resolved through binding **individual arbitration** administered by the American Arbitration Association under its Commercial Arbitration Rules and Supplementary Procedures for Consumer Related Disputes, with a **class-action and jury-trial waiver** and a **30-day opt-out** window. Internal corporate-law matters relating to FPS are governed by Delaware law and the exclusive jurisdiction of the Delaware Court of Chancery, as set forth in the FPS Certificate of Incorporation.

### 41h. Who is restricted from using the Portal?

The Portal is not offered to, and may not be used by, any person located in, organized under the laws of, or ordinarily resident in any jurisdiction subject to **comprehensive U.S. OFAC sanctions** (currently including Cuba, Iran, North Korea, Syria, and the Crimea, Donetsk, and Luhansk regions of Ukraine), nor by any person identified on any U.S., U.K., E.U., or U.N. sanctions or denied-persons list. Users must be 18 or older (or 13 or older with verifiable parental or legal-guardian consent, where permitted).

***

## Authority

### 42. Which policy document is authoritative if old docs or messages conflict?

The authoritative launch package is intended to be:

* The final litepaper
* The final eligibility rules
* The final FAQ
* The final fixed rate table
* The legacy reward reconciliation / materialization package
* The final Team waiver publication
* The final redemption instructions

Earlier snapshot-era drafts, stale reserve analyses, or Discord shorthand should not override the final launch package.

For urgent merger support, please open a ticket in the FPS Discord under **#cmatra-merger-support** — the channel link is published in [Launch Readiness → Support Channel](/materios-partner-chain/launch-readiness#support-channel). The Materios team does not promise a service-level response time, but support is best-effort during the redemption window and incidents that materially affect users are triaged immediately.

Read [Legal & Disclaimers](/materios-partner-chain/legal-and-disclaimers) before raising a ticket — most "is this allowed in my jurisdiction" / "what about taxes" / "what if there's a bug" questions are answered there.

### 43. Is this document final?

It is a public / governance draft aligned to the current policy direction. The core model is now much clearer than before, but the final launch package still needs to lock:

* Legacy reward materialization
* Final Team waiver amounts
* Final fixed rate table

***

**Version:** 7.2 | **Date:** October 5, 2026 | **Status:** Public — redemption window open (closes November 28, 2026)\
**Companion documents:** Litepaper, eligibility rules, fixed rate table, legacy reward reconciliation package, validator incentives spec


# cMATRA Launch Readiness

Launch date, security testing, rate-table reference, and wallet compatibility for the cMATRA Token Merger.

***

## Launch Date

**May 28, 2026.** The redemption window opens on this date.

* The redemption window is **6 months** long. It closes on **November 28, 2026**. See [README → Window mechanics](/materios-partner-chain/cmatra-token-merger#window-mechanics) for the full window rules and [FAQ Q35](/materios-partner-chain/faq#35-what-happens-after-six-months) for what happens at expiry.
* The live redemption portal is at [fluxpointstudios.com/matra-merger](https://fluxpointstudios.com/matra-merger).
* The merger is live. Security is handled through **continuous adversarial testing** rather than a one-off audit. See [Attacked, with dates](#attacked-with-dates) and the [risk disclosures](/materios-partner-chain/legal-and-disclaimers#risk-disclosure) before redeeming.

***

## Attacked, with dates

**Point-in-time audits are not enough for code that keeps changing, so we attack it continuously and date every result.**

* The merger contracts and off-chain signing services are open source at [github.com/Flux-Point-Studios/matra-token-merger](https://github.com/Flux-Point-Studios/matra-token-merger), so anyone can inspect them.
* An AI red team attacks the merger contracts and signing services. What it finds gets fixed and re-attacked before it ships. Each run's results are published, with its date, in the repository's `audit_pack/` folder.
* Safeguards in effect during the redemption window:
  * Every surrender is co-signed automatically by two independent signing services in the same transaction you sign. There is no manual approval step (see [FAQ Q35a](/materios-partner-chain/faq#35a-does-the-team-have-to-process-or-approve-my-surrender)).
  * Multisig-controlled administrator key with explicit pause and throttle authority (see [Legal § Force Majeure](/materios-partner-chain/legal-and-disclaimers#force-majeure-and-emergency-pause)).
  * Public testnet running the same code path that handles the merger on mainnet.
* Findings that materially affect users will be announced via [Discord](https://discord.gg/MfYUMnfrJM) and this page.
* Material status updates during incidents are posted in [Discord](https://discord.gg/MfYUMnfrJM). Support is best-effort during the redemption window; no service-level agreement is offered. Critical incidents (chain halt, contract exploit) are triaged immediately.
* Do **not** post seed phrases, raw private keys, or full wallet contents in any support channel. Materios staff will never ask for them.

***

## Rate Table

The reference rates are published on the live portal: [fluxpointstudios.com/matra-merger](https://fluxpointstudios.com/matra-merger).

The rate table is locked for the full 6-month redemption window once published, except under the governance-approved correction clause in [README → Window mechanics](/materios-partner-chain/cmatra-token-merger#window-mechanics). Source code and historical rate-table revisions are public at [github.com/Flux-Point-Studios/matra-token-merger](https://github.com/Flux-Point-Studios/matra-token-merger).

***

## Window Length

* **6 months** from the launch date.
* Public surrenders are permanently disabled at the on-chain validator level once the deadline passes. Any unreleased cMATRA returns to the project treasury under [README → Deadline and After-Window Handling](/materios-partner-chain/cmatra-token-merger#deadline-and-after-window-handling).
* **There will be no extension** and no late-surrender mechanism. Holders should redeem well before the deadline.

***

## Where cMATRA Lands

* **Cardano-native at launch.** cMATRA is minted on Cardano under the merger policy; you receive it in the same Cardano wallet that signed the surrender transaction. It is the Cardano-side form of MATRA, the network token of the Materios blockchain — see [What You Are Redeeming For](/materios-partner-chain/cmatra-token-merger#what-you-are-redeeming-for).
* **Materios bridge is future work.** The bridge that moves cMATRA into MATRA on the Materios partner chain is not yet operational. See [FAQ Q37](/materios-partner-chain/faq#37-do-i-need-to-bridge-to-materios-immediately-after-redeeming) for the intended onboarding flow (Cardano-first, address association, bridge or lock into Materios later as the flow matures).

***

## Wallet Compatibility

The redemption frontend uses **CIP-30** for wallet connection. The following wallets are supported at launch:

| Wallet            | Support type                                     |
| ----------------- | ------------------------------------------------ |
| Eternl            | CIP-30                                           |
| Lace              | CIP-30                                           |
| Nami              | CIP-30                                           |
| Flint             | CIP-30                                           |
| Begin             | CIP-30                                           |
| Vespr             | CIP-30                                           |
| Typhon            | CIP-30                                           |
| NuFi              | CIP-30                                           |
| Yoroi             | CIP-30                                           |
| GeroWallet        | CIP-30                                           |
| Ledger (hardware) | via supporting CIP-30 wallet (e.g. Eternl, Lace) |
| Trezor (hardware) | via supporting CIP-30 wallet (e.g. Eternl, Lace) |

* Hardware wallets are connected through a CIP-30 software wallet that supports the device.
* Other CIP-30-compliant wallets that are not on this list may still work at the protocol level, but Materios only QAs the redemption frontend against the wallets above.
* If you are unsure whether your wallet supports CIP-30, check the wallet's own documentation before the launch date.

***

## Pre-Launch Checklist for Holders

Before the redemption window opens:

1. **Self-custody.** Move eligible legacy assets (AGENT, SHARDS, eligible NFTs) into a CIP-30 wallet you control. Exchange and custodial balances are not directly redeemable; see [FAQ Q27](/materios-partner-chain/faq#27-what-if-my-assets-are-on-a-centralized-exchange-or-in-someone-elses-custody).
2. **Unfarm.** Remove AGENT/SHARDS from LP positions, lending protocols, and other script-controlled positions. LP tokens do not redeem — the underlying does. See [FAQ Q24](/materios-partner-chain/faq#24-what-if-my-agent-or-shards-are-in-an-lp-farm-on-minswap-wingriders-or-another-defi-platform).
3. **De-list NFTs.** Withdraw eligible NFTs from marketplaces and scripts. The eligible NFT itself (the user token for CIP-68) must be in your wallet at the time you surrender it. See [FAQ Q32](/materios-partner-chain/faq#32-what-if-my-nft-is-listed-on-a-marketplace-or-held-in-a-script).
4. **Read the legal page.** [Legal & Disclaimers](/materios-partner-chain/legal-and-disclaimers) — especially the **Jurisdiction Status** section.
5. **Read the FAQ.** [cMATRA FAQ](/materios-partner-chain/faq) covers the questions most holders ask before redeeming.

***

**Version:** 1.1 | **Launch:** May 28, 2026 | **Window closes:** November 28, 2026 | **Last updated:** October 5, 2026\
**Owner:** Flux Point Studios.


# cMATRA Legal & Disclaimers

Legal disclaimers, risk disclosures, jurisdiction notes, and tax / KYC placeholders for the cMATRA Token Merger. Read this before participating in the redemption window.

This page sets the legal context for participating in the cMATRA Token Merger. Read it before you redeem. The redemption window closes on **November 28, 2026**. The counsel-approved disclosures rendered on the live [redemption portal](https://fluxpointstudios.com/matra-merger) and the FPS [Terms of Service](https://fluxpointstudios.com/tos) are the canonical form; if anything here conflicts with the portal disclosures or the ToS, the portal and the ToS control.

***

## Not Investment Advice

cMATRA and MATRA are **utility tokens**. MATRA is the native network token of the Materios blockchain; cMATRA is its Cardano-side transitional form. Their intended use is operating, securing, and governing the network — not investment.

* Nothing on this page — or anywhere else in the cMATRA docs, the FPS Discord, the litepaper, or the rate table — constitutes investment advice, financial advice, legal advice, or tax advice.
* Nothing here constitutes an offer to sell, or a solicitation of an offer to buy, a security in any jurisdiction.
* No statement on this site should be read as a representation about future price, return, market cap, or liquidity. Markets are markets; we do not control them.
* Materios and Flux Point Studios make no recommendation about whether any specific person should or should not redeem.

### Staking rewards are network rewards, not revenue share

Any MATRA a holder may earn through delegation or validation is a **protocol-level block reward** paid by the Materios network for validation work and delegated security — the same category as Cardano's ADA staking rewards. Such rewards:

* are funded by the published Validator and Attestor Emissions sub-buckets — not by Flux Point Studios;
* are **not** interest, dividends, revenue share, profit share, or any other claim on FPS or any affiliate;
* are contingent on network operation, published schedules, and the holder's own participation — they are not guaranteed, and no revenue-sharing or profit-sharing program exists for cMATRA or MATRA. Any earlier description of Cardano-side staking programs with revenue-rewards streams refers to a **concluded legacy program** and does not apply to cMATRA or MATRA.

If you are unsure whether the merger is appropriate for your circumstances, consult an independent professional advisor before participating.

***

## Risk Disclosure

Participating in the cMATRA merger carries real risk. The following list is not exhaustive — it is the floor, not the ceiling.

### Smart-contract risk

* The Cardano-side merger contracts and the Materios chain are software. Software has bugs.
* AI red-team attacks, peer review, and a public testnet (`materios_preprod_v6`) reduce, but do not eliminate, the chance of a critical bug surfacing during or after launch.
* A bug in the surrender script, the cMATRA minting script, the bridge contracts, or the Materios runtime could result in **loss of funds, frozen funds, or incorrect minting**.
* See [Attacked, with dates](/materios-partner-chain/launch-readiness#attacked-with-dates) for how the code is tested.

### Market risk

* cMATRA and MATRA will be traded on at least one CLOB and on AMM secondary venues. Trading is voluntary and subject to ordinary market forces.
* **Price can go to zero.** No protocol mechanism guarantees a floor.
* **Liquidity can disappear.** Maker rebates, Protocol-Owned Liquidity, and other Liquidity sub-bucket programs are designed to keep depth healthy, but none of them are price guarantees. If maker quotes are pulled, spreads widen and slippage rises.
* **Volatility is normal at launch.** Initial price discovery on a new token routinely produces 30%+ daily swings. Do not redeem capital you cannot afford to see at half price.

### Counterparty and operational risk

* The merger is operated by Flux Point Studios under the Materios protocol. The on-chain validators, the publishing scripts, and the launch package are operated by humans.
* **Admin keys exist.** A multisig-controlled administrator key holds permissions over the merger contracts (e.g. closing the surrender path at the deadline, withdrawing unreleased cMATRA from the public pool after expiry). Key compromise, key holder coercion, or operator error are non-zero risks.
* **Bridges are not yet operational.** cMATRA at launch is a Cardano-native asset. The Materios bridge — which moves cMATRA into MATRA on the Materios chain — is future work. See [FAQ Q37](/materios-partner-chain/faq#37-do-i-need-to-bridge-to-materios-immediately-after-redeeming). When the bridge ships, it introduces its own counterparty surface (validator signers, peg reserve solvency).
* **Wallet and custodian risk.** If your Cardano wallet is compromised, or if you delegate custody to a third party (exchange, custodian, contract), you can lose access to your cMATRA. Materios cannot recover lost or stolen tokens.

### Regulatory risk

* Crypto regulation is in active flux in every major jurisdiction.
* The legal classification of cMATRA and MATRA in any specific jurisdiction is a question for that jurisdiction's authorities and your own counsel — not for these docs.
* **Future regulation may restrict redemption, transfer, or use** of cMATRA or MATRA in your jurisdiction even after you redeem. Materios cannot indemnify users against regulatory action.
* See [Jurisdiction Status](#jurisdiction-status) below.

### Protocol-evolution risk

* Materios is a live protocol. The runtime is upgraded via governance; pallets, fees, and reserves evolve.
* Documented governance-approved corrections to the rate table are explicitly contemplated by [Window mechanics](/materios-partner-chain/cmatra-token-merger#window-mechanics) — they are not promised to never happen.
* Future runtime upgrades, hard forks, or migration events may change how cMATRA behaves on-chain.

***

## Jurisdiction Status

The cMATRA Merger Portal is operated by **Flux Point Studios, Inc.**, a Delaware corporation. The Portal is **not offered to, and may not be used by**, any person located in, organized under the laws of, or ordinarily resident in any jurisdiction subject to comprehensive sanctions by the U.S. Department of the Treasury's Office of Foreign Assets Control — currently including **Cuba, Iran, North Korea, Syria**, and the **Crimea, Donetsk, and Luhansk** regions of Ukraine — nor by any person identified on any U.S., U.K., E.U., or U.N. sanctions or denied-persons list. By connecting a wallet you represent that you are not such a person and are not acting on behalf of such a person.

You are solely responsible for compliance with the laws, regulations, and tax rules of your jurisdiction. Materios reserves the right to geoblock the redemption frontend in any jurisdiction where it cannot comply with local law.

The full counsel-approved restricted-persons clause, dispute-resolution terms (Utah governing law, AAA binding individual arbitration, class-action and jury-trial waiver, 30-day opt-out), and corporate-law venue are rendered on the live [redemption portal](https://fluxpointstudios.com/matra-merger) and in the [Terms of Service](https://fluxpointstudios.com/tos).

***

## KYC / AML

* Public redemptions proceed via on-chain CIP-30 wallet signature. **No general KYC is collected** at the Portal.
* Strategic-allocation participants are subject to a separate enhanced-due-diligence process and are contacted directly.
* Materios reserves the right to delay or refuse any redemption that triggers sanctions, anti-money-laundering, or counter-terrorist-financing review until that review is complete.

***

## Tax

**Token redemption may be a taxable event in your jurisdiction.**

* No part of this site is tax advice.
* Consult a qualified tax professional licensed in your jurisdiction before redeeming or trading cMATRA or MATRA.
* Materios will not file or remit tax on your behalf, and does not issue tax forms beyond what is legally required of the operating entity.
* Keep your own records: surrender transaction hashes, on-chain timestamps, the rate at which you redeemed, and any subsequent trades. Block explorers are public but transient — back up the data you need.

***

## No Warranty — Software Provided As Is

* The Materios chain, the merger contracts, the cMATRA token, the redemption frontend, the SDKs, and any other software referenced in these docs are provided **"AS IS" and "AS AVAILABLE,"** with **no warranties of any kind**, express or implied, including without limitation any implied warranties of merchantability, fitness for a particular purpose, non-infringement, accuracy, or availability.
* Use of the protocol is at your own risk.
* To the maximum extent permitted by applicable law, Materios, Flux Point Studios, and their affiliates, contributors, validators, and operators **disclaim all liability** for any direct, indirect, incidental, special, consequential, or exemplary damages arising from your use of (or inability to use) the protocol, the merger, the redemption interface, or any related software.

***

## Force Majeure and Emergency Pause

* Materios may **pause, throttle, modify, or roll back the merger** in response to a discovered vulnerability, an active exploit, a credible threat to user funds, a regulatory directive, a chain outage, a Cardano L1 incident, or any other event that materially threatens the safe operation of the protocol.
* Any such pause will be announced through the official channels ([Discord](https://discord.gg/MfYUMnfrJM), [docs site](https://docs.fluxpointstudios.com), Materios chain governance notes) as soon as it is safe to do so.
* The duration of any pause is bounded by the underlying cause. The administrator does not have unilateral authority to permanently terminate the merger before the 6-month window expires absent one of the conditions above.

***

## Updates and Amendments

These docs are versioned in the public [`Flux-Point-Studios/docs`](https://github.com/Flux-Point-Studios/docs) repository.

* Every change is tracked in the git history (commit, author, date, diff).
* Material changes to this page or to the merger terms will be **announced on** [**Discord**](https://discord.gg/MfYUMnfrJM) and in the [Launch Readiness](/materios-partner-chain/launch-readiness) status board.
* Trivial corrections (typos, formatting, broken links) are made without separate announcement; the commit history is the source of truth.
* If you participated in the merger under an earlier version of these terms, that version of the terms applies to your participation as of your redemption transaction. The git history preserves prior versions for audit.

***

## Authoritative Materials

If anything on this page conflicts with the final launch package, the final launch package controls. The authoritative materials are listed in the [README's Authoritative Launch Materials section](/materios-partner-chain/cmatra-token-merger#authoritative-launch-materials).

***

**Version:** 1.1 | **Launch:** May 28, 2026 | **Window closes:** November 28, 2026 | **Last updated:** July 31, 2026\
**Owner:** Flux Point Studios.


# Overview

**Orynq** is Flux Point Studios' verifiable-AI stack. It produces cryptographic proof that AI systems did what they claimed — signed receipts for AI behavior, threshold-certified by the [Materios blockchain](/materios-partner-chain/materios) and immutably anchored to Cardano L1.

> **Orynq supersedes Proof-of-Inference (PoI).** The earlier $AGENT-denominated PoI protocol — job fees in $AGENT, staker fee-shares, inference-pool bonds, and PoI governance — is retired and will not ship. $AGENT itself is being consolidated into cMATRA under the [cMATRA Token Merger](/materios-partner-chain/cmatra-token-merger). On Materios, Orynq services are paid as ordinary network fees (MATRA / MOTRA capacity), and network security is compensated with validator and attestor block rewards — see the [PoI Litepaper (Legacy)](/orynq/litepaper) page for the full mapping.

## Overview

Orynq addresses the fundamental challenge of AI transparency: how do you prove what an AI did, with which inputs, producing which outputs? The stack combines:

* **Cryptographic Receipts**: Every observation or process trace generates a signed receipt with deterministic, content-addressed hashes
* **Threshold Certification**: A committee of independent attesters reaches quorum on Materios before a receipt batch is certified
* **On-Chain Anchoring**: Compact fingerprints are immutably anchored to Cardano (metadata label 8746)
* **Independent Verification**: Anyone can verify the full chain of custody from receipt fields back to a Cardano transaction, without trusting any single party

## Components

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Orynq SDK</strong></td><td>Developer toolkit for anchoring AI process traces via Materios to Cardano</td></tr><tr><td><strong>Orynq Observe</strong></td><td>SDK for publishing cryptographically-attested AI model observation receipts to a public registry</td></tr><tr><td><strong>Anchor-as-a-Service</strong></td><td>Managed API for anchoring AI process traces without running infrastructure</td></tr></tbody></table>

## Use Cases

### Enterprise AI Compliance

Create auditable records of AI decision-making for regulatory compliance and internal governance.

### AI Agent Verification

Prove that autonomous AI agents executed their tasks correctly and within defined parameters.

### Model Inference Auditing

Track which models processed which data, enabling accountability in AI pipelines.

### Research Reproducibility

Anchor experimental AI runs to enable independent verification of research results.

## Quick Links

* [Orynq SDK](/orynq/orynq-sdk) - Developer documentation
* [Orynq Observe](/orynq/observe) - Attested model observation receipts
* [Anchor-as-a-Service](https://fluxpointstudios.com/anchor) - Try the live demo
* [PoI Litepaper (Legacy)](/orynq/litepaper) - The superseded PoI-era specification, kept for the record
* [GitHub](https://github.com/Flux-Point-Studios/orynq-sdk) - Source code


# Orynq SDK

Developer SDK for Orynq anchoring and verification

The Orynq SDK provides tools for anchoring AI process traces to the Cardano blockchain and verifying those anchors. It supports both direct integration and a managed Anchor-as-a-Service API.

**Orynq** is the umbrella platform for AI verification and attestation services, with **process-trace anchoring** as its core capability. (Orynq supersedes the earlier Proof-of-Inference protocol — see the [Orynq overview](/orynq/proof-of-inference).)

## Features

* **Process Trace Anchoring** - Commit cryptographic proofs of AI execution to Cardano
* **Self-Hosted Anchoring** - Use your own wallet to anchor directly—no API fees
* **OpenClaw/Claude Code Integration** - Zero-config anchoring for AI coding sessions
* **Dual Protocol Support** - x402 (Coinbase standard) for EVM and Flux protocol for Cardano
* **Multi-Chain Payments** - Pay for anchoring in ADA or EVM stablecoins (per-receipt fees on Materios mainnet paid in MOTRA, generated from MATRA holdings)
* **Auto-Pay Client** - Automatic 402 payment handling with budget controls
* **Verification Tools** - Independently verify any anchor using only the txHash
* **TypeScript & Python** - Full SDK support for both languages

## Installation

### TypeScript/JavaScript

```bash
# Process tracing (instrument your AI agent)
npm install @fluxpointstudios/orynq-sdk-process-trace

# Self-hosted anchoring (use your own wallet)
npm install @fluxpointstudios/orynq-sdk-anchors-cardano lucid-cardano

# OR use the managed API with auto-pay client
npm install @fluxpointstudios/orynq-sdk-client
npm install @fluxpointstudios/orynq-sdk-payer-cardano-cip30  # Browser wallets
npm install @fluxpointstudios/orynq-sdk-payer-cardano-node   # Server-side
```

### Python

```bash
pip install orynq-sdk
```

***

## OpenClaw Integration

Automatically anchor your [OpenClaw](https://openclaw.ai) AI coding sessions to the blockchain with zero configuration. Every coding session becomes a verifiable, tamper-proof record.

### One-Line Install

```bash
# Linux/macOS
curl -fsSL https://raw.githubusercontent.com/Flux-Point-Studios/orynq-sdk/main/scripts/install-openclaw.sh | bash

# Windows (PowerShell)
irm https://raw.githubusercontent.com/Flux-Point-Studios/orynq-sdk/main/scripts/install-openclaw.ps1 | iex
```

This installs:

1. **OpenClaw** (official installer)
2. **Orynq OpenClaw recorder** as a background daemon

### Manual Install

```bash
npx @fluxpointstudios/orynq-openclaw install --service
```

### Configuration

After installation, add your Orynq partner key to enable on-chain anchoring:

```bash
# Linux/macOS
echo "ORYNQ_PARTNER_KEY=your_key_here" >> ~/.config/orynq-openclaw/service.env

# Windows
echo ORYNQ_PARTNER_KEY=your_key_here >> %APPDATA%\orynq-openclaw\service.env
```

Without a partner key, the recorder still creates local process traces—they just won't be anchored to the blockchain.

### Commands

| Command                                      | Description             |
| -------------------------------------------- | ----------------------- |
| `orynq-openclaw status`                      | Check daemon status     |
| `orynq-openclaw logs -f`                     | View logs (follow mode) |
| `orynq-openclaw start`                       | Run in foreground       |
| `orynq-openclaw restart-service`             | Restart the daemon      |
| `orynq-openclaw doctor`                      | Check configuration     |
| `orynq-openclaw uninstall --service --purge` | Remove completely       |

### How It Works

```
OpenClaw Session → JSONL Logs → Orynq Recorder → Process Trace → Cardano Anchor
```

1. **Tails** OpenClaw JSONL session logs in real-time
2. **Builds** cryptographic process traces with:
   * Rolling hash chains for event ordering
   * Merkle trees for selective disclosure
   * SHA-256 content hashes for integrity
3. **Anchors** manifests to Cardano via Orynq API
4. **Stores** local bundles, manifests, and receipts

**Privacy**: Only cryptographic hashes are sent to the blockchain—never raw prompts, code, or responses.

### Daemon Support

| Platform | Daemon Type          | Location                  |
| -------- | -------------------- | ------------------------- |
| Linux    | systemd user service | `~/.config/systemd/user/` |
| macOS    | launchd LaunchAgent  | `~/Library/LaunchAgents/` |
| Windows  | Task Scheduler       | User tasks                |

### Output Structure

```
~/.openclaw/orynq/recorder/
├── spool/           # Pending events by bundle
├── bundles/         # Complete process trace bundles
├── manifests/       # Anchor manifests (hashes only)
├── receipts/        # Anchor confirmations with txHash
├── chunks/          # Large bundle chunks
└── state/           # Tail position & anchor state
```

***

## Quick Start

### Anchoring a Process Trace

```typescript
import { OrynqClient } from '@fluxpointstudios/orynq-sdk-client';
import { createCip30Payer } from '@fluxpointstudios/orynq-sdk-payer-cardano-cip30';

// Connect to a CIP-30 wallet (Nami, Eternl, etc.)
const payer = await createCip30Payer(window.cardano.nami);

// Create client with auto-pay enabled
const client = new OrynqClient({
  payer,
  autoPay: true,
  budget: {
    maxPerRequest: '5000000',  // 5 ADA max per anchor
    maxPerDay: '50000000',     // 50 ADA daily limit
  },
});

// Create a process trace manifest
const manifest = {
  formatVersion: '1.0',
  agentId: 'my-ai-agent-v1',
  rootHash: 'sha256:abc123...',
  manifestHash: 'sha256:def456...',
  merkleRoot: 'sha256:789abc...',
  totalEvents: 47,
  totalSpans: 12,
  createdAt: new Date().toISOString(),
  metadata: {
    model: 'gpt-4',
    sessionId: 'session-001',
  },
};

// Anchor to Cardano (payment handled automatically)
const response = await client.fetch(
  'https://api-v3.fluxpointstudios.com/anchors/process-trace',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ manifest }),
  }
);

const result = await response.json();
console.log('Anchored:', result.txHash);
// View at: https://cardanoscan.io/transaction/{txHash}
```

### Python Example

```python
from orynq_sdk import OrynqClient, BudgetConfig

client = OrynqClient(
    payer=my_payer,
    auto_pay=True,
    budget=BudgetConfig(
        max_per_request="5000000",
        max_per_day="50000000",
    ),
)

manifest = {
    "formatVersion": "1.0",
    "agentId": "my-ai-agent-v1",
    "rootHash": "sha256:abc123...",
    "manifestHash": "sha256:def456...",
    # ... other fields
}

response = await client.fetch(
    "https://api-v3.fluxpointstudios.com/anchors/process-trace",
    method="POST",
    json={"manifest": manifest},
)

result = response.json()
print(f"Anchored: {result['txHash']}")
```

***

## Anchor-as-a-Service API

For applications that don't want to manage wallet infrastructure, use the managed Anchor-as-a-Service API.

### Endpoint

```
POST https://api-v3.fluxpointstudios.com/anchors/process-trace
```

### Request

```json
{
  "manifest": {
    "formatVersion": "1.0",
    "agentId": "your-agent-id",
    "rootHash": "sha256:...",
    "manifestHash": "sha256:...",
    "merkleRoot": "sha256:...",
    "totalEvents": 47,
    "totalSpans": 12,
    "createdAt": "2026-01-30T12:00:00Z",
    "metadata": {
      "model": "gpt-4",
      "sessionId": "..."
    }
  }
}
```

### Response (402 Payment Required)

The first request returns a 402 with payment details:

```json
{
  "x402": {
    "version": "1",
    "paymentRequired": true,
    "accepts": [{
      "scheme": "exact",
      "network": "cardano-mainnet",
      "maxAmountRequired": "2500000",
      "payTo": "addr1..."
    }]
  },
  "invoiceId": "inv_abc123"
}
```

### Response (200 Success)

After payment verification:

```json
{
  "success": true,
  "txHash": "abc123def456...",
  "requestId": "req_xyz789",
  "network": "cardano-mainnet",
  "explorerUrl": "https://cardanoscan.io/transaction/abc123def456..."
}
```

### Pricing

#### Pay-Per-Use (Self-Service)

Use your own Cardano wallet with the x402 payment protocol:

* **\~2-3 ADA per anchor** (at current network fees)
* No monthly fees or minimums
* Pay only when you anchor

#### Managed Anchoring

No crypto wallet needed • API key authentication • Pay by card

| Tier        | Monthly | Included Anchors | Overage        |
| ----------- | ------- | ---------------- | -------------- |
| **Starter** | $49/mo  | 500 anchors      | $0.15/anchor   |
| **Growth**  | $199/mo | 2,500 anchors    | $0.10/anchor   |
| **Scale**   | Custom  | Unlimited        | Volume pricing |

**Subscribe now:**

* [Starter Plan ($49/mo)](https://buy.stripe.com/7sY7sL6wXgNe9cl9sJfrW09)
* [Growth Plan ($199/mo)](https://buy.stripe.com/fZu14n7B168A88h0WdfrW0a)

**All plans include:**

* No wallet management required
* API key authentication (X-Partner header)
* Usage dashboard at [fluxpointstudios.com/orynq/enterprise-dashboard](https://fluxpointstudios.com/orynq/enterprise-dashboard)
* Pay via invoice (USD)
* Dedicated support
* SLA available

Contact <sales@fluxpointstudios.com> for custom Scale pricing.

***

## Self-Hosted Anchoring

For maximum control and privacy, you can anchor directly to Cardano using your own wallet—no API or service fees required. This is ideal for:

* **Privacy-conscious users** who don't want to route through a third-party API
* **High-volume anchoring** where per-anchor fees add up
* **Air-gapped environments** with no external API access
* **Custom integrations** with existing Cardano infrastructure

### Installation

```bash
npm install @fluxpointstudios/orynq-sdk-process-trace \
            @fluxpointstudios/orynq-sdk-anchors-cardano \
            lucid-cardano
```

### Complete Example

```typescript
import {
  createTrace,
  addSpan,
  addEvent,
  closeSpan,
  finalizeTrace,
} from "@fluxpointstudios/orynq-sdk-process-trace";

import {
  createAnchorEntryFromBundle,
  buildAnchorMetadata,
  serializeForCbor,
  POI_METADATA_LABEL,
} from "@fluxpointstudios/orynq-sdk-anchors-cardano";

import { Lucid, Blockfrost } from "lucid-cardano";

// 1. Instrument your AI agent
const run = await createTrace({ agentId: "my-agent" });
const span = addSpan(run, { name: "task" });

await addEvent(run, span.id, {
  kind: "observation",
  content: "User requested code review",
  visibility: "public",
});

await addEvent(run, span.id, {
  kind: "decision",
  content: "Will check for security issues first",
  visibility: "public",
});

await closeSpan(run, span.id);
const bundle = await finalizeTrace(run);

// 2. Build anchor metadata
const entry = createAnchorEntryFromBundle(bundle);
const metadata = serializeForCbor(buildAnchorMetadata(entry));

// 3. Submit with your own wallet
const lucid = await Lucid.new(
  new Blockfrost("https://cardano-mainnet.blockfrost.io/api/v0", "your-project-id"),
  "Mainnet"
);
lucid.selectWalletFromSeed("your seed phrase here");

const tx = await lucid
  .newTx()
  .attachMetadata(POI_METADATA_LABEL, metadata[POI_METADATA_LABEL])
  .complete();

const txHash = await tx.sign().complete().then(t => t.submit());
console.log("Anchored:", txHash);
```

### Cost

* **Mainnet**: ~~0.2-0.3 ADA per anchor (~~$0.10-0.20 USD) — just the Cardano tx fee
* **Preprod testnet**: Free (get test ADA from the [faucet](https://docs.cardano.org/cardano-testnets/tools/faucet/))

No service fees, no subscriptions—you pay only the blockchain transaction fee.

### cardano-cli Alternative

If you prefer cardano-cli over Lucid:

```typescript
import { serializeForCardanoCli } from "@fluxpointstudios/orynq-sdk-anchors-cardano";

const cliJson = serializeForCardanoCli(buildAnchorMetadata(entry));
fs.writeFileSync("metadata.json", cliJson);
```

```bash
cardano-cli transaction build \
  --tx-in <UTXO> \
  --change-address <YOUR_ADDRESS> \
  --metadata-json-file metadata.json \
  --out-file tx.raw

cardano-cli transaction sign \
  --tx-body-file tx.raw \
  --signing-key-file payment.skey \
  --out-file tx.signed

cardano-cli transaction submit --tx-file tx.signed
```

### Full Example

See the complete runnable example: [github.com/Flux-Point-Studios/orynq-sdk/tree/main/examples/self-anchor](https://github.com/Flux-Point-Studios/orynq-sdk/tree/main/examples/self-anchor)

***

## Verification

### Verify via API

```bash
curl "https://api-v3.fluxpointstudios.com/anchors/verify?txHash=abc123..."
```

Response:

```json
{
  "verified": true,
  "network": "cardano-mainnet",
  "txHash": "abc123...",
  "onChainData": {
    "schema": "poi-anchor-v1",
    "type": "process-trace",
    "manifestHash": "sha256:def456...",
    "rootHash": "sha256:abc123...",
    "timestamp": "2026-01-30T12:00:00Z"
  }
}
```

### Verify Independently

Anyone can verify an anchor using Blockfrost or Cardanoscan:

```bash
# Fetch transaction metadata (label 2222)
curl -H "project_id: $BLOCKFROST_KEY" \
  "https://cardano-mainnet.blockfrost.io/api/v0/txs/{txHash}/metadata"
```

The metadata under label `2222` contains:

```json
{
  "schema": "poi-anchor-v1",
  "type": "process-trace",
  "manifestHash": "sha256:...",
  "rootHash": "sha256:...",
  "timestamp": "..."
}
```

***

## On-Chain Data Format

Orynq anchors are stored under Cardano metadata **label 2222** with the following schema:

| Field          | Type   | Description                           |
| -------------- | ------ | ------------------------------------- |
| `schema`       | string | Always `"poi-anchor-v1"`              |
| `type`         | string | Anchor type (e.g., `"process-trace"`) |
| `manifestHash` | string | SHA-256 hash of the full manifest     |
| `rootHash`     | string | Root hash of the process trace        |
| `merkleRoot`   | string | Merkle root of events (optional)      |
| `timestamp`    | string | ISO 8601 timestamp                    |

**Important**: Only cryptographic hashes are stored on-chain. Raw prompts, responses, and sensitive data are **never** written to the blockchain.

***

## SDK Packages

| Package                                           | Description                                                   |
| ------------------------------------------------- | ------------------------------------------------------------- |
| `@fluxpointstudios/orynq-sdk-process-trace`       | Cryptographic process trace builder                           |
| `@fluxpointstudios/orynq-sdk-anchors-cardano`     | Cardano anchor builder & verifier (for self-hosted anchoring) |
| `@fluxpointstudios/orynq-sdk-core`                | Protocol-neutral types and utilities                          |
| `@fluxpointstudios/orynq-sdk-client`              | Auto-pay HTTP client with budget tracking                     |
| `@fluxpointstudios/orynq-sdk-payer-cardano-cip30` | CIP-30 browser wallet payer                                   |
| `@fluxpointstudios/orynq-sdk-payer-cardano-node`  | Server-side Cardano payer                                     |
| `@fluxpointstudios/orynq-sdk-payer-evm-x402`      | EIP-3009 gasless EVM payer                                    |
| `@fluxpointstudios/orynq-sdk-server-middleware`   | Express/Fastify payment middleware                            |
| `orynq-sdk` (Python)                              | Python SDK with async support                                 |

***

## Try It Now

**Live Demo**: [fluxpointstudios.com/orynq](https://fluxpointstudios.com/orynq)

Try anchoring on testnet for free—no wallet required.

**GitHub**: [github.com/Flux-Point-Studios/orynq-sdk](https://github.com/Flux-Point-Studios/orynq-sdk)

***

## Support

* **Discord**: [discord.gg/MfYUMnfrJM](https://discord.gg/MfYUMnfrJM)
* **Twitter**: [@fluxpointstudio](https://twitter.com/fluxpointstudio)
* **Email**: <support@fluxpointstudios.com>


# Orynq Observe

SDK for publishing cryptographically-attested AI model observation receipts to a public registry, anchored to Materios L2 and finalized on Cardano L1.

`orynq-observe` is a developer SDK for producing cryptographically-attested AI model observation receipts. Each receipt commits — under a content-addressed hash anchored to Cardano L1 — to a structured claim of the form *"model X exhibited behavior Y at time Z, here is the evidence."*

Receipts are published to a public registry where they are queryable by anyone and cannot be silently withdrawn.

* **Schema:** [`ai_capability_observation_v1`](https://github.com/Flux-Point-Studios/orynq-sdk/blob/main/packages/anchors-materios/src/schemas/ai_capability_observation_v1.ts) — byte-pinned canonical CBOR, Python ↔ TypeScript lockstep.
* **Taxonomy:** [Flux-Point-Studios/ai-capability-taxonomy](https://github.com/Flux-Point-Studios/ai-capability-taxonomy) — public CVE-style stable identifiers for the observed capability classification.
* **Public registry:** browseable at `fluxpointstudios.com/observations` (rolling out).

## Installation

### Python

```bash
pip install orynq-observe
```

### TypeScript / JavaScript

```bash
npm install @orynq/observe
```

Both packages expose the same fluent builder API and the same byte-pinned canonical encoder.

## Quickstart

Time from a fresh `pip install` to a signed canonical receipt is under 10 seconds.

### Python

```python
from orynq_observe import Observation, keypair_from_seed

# Bring your own sr25519 observer key (or generate one with `orynq-observe keygen`)
observer = keypair_from_seed("0x" + "00" * 32)

obs = Observation(
    model_name="claude-opus-4-7",
    model_version="20260201",
    taxonomy_id="AUTO-MONEY-001",
    severity="high",
    observer_context="independent evaluation, agentic-finance harness",
)
obs.add_evidence(prompt="<full prompt>", response="<full response>")

# Optional: full transcript upload (content-addressed; gateway returns artifactRef)
# obs.add_artifact("/path/to/transcript.json")

# Optional: wrap evidence in a TEE attestation
# obs.attest_tee(tier="Acurast", evidence_hex="…")

receipt = obs.submit(signer=observer, network="preprod")
print(receipt.materios_tx, receipt.cardano_anchor_tx)
```

### TypeScript

```typescript
import { Observation, keypairFromSeed } from "@orynq/observe";

const observer = keypairFromSeed("0x" + "00".repeat(32));

const obs = new Observation({
  modelName: "claude-opus-4-7",
  modelVersion: "20260201",
  taxonomyId: "AUTO-MONEY-001",
  severity: "high",
  observerContext: "independent evaluation, agentic-finance harness",
});
obs.addEvidence({ prompt: "<full prompt>", response: "<full response>" });

const receipt = await obs.submit({ signer: observer, network: "preprod" });
console.log(receipt.materiosTx, receipt.cardanoAnchorTx);
```

### CLI

A small CLI ships with both packages for keypair management and one-shot submission:

```bash
orynq-observe keygen --out observer.json
orynq-observe submit \
  --signer observer.json \
  --model claude-opus-4-7 --version 20260201 \
  --taxonomy AUTO-MONEY-001 --severity high \
  --prompt-file prompt.txt --response-file response.txt
```

## Receipt fields

The canonical `ai_capability_observation_v1` wire format:

| Field                              | Type                                          | Notes                                                                   |
| ---------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------- |
| `model.name`                       | string                                        | e.g. `"claude-opus-4-7"`                                                |
| `model.version`                    | string                                        | Model release / build identifier                                        |
| `model.hash`                       | hex \| `null`                                 | Hash of model weights if known                                          |
| `capability.taxonomyId`            | string                                        | Resolves in the taxonomy registry, e.g. `"AUTO-MONEY-001"`              |
| `capability.severity`              | `low` \| `medium` \| `high` \| `critical`     |                                                                         |
| `observation.promptHash`           | hex (sha256)                                  | Hash of the prompt; the prompt itself is **not** put on chain           |
| `observation.responseHash`         | hex (sha256)                                  | Hash of the response; not put on chain                                  |
| `observation.artifactRef`          | content-addressed ref \| `null`               | Optional pointer to the full transcript stored off-chain                |
| `observation.occurredAt`           | ISO 8601 UTC                                  |                                                                         |
| `observer.ss58`                    | string                                        | Materios address of the attester                                        |
| `observer.context`                 | string                                        | Short human-readable context, ≤ 280 chars                               |
| `observer.teeAttestation.tier`     | `ARM-TZ` \| `Acurast` \| `SEV-SNP` \| `build` | Present only if the observer ran inside a hardware-attested environment |
| `observer.teeAttestation.evidence` | hex                                           | TEE evidence blob                                                       |

The receipt's `content_hash` is the SHA-256 of the canonical CBOR pre-image. Python and TypeScript produce byte-identical encodings for the same input — verified by cross-language lockstep tests in CI.

## What never goes on chain

* Raw prompt text
* Raw response text
* Any free-form artifact contents (only their content-addressed hash, plus an optional pointer to where the artifact is stored)

Only the structured field set above is committed.

## Attestation flow

1. The SDK signs the canonical CBOR pre-image with the observer's sr25519 key and submits the envelope to the Materios blob gateway.
2. The gateway forwards to the receipt submitter, which calls `submit_receipt_v2(content_hash, schema_hash)` on Materios.
3. The cert-daemon committee independently encodes the receipt, signs over the canonical bytes, and emits an `AvailabilityCertified` event once an M-of-N threshold is reached.
4. The anchor-worker batches certified receipts and writes them to Cardano L1 under metadata label `8746`.

After step 4, anyone with the `content_hash` can verify the full chain of custody from the receipt fields all the way back to a Cardano transaction, without trusting any single party.

## Querying observations

Receipts are queryable through three surfaces:

* **Public registry UI** — `fluxpointstudios.com/observations`, with filters for model, taxonomy ID, severity, observer, TEE tier, and date range. An RSS feed lives at `/observations.rss`.
* **JSON API** — `GET https://materios.fluxpointstudios.com/api/observations` (list) and `GET …/api/observations/:contentHash` (detail). The list endpoint accepts the same filter parameters as the UI.
* **Provenance graph** — every receipt's full lineage is renderable at `fluxpointstudios.com/materios/trace/<contentHash>`.

## Networks

| Network   | Materios chain                        | Cardano L1              | Cost                                                                                          |
| --------- | ------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------- |
| `preprod` | Materios preprod (v6)                 | Cardano preprod testnet | Free — sponsored receipt submission, plus a Cardano testnet anchor fee covered by the gateway |
| `mainnet` | Materios mainnet (post-cMATRA launch) | Cardano mainnet         | Per-receipt fee paid in MOTRA (generated from MATRA holdings) via the SDK's auto-pay layer    |

The preprod path is free for researchers and evaluation orgs. A sponsored Bearer token is required for the gateway-hosted submission path; request one at [Discord](https://discord.gg/MfYUMnfrJM).

## Source

* **SDK packages:** [github.com/Flux-Point-Studios/orynq-sdk](https://github.com/Flux-Point-Studios/orynq-sdk) — under `packages/orynq-observe` (Python) and `packages/orynq-observe-js` (TypeScript).
* **Canonical schema codec:** under `packages/anchors-materios/src/schemas/ai_capability_observation_v1.ts` and `python/orynq_sdk/schemas/ai_capability_observation_v1.py`. The SDK packages consume this canonical codec directly — single source of truth, byte-pinned across languages.
* **Taxonomy:** [github.com/Flux-Point-Studios/ai-capability-taxonomy](https://github.com/Flux-Point-Studios/ai-capability-taxonomy) — MIT, accepts community PRs.

## Related

* [Orynq SDK](/orynq/orynq-sdk) — the broader Orynq SDK family, including process-trace anchoring and the Anchor-as-a-Service API.
* [Materios Partner Chain Overview](/materios-partner-chain/materios) — the L2 that observation receipts are anchored to.

## Support

* Discord: [discord.gg/MfYUMnfrJM](https://discord.gg/MfYUMnfrJM)
* Email: <support@fluxpointstudios.com>


# PoI Litepaper (Legacy)

Legacy document. The PoI protocol and its $AGENT economics are superseded by Orynq on the Materios blockchain and by the cMATRA Token Merger.

> **Superseded — kept for the record.** Proof-of-Inference (PoI) evolved into [**Orynq**](/orynq/proof-of-inference), Flux Point Studios' verifiable-AI stack on the [Materios blockchain](/materios-partner-chain/materios). The $AGENT-based economics described in the original litepaper — job fees paid in $AGENT, the 70/28/1/1 fee split, epoch-rolled staker payouts, inference-pool bonds, and $AGENT-weighted governance — are **retired and will not ship**. There are no $AGENT rewards, staker fee-shares, or PoI governance going forward. $AGENT is being consolidated into **cMATRA** under the [cMATRA Token Merger](/materios-partner-chain/cmatra-token-merger); holders can surrender it at the [official portal](https://fluxpointstudios.com/matra-merger) until **November 28, 2026**.

***

## What PoI was

PoI (2025) was the original framework for **verifiable AI on Cardano**: deterministic inference runs (fixed seed/params, rolling hashes) emitting signed receipts, with compact fingerprints anchored on-chain so anyone could later verify who ran what, with which model, from which inputs, producing which outputs. A preview-testnet demonstration ran decentralized inference on a Petals-based swarm, generated a signed PoI receipt, and anchored it to Cardano under metadata label 2222.

The verification idea was right. The token economics wrapped around it were not — they tied a verification protocol to a bespoke fee-and-rewards token, which is exactly the kind of app-by-app utility scheme the cMATRA merger retires.

## Where each piece went

| PoI-era design                                        | Current equivalent                                                                                                           |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Signed inference receipts, anchored on Cardano (2222) | **Orynq receipts** — threshold-attested on Materios, batch-anchored to Cardano L1 under label **8746**                       |
| $AGENT as gas / Babel-fee job payments                | Ordinary **Materios network fees** — MATRA holdings generate MOTRA capacity, which pays per-receipt fees                     |
| 28% staker fee-share, epoch-rolled payouts            | **Retired.** Network security is compensated with validator and attestor **block rewards** from published emission schedules |
| $AGENT inference-pool bonds and slashing              | **Attestor bond/slash economics** on Materios (Attestor Emissions sub-bucket)                                                |
| PoI governance ($AGENT-weighted voting)               | **Retired.** Materios chain governance, carried by MATRA as governance decentralizes                                         |
| $AGENT token                                          | Consolidating into **cMATRA → MATRA**, the network token of the Materios blockchain, via the merger                          |

## Where to go instead

* [**Orynq overview**](/orynq/proof-of-inference) — the current verifiable-AI stack
* [**Orynq SDK**](/orynq/orynq-sdk) — process-trace anchoring and Anchor-as-a-Service
* [**Orynq Observe**](/orynq/observe) — attested AI model observation receipts and the public registry
* [**Materios Partner Chain**](/materios-partner-chain/materios) — the chain that certifies and anchors Orynq receipts
* [**cMATRA Token Merger**](/materios-partner-chain/cmatra-token-merger) — how to trade $AGENT for the network token

***

*The full original litepaper text (October 14, 2025) remains available in the* [*git history*](https://github.com/Flux-Point-Studios/docs/commits/main/proof-of-inference/litepaper.md) *of this page. This document is informational and does not constitute an offer to sell tokens.*


# Overview

SaturnSwap — Cardano-native order-book DEX with cross-chain routing

SaturnSwap is a **Cardano-native decentralized exchange** built by Flux Point Studios. It pairs an on-chain **central limit order book (CLOB)** with liquidity-pool depth, giving traders true limit orders and market orders on Cardano while keeping custody of their assets at all times. Beyond Cardano, SaturnSwap routes orders across a dozen external chains through an aggregator layer, and ships an AI trading assistant for natural-language swaps.

Live at [saturnswap.io](https://saturnswap.io).

## Design goals

* **Non-custodial by construction.** Every trade is a Cardano transaction the user signs in their own wallet. SaturnSwap never holds user keys or funds.
* **Real order books on Cardano.** Most Cardano DEXs are pure AMMs. SaturnSwap adds a genuine limit-order book so traders can post resting orders at a chosen price, not just swap at spot.
* **One signature, broad reach.** A single connected wallet can trade Cardano-native pairs and, through the aggregator, reach liquidity on other chains.
* **Transparent settlement.** Orders settle on-chain against validators an AI red team attacks every week, with a dated public record of each run; balances, fills, and liquidity are all verifiable from the ledger.

## How it works

SaturnSwap is a hybrid of three layers — on-chain validators, an off-chain matching/serving backend, and a web client — connected by a build-sign-submit transaction flow.

```
   Wallet (CIP-30)                Frontend (Next.js)
        |  sign                        |  GraphQL
        v                              v
   Cardano L1  <----- submit -----  Backend (.NET 8)
   saturn_swap / saturn_liquidity   order matching, TX build,
   Aiken validators                 chain indexing (Blockfrost)
```

### On-chain: Aiken validators

The protocol's settlement rules live in two Aiken (Plutus) validators:

| Validator              | Responsibility                                                                                                                                                                                     |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`saturn_swap`**      | Escrows and settles limit/market orders. Enforces that a filled order pays the maker the agreed price and returns the correct assets, and that cancellations return funds only to the order owner. |
| **`saturn_liquidity`** | Manages liquidity positions and the control/pool UTxOs that back order-book depth, governing deposits, withdrawals, and fee accrual.                                                               |

Because Cardano uses the eUTxO model, each open order and liquidity position is its own UTxO with a datum describing its terms. Settlement consumes those UTxOs and produces outputs that the validator checks against the order's stated price and ownership.

### Off-chain: matching and serving

A .NET 8 backend exposes a **GraphQL API** (plus REST aggregator/router endpoints) that the client uses for all reads and transaction construction. It indexes the chain through **Blockfrost**, persists order-book and pool state in PostgreSQL, and builds the unsigned transactions that implement each trade. It never signs on the user's behalf.

### Transaction flow

Every state-changing action follows the same non-custodial pattern:

1. **Build** — the client calls a GraphQL mutation (e.g. `createOrderTransaction`, `createLiquidityTransaction`); the backend returns an *unsigned* transaction.
2. **Sign** — the user's CIP-30 wallet signs it locally, preserving witness order.
3. **Submit** — the client calls the matching `submit…Transaction` mutation to broadcast it.

## Trading

* **Market orders** — execute immediately against available depth. Minimum **5 ADA** per order.
* **Limit orders** — post a resting order at a chosen price; fills settle on-chain when the market reaches it. Minimum **25 ADA** per order (a single source of truth shared by the UI and backend, surfaced clearly before submission rather than silently rejected).
* **Liquidity provision** — supply assets to back order-book depth and earn a share of trading fees.

Amounts throughout the API are expressed in **display units** (e.g. `5` = 5 ADA), not lovelace.

## Cross-chain routing

SaturnSwap integrates the **UEX aggregator** to extend reach beyond Cardano. A routing layer compares SaturnSwap's native order-book pricing against aggregator quotes and settles on the better path — Cardano-native when SaturnSwap wins, cross-chain when the aggregator does. The integration spans **12 chains**, with quote → order → status tracking and deposit-address validation handled end-to-end. Native Cardano settlement always takes precedence when it offers the better execution.

## Aurora — AI trading assistant

SaturnSwap ships **Aurora**, a conversational assistant that turns natural-language requests ("swap 100 ADA for SNEK", "what's trending today") into structured, reviewable trade actions. Aurora is backed by Flux Point Studios' T-Backend (see the [T-Backend Developer Guide](/products/t-backend-developer-guide)) and uses live market data for token discovery. It proposes transactions; the user always reviews and signs.

## Token launches and seasons

* **Liftoff** — a launch surface for new Cardano tokens, with optional support for pre-minted policies.
* **Saturn Wars** — ranked trading seasons with a leaderboard across volume, liquidity, and a skill rating, where top performers share a portion of protocol fees.

## Wallets

SaturnSwap works with CIP-30 Cardano wallets — including **Eternl, Lace, Nami, and Vespr** — connected through the Lucid library. Connecting a wallet is read-and-sign only; the application requests signatures for transactions the user explicitly initiates.

## Security model

* **Self-custody** — keys and funds never leave the user's wallet.
* **Validator-enforced settlement** — fills and cancellations are constrained by the on-chain validators, not by backend trust. A malicious or buggy backend cannot move funds against the validator rules.
* **Reviewable actions** — every transaction (including AI-proposed ones) is shown before signing.
* **Minimums and guardrails** — order minimums and slippage are validated client-side before a wallet prompt, with backend validation as the authoritative check.

## Status

SaturnSwap is **live on Cardano mainnet** at [saturnswap.io](https://saturnswap.io), with the v3 interface (swap, tokens, orders, liquidity, leaderboard, portfolio, and the Aurora AI surface) in active development.

## Building on SaturnSwap?

Aggregators, routers, and apps can execute swaps through SaturnSwap's order book via the public GraphQL API — no API key, no on-chain contract work. See [API Integration (Aggregators)](/saturnswap/api-integration).


# Market Making as a Service

Market Making as a Service: a continuously quoted two-sided book on your token. Your key alone can move it anywhere; our bot key can only reprice it in place, return it to your payout address, or pay

A new Cardano token usually has no resting bid and no resting ask. Someone who wants to buy has nothing to lift; someone who wants to sell has nothing to hit. The usual fix is to hand a market maker your inventory and hope.

**MMaaS is that service without the handover.** You keep the keys. You fund a two-way order on SaturnSwap's on-chain order book, a canonical cardano-swaps two-way order that carries a bid and an ask at once, and SaturnSwap's keeper reprices it around a live mid as the market moves, so both sides stay quoted instead of going stale.

Setup is self-serve, in your browser, at [saturnswap.io/v3/mmaas](https://saturnswap.io/v3/mmaas). Every transaction is built and signed by your own wallet; there is no form to fill in and no approval to wait for. What is still manual is listed in [What is not automatic yet](/saturnswap/setting-up-a-book#what-is-not-automatic-yet).

## Check which validator your book uses

The guarantees below describe the CURRENT generation. A book already funded keeps the generation its credential hashes, and an older one lacks the protections added after it. A guarantee is not acquired by source or documentation changing. Read [Validator generations](/saturnswap/validator-generations) for which generations exist, what each one enforces, how to verify your funded address, and the client-signed migration path.

## Custody: what we can and cannot do

Your inventory rests at a two-way order address whose **stake credential is a Plutus validator, `maker_stake_bound`, compiled from your own parameters**. It governs owner actions; permissionless taker fills also follow the DEX spend validator. These are separate paths.

Its `withdraw` handler is a two-branch `or`. The first branch is just:

```
list.has(self.extra_signatories, client_owner_vkh)
```

Your signature, alone, unconditionally. It reads nothing else. Spending a resting order requires that credential to appear in the transaction's withdrawals, so **you can sign cancellations and take the recovered funds anywhere you like**, in batches that fit transaction limits. No cooperation from us, no notice, and we never hold that key. Mint, spend, vote and propose under the same hash are client-only too, and every certificate except a bare registration needs your signature, so we cannot deregister your credential to pocket its deposit, and we cannot delegate your stake.

The second branch is what SaturnSwap can do. It requires our bot key **and** a per-asset conservation check: everything spent from your order addresses must land either back at an order address carrying the same stake credential and input pair with an in-band, decodable datum, or in an exact-address, datum-free output to the payout address your ceremony names, plus a bounded, ADA-only fee leg at the published fee address, bounded in total so splitting it across outputs does not multiply it. Anything else fails the transaction.

So, stated plainly: **we can reprice your order and cancel it back to your payout address.** Bot transactions must preserve your assets within the permitted outputs, including the bounded ADA fee leg described above. These checks are enforced by consensus. The cases in which the keeper returns your book to your payout address on its own are in [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).

The same check is why the gas is ours. Your order's own value can only reach those three destinations, so a transaction that paid its network fee out of your inventory would come up short and be rejected. Every reprice we sign, we fund.

## The band

You set two prices, and the validator enforces them on every quote:

* **`min_asset1_price` is the most we may bid.** The keeper can never pay more than this in ADA per token.
* **`min_asset2_price` is the least we may ask.** The keeper can never sell your token below this.

Both are checked by `rational_geq` against the continuation datum, so an out-of-band quote is not a policy we promise to follow but a transaction the chain refuses. The validator also refuses a **crossed** band: the ask floor must sit at or above the bid ceiling, which is what stops a filler round-tripping your own book for a profit.

The band is fixed at setup, because it is one of the nine parameters the address is derived from. Changing it means a new instance at a new address. See [Risks, limits, and how to leave](/saturnswap/risks-and-exit#one-band-per-instance).

## What it costs

|                    |                                                                                                                                                                                                                                                                                                       |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Credential deposit | **2 ADA**, the Cardano stake-credential deposit. Refunded in full when you retire the credential.                                                                                                                                                                                                     |
| Service fee        | Default **20 basis points (0.20%) of eligible settled ADA notional**, subject to the client's billing grant and any configured cap. Metered by the backend and collected from a **separate prepaid ADA fee channel**. This is not a deduction from each swap or the inventory validator's payout fee. |
| Prepaid balance    | You fund the fee channel separately from trading inventory. The operator can collect from it under the channel's signing policy; you can reclaim the remaining balance with your own key.                                                                                                             |
| Network fees       | You pay transactions you sign. The operator funds keeper reprices and inventory cancellations. A fee-channel collection pays its network fee from the channel balance, in addition to the amount collected.                                                                                           |

For how this compares with a desk retainer or a token loan, and what gas and fees came to on SaturnSwap's own measured book, see [Measured economics](/saturnswap/measured-economics).

### How service billing works

The backend values an eligible fill by the ADA that moved, applies the grant's fee rate, and limits the accrued amount by its configured cap. It checks consent lineage, grant timing and finality, excludes known operator fills using the transaction's full signer set, and holds historical fills whose signer evidence is missing. An unfamiliar signer is **unattributed**; it does not prove the counterparty is independent. Token-to-token fills with no ADA leg have no ADA notional under this meter.

The fee collector draws the uncollected amount from your prepaid channel. The two-operator-key channel has the native-script policy **either both operator keys together, or your client key alone**. A legacy channel instead permits **either one operator key, or your client key alone**. Verify which script and keys your channel uses before funding it.

**The prepaid balance has different protections from trading inventory.** The native script checks signatures. It does not check an invoice, a fee rate, a period cap or how much an authorised operator branch spends. Billing eligibility and collection limits are software and co-signer policy controls. The inventory validator's `max_fee_bps = 500` does **not** cap a fee-channel draw. Keep the channel balance consistent with the exposure you accept.

Signing the consent statement authorises the keeper to make a market in your token for that one ceremony, on the four terms the statement names. It does not enrol a billing grant or place the grant's commercial terms on chain.

### The separate inventory-validator fee capability

The inventory validator permits a bounded, ADA-only fee output at its published fee address. Its bound is calculated on realised ADA payout plus that fee, with `max_fee_bps = 500` in the published parameters. A beacon-burning close requires this **inventory fee** to be zero. Generations after the earliest subtract withdrawn staking rewards from that fee basis; the earliest does not, and [Validator generations](/saturnswap/validator-generations) says which is which. These rules describe the inventory transaction, not commercial fee-channel collection; closing a book does not erase already accrued service fees.

The five operator-side ceremony values, and how to check each one on chain, are listed in [The five values SaturnSwap publishes](/saturnswap/setting-up-a-book#the-five-values-saturnswap-publishes). Check the [validator generation](/saturnswap/validator-generations) of the address you actually funded.

## What your token needs

**A live market, on two feeds.** Prices come from two independent public sources (bending.ai and GeckoTerminal), read by policy id and asset name, with a divergence breaker between them.

* Setting up a band needs **both** feeds to answer and to agree within **5%**. One feed is not enough: a band is permanent, and a mid read from a single source is a permanent decision made on an unchecked number.
* Once you are running, the keeper applies the same rule each round. A pair sourced from feeds is priced by its feeds **or not at all**. A feed outage or a divergence trip means your book is not quoted that round rather than quoted badly. If it lasts 15 minutes, the keeper closes your book back to your payout address. Every book reads the same two feeds, so a 15-minute outage at either provider closes every book at once; see [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).
* An operator-set constant mid is **refused outright on mainnet** by the keeper's own code. It would stub both feeds with one number and defeat the breaker.

A token listed on neither feed cannot currently be quoted. You can still build a band by hand, but nothing will work it.

**Which tokens.** The page sets up books only for the tokens our keeper quotes: NIGHT, SNEK, MIN, DJED, Talos, USDM, iBTC and iUSD. The keeper prices a book only when its own decimals record covers the token and refuses every other token, so the page does not offer a book the keeper would refuse. The list grows when we add a token to the keeper's record and redeploy the page. Ask us if you want yours added.

**Published decimals.** Your token's decimals are a scale exponent baked permanently into your order address, so the page resolves them from the token's own CIP-68 on-chain metadata or the CIP-26 token registry. It refuses to continue if neither states them, if the two disagree, or if they differ from the value the keeper holds on record for that token.

## What you sign

Three wallet prompts, in this order (and one more if you are moving an existing book):

1. **Consent**: sign the consent statement with the wallet that owns the vault. It is a CIP-30 signature, no transaction and no fee.
2. **Register** your credential on chain (the 2 ADA deposit).
3. **Fund** the order (your inventory into your own order address).

{% hint style="warning" %}
Funding new books through the page is closed until a combined red-team run against the release that will take funds returns GREEN. You can still prove your wallet by signing the consent statement, and register your instance. See [Security evidence](/saturnswap/security-evidence).
{% endhint %}

**The order matters.** That first signature is your consent to be market-made. The statement you sign says so in its second line, *"I consent to SaturnSwap making a market in my token with its bot key, on the terms below"*, and names your token and your four terms: spread, book value cap, daily loss limit and reprice threshold. Sign it before you register and it travels *inside* the registration transaction as metadata under label 8747. A registration cannot be amended afterwards. If you registered first, the page offers **Publish my consent**, a separate transaction that carries the same record; see [If your credential is already registered without consent](/saturnswap/setting-up-a-book#if-your-credential-is-already-registered-without-consent). You change your terms later the same way, by signing and publishing a newer statement; see [Changing your terms](/saturnswap/setting-up-a-book#changing-your-terms).

You publish it yourself, in your own transaction. There is nothing to send us. The keeper reads every statement for your ceremony back off the chain and checks each against your ceremony: the signature must come from the payout address your parameters baked in, the challenge it carries must be the one those nine parameters hash to, and the statement must match its canonical text exactly. One statement governs at a time, chosen by the rules in [Which statement governs](/saturnswap/setting-up-a-book#which-statement-governs), and the keeper quotes your book on its terms and no others. Without a statement that passes, the keeper declines to quote your book. Your order still rests on the public book, fillable by anyone at the prices you set, and nobody reprices it.

## Talk to us

To ask about quoting your token, email **<saturnswap@fluxpointstudios.com>** with your token's policy id, ticker, circulating supply and where it trades today, or ask in [Discord](https://discord.gg/MfYUMnfrJM).

Next: [Setting up a book](/saturnswap/setting-up-a-book) · [Risks, limits, and how to leave](/saturnswap/risks-and-exit)


# MMaaS: Setting Up a Book

Step by step from a connected wallet to a funded, self-custodial two-sided book: what you sign, what it costs, and how to tell each step worked.

{% hint style="warning" %}
Funding new books through the page is closed until a combined red-team run against the release that will take funds returns GREEN. You can still prove your wallet by signing the consent statement, and register your instance. See [Security evidence](/saturnswap/security-evidence).
{% endhint %}

Everything below happens at [saturnswap.io/v3/mmaas](https://saturnswap.io/v3/mmaas) in your browser. You sign with your own wallet. There is no form and no approval step, but one part of the flow is still manual, and it is named in [What is not automatic yet](#what-is-not-automatic-yet).

Read [What MMaaS is](/saturnswap/mmaas) first if you have not. This page assumes you already understand that your inventory rests at an address only your key can empty, and that the band you choose is permanent for that instance.

## Before you start

**A mainnet CIP-30 wallet with a key-based address.** The page detects Eternl, Vespr, Lace, Nami, Typhon, NuFi, Gero, Begin and Yoroi from `window.cardano`. Your address must be an ordinary payment-key address (base or enterprise), because the page reads your escape-hatch key from its payment credential. A script-controlled address yields no identity, and the flow will not start.

**Stay on one address for the whole flow.** Your address is one of the nine ceremony parameters. The funding step refuses to build if the connected wallet is not the exact payout address your ceremony bound, by name. Switching account or address index part-way through gives you a different instance.

**The token, in that wallet.** Step 1 lists what the connected wallet actually holds. Nothing is typed.

**Decimals and a live price.** See [What your token needs](/saturnswap/mmaas#what-your-token-needs). Both are checked before you can build.

### ADA, and the shape it is in

| What                                | How much                                                                                                                                                 | Comes back?                            |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| Credential deposit                  | **2 ADA**                                                                                                                                                | Yes, when you retire the credential    |
| Registration fee                    | 0.337761 ADA on the measured mainnet certificate [`3c078a38…`](https://cexplorer.io/tx/3c078a38d28899423572db1635ca6ad924144bacce367189ca6f2c552f352a3d) | No                                     |
| Order min-UTxO                      | **2 ADA**, resting in the order alongside your inventory                                                                                                 | Yes, when you close the order          |
| ADA you want quoted on the bid side | your choice                                                                                                                                              | Yes, less whatever gets bought with it |
| Funding fee                         | 0.293094 ADA on the measured mainnet create [`dab1fd6a…`](https://cexplorer.io/tx/dab1fd6a38cea94d6b6176c08596e8a4e8ab3f0b62970ec052e1579777988466)      | No                                     |
| Collateral UTxO                     | **at least 7 ADA**, set aside rather than spent                                                                                                          | Yes, it is never consumed              |

The funding step also requires the inputs it picks to cover the order's own lovelace plus about 5 ADA of fee headroom. In practice: hold **roughly 20 ADA free** beyond whatever ADA you intend to rest in the book, and expect about 0.6 ADA of it to be genuinely spent.

{% hint style="danger" %}
**The collateral footgun. Your wallet needs a pure-ADA UTxO of at least 7 ADA holding no native tokens.** Not 5, and not 6.

The builders set 5 ADA of that UTxO aside as script collateral, and the remainder has to come back as its own output, which must itself clear the minimum for an output. A UTxO of exactly 5 ADA leaves nothing to return, and the build fails **reporting a shortfall on the change output**, which reads as "you need more ADA" and is not what is wrong. Sending more ADA does not fix it: the wallet in the report that produced this rule held 890 ADA.

If you hit it, the page offers a **Set up collateral** button that carves a clean 10 ADA box off what you already hold (a payment from your wallet back to itself, so you keep every lovelace) and then re-runs the build. You can also do it by hand: send yourself about 10 ADA on its own, then retry.
{% endhint %}

## 1 · Choose the token to quote

Connect your wallet from the header; the page shows a **Mainnet** pill next to it. Until you do, step 1 reads: *"Connect the wallet holding the token. Everything else on this page is read from it."*

Once connected you get a grid of the tokens that wallet holds. Pick one.

If this wallet has set up instances before, a **Pick up an instance you already set up** section appears above step 1.

**Signs nothing. Costs nothing.**

## 2 · Choose the prices you will trade between

The page tells you three things, each a measurement rather than a default:

* what your token is trading at, and which feeds said so;
* how much it has moved per day on average, over a measured window;
* a suggested range, sized against that volatility rather than a constant.

You then edit two boxes: **Keep quoting while it is above** and **…and below**.

Underneath, the page restates what you have chosen: the range across which both sides quote, the two protocol floors (*"Never buy above X, never sell below Y"*), and how long that range is expected to keep both legs quoting at the measured volatility. Widening the range makes it last longer but quotes further from the market. That trade is the whole decision, and it is the only genuinely irreversible one you make.

If the market is already outside the range you typed, **Set up my instance** is disabled until you widen it. If the range is wider than the spread can serve, you get an explicit *unreachable* message naming the widest range that spread can reach.

**Your four terms.** Under the prices are four boxes: **Spread (bps)**, **Book value cap (ADA)**, **Daily loss limit (bps)** and **Reprice threshold (bps)**. They are the terms you sign in step 3, and the keeper runs your book on exactly those numbers. Each starts at its default, and the page refuses a value outside [the bounds on your terms](#the-bounds-on-your-terms). **Spread** starts from your token's measured volatility, kept inside those bounds, and the page sizes your two floors from it and the range you typed, so changing the spread changes the instance, the same way changing a price does. What each term does is in [What the statement says](#what-the-statement-says).

If you come back in the same browser you set it up from, the page restores the prices you chose last time, because your address is built from them; today's market does not move them. From another browser or device it starts from today's market, which builds a different instance; use **Already have an instance?** to find the one you funded. If the market has since left that range, the page names the side that would sit idle. Your inventory stays where it is and your wallet can take it back at any time. That side simply will not trade until the market returns, or until you move to a new instance with **Set up a new instance at today's market** (see [If you are moving an existing book](#if-you-are-moving-an-existing-book)).

Press **Set up my instance**. The nine parameters are assembled and the address is derived on the server, never in your browser, because the browser build of the Cardano library applies script parameters differently and would produce a different address from the same inputs.

**Signs nothing. Costs nothing.** Afterwards you see your order address, with the line *"Nothing rests there until you fund it."*

**Editing either price, or the spread, after this builds a different instance, at a new address.** The page says so and names the address you are walking away from. The old one keeps its own 2 ADA deposit and anything resting there; the new one costs another deposit. Put the values back to reach the old instance again.

## 3 · Prove it's your wallet

One signature. No transaction, no fee, nothing submitted to the chain.

What you sign is a consent statement: fifteen lines of plain text in which you consent to SaturnSwap making a market in your token, on terms the statement names. It ties your wallet, your band, SaturnSwap's bot key and fee, your token and your four terms to this one ceremony, so nobody can show you one ceremony and run another, or run yours on terms you did not sign. Press **Sign with my wallet**, read the statement in your wallet's prompt, and sign. The signed `possession-proof.json` then appears with a **Download** button.

### What the statement says

This is the statement at the default terms, with SaturnSwap's published values filled in. The parts in angle brackets are yours:

```
SaturnSwap MMaaS consent, version 2
I consent to SaturnSwap making a market in my token with its bot key, on the terms below.
network: mainnet
your wallet: <your payout address>
our bot key: 1aba8f0a279e88d7aacd20a1f8e6d6ae4293a4f18fcb17cd43f20fd8
our fee: at most 20 bps (0.2%) of the ADA we pay out to your wallet, none when we close your order
your price limits: your book never buys above <bid ceiling> or sells below <ask floor> ADA per token
your token: <name> (policy <policy id>, asset name hex <asset name hex>)
token decimals: <decimals>
spread: 800 bps (8%) between your book's buying and selling prices
book value cap: 120 ADA (your ADA plus your tokens at our price); above it we return the book to your wallet
daily loss limit: 500 bps (5%) of your book's value at the start of each UTC day; past it we return the book to your wallet
reprice after our price moves: 150 bps (1.5%)
signed at: <the UTC time the page built the statement>
challenge: <64 hex characters>
```

Line by line:

* **network**, **your wallet**, **our bot key** and **our fee** are fixed by your ceremony. The bot key and the fee are two of [the five values SaturnSwap publishes](#the-five-values-saturnswap-publishes).
* **our fee** is the inventory validator's bound. The fee leg of a keeper transaction may take at most that share of the ADA the transaction pays out to your wallet, and nothing on a transaction that closes your order. The service fee drawn from your prepaid channel is a separate agreement; see [What it costs](/saturnswap/mmaas#what-it-costs).
* **your price limits** are your two floors from step 2. Your book never buys above the first price and never sells below the second.
* **your token** and **token decimals** name the one token your book quotes. The token line shows a readable name only when the asset name is 1 to 32 plain letters, digits, dots, hyphens or underscores; otherwise it gives the policy id and the asset name hex alone; for a token with an empty asset name it says `empty asset name`.
* **spread** is the full gap between your book's buying and selling prices. Each side sits half of it from our mid, and each is clamped into your price limits.
* **book value cap** counts both sides: your ADA plus your tokens at our price. Above it the keeper returns the book to your payout address. A rise in your token's price alone can take a book over it; see [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).
* **daily loss limit** is a share of your book's value at the start of each UTC day, valued the same way as the cap. Past it the keeper returns the book to your payout address.
* **reprice after our price moves** is how far our feed mid has to move from the mid your resting quote was set at before the keeper pays to rebuild the quote. A change of terms never triggers a reprice by itself.
* **signed at** is stamped by the page's server clock when it builds the statement. It decides which of your statements governs; see [Which statement governs](#which-statement-governs).
* **challenge** is the hash of your nine parameters, so the statement is valid for this ceremony and no other.

The four terms must sit inside [the bounds on your terms](#the-bounds-on-your-terms), and the page will not build a statement outside them. If a statement outside them ever governs a book, the keeper does not quote it on nearer terms. It returns the book's order to your payout address once, and a book with no order is simply not quoted.

**Your signature is published by you, in your own transaction.** It rides in the registration you sign in the next step, as transaction metadata under label 8747. There is nothing to send us: no Discord message, no email, no file transfer. The keeper reads it back off the chain and checks three things. The signature must come from the payout address your ceremony baked in. The challenge must be the one your nine parameters hash to. And the whole statement, rebuilt from your ceremony and the values it names, must match what you signed byte for byte. A statement for anyone else's ceremony, for an earlier version of yours, or spelled any other way, will not do.

**The earlier statement is not accepted.** Statements signed before version 2 were headed *proof you hold the escape-hatch key*, never said "I consent" and named no terms. The keeper does not quote a book whose only consent is one of those, and the page lists such an instance as *old statement, not quotable*.

**Take the download anyway.** It is your own copy of what you agreed to, and it is the input the independent verifier needs to judge your ceremony offline. The verifier prints the terms you consented to.

**Sign this before you register.** The consent travels inside the registration transaction, which is the most durable place for it, and the page puts this step ahead of registering for that reason.

### What you can fund

Your terms bound the funding step. The page funds a book only when its value is at least **50 ADA** and at most five sixths of your book value cap: **100 ADA** at the default cap of 120 ADA, and **50 ADA** at the lowest cap, 60 ADA. The value is the ADA in the order, its 2 ADA min-UTxO included, plus your tokens at the page's two-feed mid, rounded up. If the page cannot read a mid, it refuses to fund.

The cap is taken from the statement that governs your ceremony on chain, never from one you have signed in this browser session and not yet published. The gap between the most you can fund and your cap is headroom for a rise in your token's price, which raises your book's value with no trade at all.

### Which statement governs

You can sign more than one statement for the same ceremony, to change your terms. Which one the keeper runs is decided from the chain alone, and the page applies the same rules:

* Every statement for your ceremony counts, whether it rode in your registration or in a later transaction to your payout address. The keeper reads the whole history at your payout address, so a statement never ages out, however much that wallet is used.
* The statement with the newest **signed at** governs. Publishing an older statement again, by you or by anyone, changes nothing.
* A new statement takes effect when it is on chain, but no sooner than 24 hours after the previous one took effect. Until then the previous terms govern.
* A statement first put on chain more than 10 minutes before its own **signed at** time is refused for good. A statement the page builds and you publish straight away is never caught by this.
* Your token is pinned by the first statement that governs. A later statement naming another token never governs.
* Two different statements with the same **signed at** conflict. The keeper then returns your book to your payout address rather than choose between them.
* If the keeper cannot read your history in a round, it uses the terms it last verified or, having none, does not quote your book that round. It never falls back to an older statement.

### Changing your terms

Connect the same wallet and pick your instance under **Already have an instance?**. The panel **Terms governing this instance** shows the terms in force. If you leave them as they are, no new signature is needed.

To change them, edit the boxes and press **Review changed statement**, then **Sign the possession proof**, then **Publish my consent**. Publishing builds one transaction: 2 ADA from your wallet back to your own payout address, with the new signed statement as metadata under label 8747. The 2 ADA stays yours; you pay only the network fee. The page shows when the new terms take effect, and funding stays closed until they govern. You cannot publish another change while one is waiting to take effect.

Your price limits and your token do not change this way. They belong to the ceremony, and a new band is a new instance; see [If you are moving an existing book](#if-you-are-moving-an-existing-book).

### If your credential is already registered without consent

A registration cannot be amended, so a credential registered without consent has no second registration to carry it. When the registration panel finds your credential already registered, and this tab has not sent a registration with your consent since the page was last loaded (a reload forgets it), the page cannot tell whether the earlier registration carried one. Press **Publish my consent**.

That builds the same one transaction as a change of terms: 2 ADA from your wallet back to your own payout address, with your signed statement as metadata under label 8747. The page refuses to build it unless the connected wallet holds the ceremony's escape-hatch key. Publishing is safe either way. If your registration carried no statement, this one governs. If it carried one, the rules in [Which statement governs](#which-statement-governs) decide, exactly as for a change of terms.

A statement published this way is exactly as valid as one carried in a registration. What makes it valid is your signature, checked against your payout address and your nine parameters. The keeper finds it by reading every transaction at your payout address, so it never ages out.

## 4 · Register it on chain

This is the transaction everything else waits on.

The panel first reads the chain to see whether this credential is already registered. If it cannot read the chain it refuses rather than inviting you to pay a deposit blind, and re-checks itself every 20 seconds, up to six times, before concluding this is an outage rather than indexer lag and leaving the **Re-check** button to you.

You also choose, here and only here, what your own stake and governance weight do:

* **Stake pool**: **leave it blank.** Today a book stops being repriced at its first reward payout, so a delegated vault loses the service as soon as staking starts to pay; see [what changes the moment you delegate](/saturnswap/risks-and-exit#what-changes-the-moment-you-delegate-to-a-pool). Blank is the default, and it means the vault's ADA stakes nowhere and earns nothing. SaturnSwap runs a stake pool and deliberately does not pre-fill it, because your stake is not ours to point.
* **Governance**: Abstain (default), No confidence, or a DRep you name. None of the three moves your ADA or lets anyone else spend it; a DRep votes, it never holds funds. Abstain is the default because it takes no governance position, not because your vault needs a DRep: [your vault's credential can withdraw with no DRep delegation at all](/saturnswap/risks-and-exit#why-the-default-is-abstain-and-not-nothing), so none of the three changes what your book can do. If you name a DRep, the page checks that the ID is well formed and is a DRep ID rather than a committee key before your wallet opens. It does not check that the DRep is registered, so copy the ID from a directory.

Press **Register my credential (2 ADA deposit)** and sign in your wallet.

**You sign:** one Conway `RegisterAndDelegateCredential` certificate, witnessed by your instance's own Plutus script. The ledger accepts it only with your signature.

**It costs:** a 2 ADA deposit, refundable in full when you retire, plus the network fee (0.337761 ADA on the measured mainnet certificate).

**How to tell it worked:** the panel flips to *"Your credential is registered on chain"*, followed by the certificate hash, a **View the certificate ↗** link and the line *"Funding can proceed below."* While funding is closed, no funding step appears below it. If the indexers have not caught up you get the hash and the explorer link anyway, and the panel keeps re-checking.

### If you are moving an existing book

When the page can tell you have replaced an earlier band, an extra step, **5 · Move your existing order here**, appears between registration and funding, and funding renumbers to 6. It moves your whole book, the token, the ADA and the three beacons, from the old instance to the new one in a single transaction you sign. Nothing is burned or re-minted, and your inventory never passes back through your wallet.

The move carries your current quote across; it does not reprice it. A leg changes only where the new band forbids it: a sell price below the new ask floor is raised to that floor, and a buy price above the new bid ceiling is lowered to that ceiling. The page names each leg it changed before you sign. Once the move lands, the old instance is empty and the page offers **Reclaim my 2 ADA deposit** for it, so moving costs roughly the network fees (see [One band per instance](/saturnswap/risks-and-exit#one-band-per-instance)).

## 5 · Put your inventory to work

{% hint style="warning" %}
Funding new books through the page is closed until a combined red-team run against the release that will take funds returns GREEN. You can still prove your wallet by signing the consent statement, and register your instance. See [Security evidence](/saturnswap/security-evidence).
{% endhint %}

The panel states the token you picked and how much of it you hold. Fill in:

* **Tokens to rest (ask side)**: in whole tokens; a **Use all** shortcut fills in your balance.
* **ADA to rest (bid side)**: optional. This is the ADA the keeper may buy with, inside your range. Leave it empty and your order can only sell until a sale gives it ADA to buy back with.

**How much to rest.** Between **50 ADA** of value and five sixths of your book value cap, counting your token at today's price: at most 100 ADA at the default 120 ADA cap. The panel shows the floor and the most you can fund under the statement that governs your ceremony, and refuses to build outside them (see [What you can fund](#what-you-can-fund)). The keeper values your book again each round it can price your token and returns it to your payout address above your cap, so a book funded close to the most allowed can still be closed by an ordinary rise (see [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book)). Start near the floor, for that reason and the one in [The order of operations that matters](#the-order-of-operations-that-matters).

**One order per book.** The keeper quotes one order at your order address. Any other order it finds there is sent back to your payout address, up to two a day for each client, and any beyond that rests unquoted. Fund once; to change the size, close your order and fund again. To make it smaller, wait until 00:00 UTC before funding again; see [Funding the same instance again the same UTC day](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).

Press **Build the funding transaction**. Nothing is signed yet. What you get back is:

* a plain-English verdict: one output to your derived order address resting *N* token units with *M* lovelace, exactly three beacons minted, the fee, and every other output returning to your own wallet;
* a **Download** button for `body.tx`, the exact unsigned transaction body;
* the command to check it yourself with `verify_create_body.py` (see [Checking it yourself](#checking-it-yourself)).

Build and sign are separate on purpose: you can run the source-available Python gate over the downloaded body before you sign, so signing never rests on this page's word.

Then press **Sign and submit with my wallet**.

**You sign:** one cardano-swaps two-way create (your inventory into your order address, three beacons minted, an inline datum carrying both your bid and your ask).

**It costs:** the network fee (0.293094 ADA on the measured mainnet create `dab1fd6a…`), plus the 2 ADA min-UTxO that rests inside the order with your inventory and comes back when you close it.

**How to tell it worked:** *"Submitted: `<hash>`. Your order goes live once this lands…"*, with a **View the transaction ↗** link.

The registration check runs twice (once before anything is planned, and again immediately before the signature), so a credential retired in between cannot let a funding through.

## The order of operations that matters

**Register before you fund.** Every owner action on a cardano-swaps order is authorised by a withdrawal from your credential, and an unregistered credential cannot appear in a withdrawal. An order funded at an unregistered credential can still be **filled by takers** while being **repriced or closed by nobody, you included**, until somebody registers the credential. It is stuck rather than lost: registration is permissionless, so anyone can register it for the 2 ADA deposit. The page enforces the order anyway: funding refuses unless the chain positively says the credential is registered, and it refuses when the chain cannot be read.

{% hint style="danger" %}
**Never send funds to your order address with an ordinary wallet transfer.** It is a script address. A plain send arrives with no datum, and the validator decodes the datum before it reaches any branch, so the transfer is permanently unspendable, by SaturnSwap, by you, and by the wallet that owns it. The only safe funding is the transaction step 5 builds, which attaches the beacons and the price datum. A book holds one order; to change its size, close the order and run step 5 again. To make it smaller, wait until 00:00 UTC before funding again; see [Funding the same instance again the same UTC day](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).
{% endhint %}

**Close your orders before you retire the credential.** See [Retire the credential](https://docs.fluxpointstudios.com/saturnswap/pages/CmMWxob82NdPm4ATcVI1#id-2.-retire-the-credential-and-take-the-2-ada-back).

**A freshly funded order rests at the edge of your range** until the keeper's first reprice moves it. That is the outermost price you authorised, and it is a gift to whoever trades against it. It cost SaturnSwap 14.6 ADA on a live mainnet order, found deliberately on its own money. Fund near the 50 ADA floor first and let it be worked before you commit size.

## After funding

Once the create lands, your order is a live two-way order on SaturnSwap's book. Anyone can fill it at your posted prices, whether or not the keeper is working it yet.

What the keeper does once your book is enrolled: each round it reads a mid from the two feeds and quotes your book at the spread you signed, each side half the spread from the mid and clamped into your band. At the default 8% spread, the ask sits 4% above the mid and the bid 4% below it. It rebuilds your order only when the mid has moved at least your reprice threshold (1.5% by default) from the mid your resting quote was set at, so smaller moves leave your quote where it is. Whatever the threshold, a resting ask at or below the mid, or a resting bid at or above it, is repriced. SaturnSwap signs and pays the network fee for every one of those reprices.

The keeper also returns your book to your payout address above your book value cap and past your daily loss limit. See [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).

### How to check your book is live

Come back to [saturnswap.io/v3/mmaas](https://saturnswap.io/v3/mmaas) and connect the same wallet. Under **Already have an instance?** the page finds your instances from the chain (the ceremony's own validator carries the numbers it was built with, so there is nothing to look up or type) and lists each one roughly like this:

```
44.00 ADA · 0.0891 - 0.1094 ADA · last worked 3h ago · 3c265036cwm9…
```

An instance whose only consent is a statement from before version 2 carries the label *old statement, not quotable*.

**"last worked"** is the age of the resting UTxO, read from chain alone. It asks the keeper nothing, so a refused ceremony, a missing config entry and a stopped process all look the same from outside. On its own it is not a verdict. The keeper reprices only when the market mid moves at least its reprice threshold, 150 basis points (about 1.5 percent) by default, away from the price your order rests at, so a healthy book in a quiet market can rest untouched for hours or days and its "last worked" figure keeps climbing. What tells you a book is stale is drift, not age: whether the current market price has moved at least that reprice threshold away from the price your order is resting at. When it has, the quote should have been repriced. Below that, a book left untouched is still a fair quote, and a climbing "last worked" figure on its own does not mean nobody is repricing you.

You can compute the same number yourself from any indexer, or just watch your order address on a block explorer. Your settled volume, fills and fees are also on your own dashboard at [saturnswap.io/v3/mmaas/book](https://saturnswap.io/v3/mmaas/book): sign in with the wallet your book was set up with. It shows figures once SaturnSwap has linked that wallet to a billing grant; until then it says no market was found for the wallet.

If this wallet has no funded instance, the page lists any instance you registered but never funded as set up and waiting for inventory. It still holds its 2 ADA deposit. To use it, open the page in the browser you set it up from and pick its token: the page restores the range and spread you last used for that token there. Elsewhere, entering the same range can build a different instance, because the floors are sized from the range and the spread, and the spread box starts from the token's measured volatility on the day. That instance charges another 2 ADA deposit. The page does not yet offer a retire step for an instance that was never funded, so that deposit stays with the instance until it does.

### Finding an instance by its two floors

The list is built from your registration transactions. If one cannot be read, **Enter the floors by hand instead** takes the two floors as fractions, `min_asset2_price` and `min_asset1_price`, exactly as they appear in your params file, plus your token's decimals, and derives the instance they describe.

* **If nothing rests there,** the page says so. Those floors describe a different instance from the one you funded. Check them against your params file before you sign anything.
* **Decimals do not change which instance you land on;** the two fractions decide that. Decimals appear in the message you sign, so a wrong value produces a proof the verifier refuses, not one that points somewhere else.
* **The page offers the possession signature only after the chain confirms a book rests there.** A signature for an instance that holds nothing looks exactly like a signature for one that does.

## Checking it yourself

Two source-available Python tools ship in the public [saturnswap-maker-verify](https://github.com/Flux-Point-Studios/saturnswap-maker-verify) repo, and both work from a fresh clone with nothing from us:

* **`verify_create_body.py`** judges the funding transaction body before you sign it. The funding panel prints the exact command and offers `body.tx`.
* **`verify_ceremony.py`** rebuilds the validator from source, re-applies your nine parameters, derives the script hash and both addresses, and checks your possession proof against them. For a version 2 statement it prints the terms you consented to.

`verify_ceremony.py` will not judge a ceremony until someone has proved they can sign for the escape-hatch key; without that proof it would only confirm that SaturnSwap's arithmetic agrees with itself. If anything SaturnSwap told you disagrees with what the source derives, it exits loudly, names the difference, and prints *"DO NOT FUND THIS ADDRESS"*. So do not fund an order address on the page's word: the page derives it from your parameters, and the verifier re-derives it from the published source. Clone the verifier yourself rather than taking a copy from anyone (see [Check an existing address](/saturnswap/validator-generations#check-an-existing-address)).

Both take `--params my-ceremony.params.json`. **The guided flow does not hand you that file**, only the possession proof. Two ways to get it:

* Open **Set this up by hand, from a cold key** on the same page and enter the two floors the guided flow showed you (*"Never buy above X, never sell below Y"*) plus your token's decimals. The expert form converts them with the same functions the guided flow does, so it reproduces the identical nine parameters and prints the file. The guided flow fills in seven of the nine for you (five published by SaturnSwap, two read from your wallet); the expert form lets you set your four values yourself (escape-hatch key, payout address and both floors) and shows the five published ones for you to check, which is what you want if your escape-hatch key lives somewhere this browser will never see. The address is still derived on SaturnSwap's server from the values you enter, for the reason in step 2.
* Recover them from the chain: the applied validator carries all nine and rides in the witness set of your own registration transaction.

Keep that file. It is nine public values, and it is the simplest input to the recovery tool described in [Leaving if SaturnSwap is gone](/saturnswap/risks-and-exit#leaving-if-saturnswap-is-gone).

### Checking a params file you already have

**Already set up? Check what your vault bound** on the page takes a params file or ceremony receipt and lists what it claims: the bound script hash, your floors, your payout address, your escape-hatch key and the five published values. It then gives you the verifier command. The list is only an echo of the file. The check is the command, run on your own machine against the public source; the page plays no part in it.

### The five values SaturnSwap publishes

Five of the nine parameters behind your vault are SaturnSwap's to publish and yours to check. The page fills them in so you cannot mistype one, and a mistake would be permanent: each value is an input to your address. This table is a second place to check them, outside the page. Compare the values in your params file against it, and confirm each one on chain the way the last column says. The verifier takes `dapp_hash` and `beacon_id` as given, so this check is yours to do.

| Parameter      | Published value                                              | What it is                                                                                                                                                                                                                                                                | How to check it                                                                                                                                                                                                                                                                                                                                        |
| -------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fee_address`  | `addr1v9wr69p2tx8dx2lat8rzznahxh4xhfl075yzm8uxmth4tvcf3lx47` | The only address the inventory validator's fee leg may pay.                                                                                                                                                                                                               | An enterprise mainnet address (header `0x61`) with payment key hash `5c3d142a598ed32bfd59c6214fb735ea6ba7eff5082d9f86daef55b3`. It receives this fee and nothing else: no change, no payouts, no treasury.                                                                                                                                             |
| `fee_bps`      | `20`                                                         | The most the inventory validator's fee leg may take, 0.20% of what the transaction pays out to you, and nothing on a transaction that closes an order. This is not the service fee drawn from your prepaid channel; see [What it costs](/saturnswap/mmaas#what-it-costs). | The validator declares its own ceiling, `const max_fee_bps = 500`. An instance built with a higher rate rejects every bot action.                                                                                                                                                                                                                      |
| `adam_bot_pkh` | `1aba8f0a279e88d7aacd20a1f8e6d6ae4293a4f18fcb17cd43f20fd8`   | The one key SaturnSwap holds against your instance. It can reprice and cancel. Your value can only land at your order address, your payout address or the bounded ADA fee leg. It is also the `our bot key` line of the statement you sign.                               | The key funds its own enterprise address, `addr1vydt4rc2y70g34a2e5s2r78x66hy9yay7x8uk97dg0eqlkqefwst2` (header `0x61`), whose payment credential is this hash. The keeper pays for every reprice from that address, so the transactions spending from it are this key's signatures. They appear once the keeper reprices a book. Check the credential. |
| `dapp_hash`    | `11928a3ac3b65edbf103ea6bb3362e39b879a36f02897df31c40917b`   | The two-way cardano-swaps validator your orders rest against. Only the two-way order datum carries both a bid ceiling and an ask floor.                                                                                                                                   | The beacon policy below commits to it: fetch that policy's script from any mainnet indexer and this hash appears inside it as an applied parameter. You can also rebuild it from source; see [What it actually does](/saturnswap/risks-and-exit#what-it-actually-does).                                                                                |
| `beacon_id`    | `8a199a17ef4517215945aaf3c8c5204c60fd94d34c46d341e99c8fcf`   | The policy that marks your orders on the book.                                                                                                                                                                                                                            | Fetch its script from any mainnet indexer and read its error strings: *"Two-way swaps must have exactly three kinds of beacons"*, *"Wrong asset1\_beacon"* and *"Wrong asset2\_beacon"*. A one-way policy says *"One-way"* and *"Wrong offer\_beacon"* instead. That is the only way to tell the two deployments apart.                                |

### The bounds on your terms

The four terms in your statement are yours to choose, inside these bounds. The page refuses a value outside them, and the keeper never quotes one: it returns the book instead (see [What the statement says](#what-the-statement-says)). The bounds may be widened later, which leaves every signed statement valid. They are not narrowed once a client has signed, because a narrower bound would return every book signed outside it.

| Term              | Default    | Lowest     | Highest    | Unit                                                             |
| ----------------- | ---------- | ---------- | ---------- | ---------------------------------------------------------------- |
| Spread            | 800 (8%)   | 400 (4%)   | 6000 (60%) | basis points, the full gap between the buying and selling prices |
| Book value cap    | 120        | 60         | 120        | whole ADA, your ADA plus your tokens at our price                |
| Daily loss limit  | 500 (5%)   | 100 (1%)   | 5000 (50%) | basis points of your book's value at the start of each UTC day   |
| Reprice threshold | 150 (1.5%) | 150 (1.5%) | 1000 (10%) | basis points of our feed mid                                     |

Two more rules:

* **The spread must be more than twice the reprice threshold.** Each side rests half the spread from the mid it was set at, and the keeper leaves it there until our mid has moved by the threshold. The rule keeps your bid below the market and your ask above it for every move the keeper does not follow. The defaults pass: 2 x 150 = 300, under 800.
* **Token decimals are 0 to 18.**

Funding has its own bounds, set from the terms that govern your ceremony on chain:

| Funding bound     | Value                                                                                                                      |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Floor             | **50 ADA** of book value                                                                                                   |
| Most you can fund | five sixths of your book value cap, rounded down to the lovelace: **100 ADA** at a 120 ADA cap, **50 ADA** at a 60 ADA cap |

## What is not automatic yet

Stated plainly, because acting on a stale claim here costs real money:

* **Enrolment is automatic, up to five books.** Every version 2 statement names its token, the expert form's included, and the keeper finds a book with a governing statement on the chain and starts quoting it without anyone at SaturnSwap adding it. One keeper quotes at most five books. A book that arrives while five are enrolled is not quoted: its order is returned to your payout address, and it can enrol again once a seat is free. Until the keeper's first reprice, your order rests and is fillable by takers at whatever price it last carried.
* **The guided flow does not give you your parameters file.** See above for the two ways to obtain it.
* **The client dashboard shows figures only after SaturnSwap links your wallet to a billing grant.** Until then it says no market was found for your wallet, and "last worked" on the re-entry panel and a block explorer are the honest checks.

None of these can take your funds, and none of them can stop you leaving: every exit is authorised by your signature alone.

Next: [Risks, limits, and how to leave](/saturnswap/risks-and-exit)


# MMaaS: Measured Economics

What market making usually costs a token project, what it cost on SaturnSwap's own measured book, and why the per-fill cost falls as more clients share the book.

The measured figures on this page come from settled preprod transactions on SaturnSwap's own book, its own taker filling its own maker. None of it is third-party flow, and the transaction ladder below links to each transaction it cites. The desk comparison uses published DAO governance figures and industry reporting, not chain data. Anything forward-looking is labelled as planned. For what you pay and how billing works, see [What it costs](/saturnswap/mmaas#what-it-costs).

## Compared with a market-making desk

Desk pricing is contractually private, so the only reliable figures are the ones token DAOs have had to publish to pass a governance vote. Those show market-making retainers of **$3,500 to $12,500 a month** for a single project, and industry reporting puts mandates that maintain active quotes at **$15,000 to $50,000 a month**. The retainer is not the whole bill: the issuer also funds the inventory the desk quotes with, commonly tens of thousands of dollars per venue.

| What you give up | Retainer model                 | Loan and call model                                | SaturnSwap MMaaS                                            |
| ---------------- | ------------------------------ | -------------------------------------------------- | ----------------------------------------------------------- |
| Cash up front    | $3.5k to $50k a month          | None                                               | A prepaid ADA fee balance; no retainer                      |
| Your tokens      | You fund the inventory         | 1 to 5% of circulating supply, for 12 to 24 months | None                                                        |
| Your upside      | None                           | A call struck 25 to 100% above TGE                 | None                                                        |
| Ongoing          | Fixed, whatever volume you get | The option is the fee                              | Default **0.20% of eligible settled ADA notional**          |
| Custody          | You fund a venue account       | Tokens leave your treasury                         | Inventory in your own validator; fees in a separate channel |

**A retainer is fixed and this fee is not.** At the default 0.20% of eligible settled ADA notional, a $12,500-a-month retainer is the cheaper deal only once you settle about **$75 million a year**. Below that, a retainer is a six-figure annual fee for liquidity you may not be getting. The service fee accrues only on fills, so if the keeper quotes badly and nothing fills, no fee accrues.

**The loan model has no cash fee, and its cost is harder to see.** You hand over a slice of supply for a year or two and sell the desk an option on your own recovery. If the token runs, they exercise. If it falls, they hand the tokens back. MMaaS never takes your tokens, so there is no option to sell.

Retainer figures come from published DAO governance proposals and industry reporting. Desks do not publish rate cards, and this is not a quote of any specific firm's price. Loan terms are the ranges disclosed in DAO votes. The MMaaS rate is subject to your billing grant and any configured cap; known operator fills are excluded, and an unfamiliar signer is labelled unattributed, not independent. See [How service billing works](/saturnswap/mmaas#how-service-billing-works).

## The headline numbers

|                                          |                               |
| ---------------------------------------- | ----------------------------- |
| Network gas, before any service fee      | **0.0496%** of settled volume |
| All-in, with a 0.20% service fee applied | **0.2496%**                   |

On SaturnSwap's own book on preprod, with its own taker filling its own maker, **3,419,141 ADA** of settled volume cost **1,696 ADA** in network fees. Applying a 0.20% service fee as an illustration adds 6,838 ADA, for **8,535 ADA all-in**. For comparison, a conventional DEX charges **0.3% in protocol fees alone**, before its own gas. SaturnSwap's earlier one-way approach cost 0.35%.

## Why more clients make it cheaper for everyone

Gas per fill depends on one variable: **how many fills share a transaction**. The token makes no difference and neither does the owner; both were measured, below. So pooled order flow is the pricing mechanism. Every client who joins deepens the batches every other client already rides, and the cost per fill falls for all of them at once.

| Fills sharing one transaction    | Gas per fill   | Gas as % of volume | All-in with a 0.20% fee |
| -------------------------------- | -------------- | ------------------ | ----------------------- |
| 1, a maker running alone (n=260) | 0.4088 ADA     | 0.213%             | 0.413%                  |
| 4, a thin book (n=22)            | 0.1785 ADA     | 0.093%             | 0.293%                  |
| **16, a pooled book (n=906)**    | **0.0861 ADA** | **0.045%**         | **0.245%**              |

A maker running alone pays **0.413% all-in**. Inside a pooled book the same maker pays **0.245%**, service fee included, which is still under what a conventional DEX charges in protocol fees before any gas. The gas itself is **4.75 times lower** for identical volume.

The mechanism is a fixed floor. Every transaction of this kind pays roughly **0.29 ADA** in base fee, Plutus bootstrap and reference-script overhead, however little it settles. A pooled transaction pays that floor once for sixteen fills instead of sixteen times, and past the floor each additional fill costs **0.063 ADA**, under a tenth of an ADA to settle roughly another 192 ADA of volume. At scale, **5,000,000 ADA** of volume costs **2,244 ADA** pooled and **10,655 ADA** settled one fill at a time.

Because per-fill gas does not depend on the token, and fills for different tokens batch into the same transactions, the fee ratio holds near **0.04% at the margin** however many tokens the book serves, while volume grows with the capital each client brings. If more clients join, volume should grow with the capital they bring while the marginal cost ratio stays where it is; that is a projection, not a measurement.

Percentages use the measured average fill size of about 192 ADA and the measured per-fill gas. The 0.20% service fee is an illustrative overlay at the default rate, not evidence of a paid invoice from this operator-run rehearsal. Current billing excludes known operator fills. The overlay is flat across the table, so movement in the all-in column comes from measured gas. Actual billing follows each client's grant and eligible flow.

## Measured on our own multi-token book

The tables above come from that book: SaturnSwap's own maker, filled by its own taker agent, on preprod. Across **17,823 settled fills in 1,405 transactions** quoting **five tokens** (ADAMMKT, iUSD, RISE, AGENT, TEST), the keeper settled **3,419,141 ADA** of volume for **1,696 ADA** of network fees: **0.0496%**, the gas figure in the headline.

Batches get deep by mixing tokens. A transaction carrying one token averaged 3.6 fills at **0.210 ADA per fill**. Carrying three tokens, it averaged **16.0 fills** at **0.086 ADA per fill**, **2.4 times cheaper** from mixing tokens alone. A fourth token held steady at 0.087 ADA per fill.

| Token in the shared book | Fills | Volume      | Gas per fill | Fee as % of volume |
| ------------------------ | ----- | ----------- | ------------ | ------------------ |
| iUSD                     | 4,118 | 815,364 ADA | 0.0862 ADA   | 0.0435%            |
| RISE                     | 3,012 | 602,400 ADA | 0.0863 ADA   | 0.0431%            |
| AGENT                    | 403   | 80,580 ADA  | 0.0867 ADA   | 0.0434%            |

Three tokens with very different volumes, and the cost per fill stays between **0.0862 and 0.0867 ADA**, within about 0.6%. **Gas belongs to the fill.** A client's cost does not depend on which asset they bring, because their fills ride transactions the book was already paying for. At the measured rate that is **4.75 times cheaper**, a saving of about **8,410 ADA** on 5,000,000 ADA of settled volume.

**Depth has a limit.** Sixteen fills is the measured optimum. The deepest transactions observed (25 fills, a small sample) cost more per fill, as script execution units outgrew the amortisation. The keeper tunes to the optimum.

## Evidence that pooling clients costs nothing

Everything above rests on the claim that putting several clients in one transaction costs nothing extra, so it was settled on chain. Each client is its own stake credential, and their orders rest at different script addresses, the same way two real clients' orders would. Every transaction below is on preprod.

| Transaction                                                                                                                       | Fills  | Distinct clients | Gas            | Gas per fill   | Against one fill per transaction |
| --------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------- | -------------- | -------------- | -------------------------------- |
| [`288730cd…`](https://preprod.cexplorer.io/tx/288730cd9c2aa278277422ee6c7ea9d037013ae178a1b0a21e11e143aba7f5ad)                   | 1      | 1                | 0.3949 ADA     | 0.3949 ADA     | 1.00x                            |
| [`a03177a5…`](https://preprod.cexplorer.io/tx/a03177a5a8bd6a481418cd3b0405057f4e89982d7941fe3f08807cb3604c1bc2)                   | 2      | 2                | 0.5183 ADA     | 0.2592 ADA     | 1.52x                            |
| [`eb66f7a7…`](https://preprod.cexplorer.io/tx/eb66f7a71095d5bb30f623a85412113108750593493f2462fafd2806d59356c9)                   | 4      | 2                | 0.8017 ADA     | 0.2004 ADA     | 1.97x                            |
| [`ab24ebff…`](https://preprod.cexplorer.io/tx/ab24ebff10f62da3b232b6a3baab99cc7842aff13a96acf6430bcdf45ec51378)                   | 8      | 2                | 1.3096 ADA     | 0.1637 ADA     | 2.41x                            |
| [`7a58d0fc…`](https://preprod.cexplorer.io/tx/7a58d0fc1220dfbaf33945d2e0b57b8cd75cae96bf07741b5c10ec7be00c492a)                   | 16     | 2                | 2.5695 ADA     | 0.1606 ADA     | 2.46x                            |
| [**`63fcd2f2…`**](https://preprod.cexplorer.io/tx/63fcd2f2d7a7b9e067b0eacd5f2cea530cdbb252d768d658d27a8774553decfd) **(control)** | **16** | **1**            | **2.5695 ADA** | **0.1606 ADA** | **2.46x**                        |

Sixteen fills across two clients settled for **2.5695 ADA** in one transaction. As sixteen separate transactions they would have cost **6.3184 ADA**, so the shared transaction was **2.46 times cheaper**. Every figure comes from the same wallet on the same pair, so the comparison hides no other difference.

The last row is the control: the identical transaction with all sixteen fills under a single client. It cost **exactly the same, 2.5695 ADA, at an identical 9,834 bytes**. An order address differs between clients only in its stake credential, which has the same length either way, so the fee cannot move. **Crossing clients costs nothing.**

Billing holds at the same depth. SaturnSwap's indexer read that sixteen-fill transaction back from chain data and attributed **eight fills and 41.3466 ADA to each client**. One transaction becomes two invoices with no manual reconciliation, which is what makes per-client billing on shared transactions workable.

Read this ladder for its ratios. The test wallet holds a long tail of native assets that every change output has to carry, which lifts its per-fill cost above the 0.086 ADA the multi-token preprod book averaged. The control isolates the one variable under test, one client against two, and that difference measured zero.

## Agents on both sides of the book

Resting orders only become volume when something fills them, so SaturnSwap runs the taker side too: an autonomous agent that reads the live book, decides what is worth taking, and composes the multi-fill transactions the economics above depend on. On the maker side, the keeper reprices each client's order around the live mid as the market moves.

**Appetite is four numbers, and the client signs them.** Each client chooses four terms inside published bounds and signs them in their consent statement. The keeper runs each book on the terms its owner signed, and on no terms it did not sign:

| Term              | Default | Bounds        | What it does                                                                                                                    |
| ----------------- | ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Spread            | 8%      | 4% to 60%     | The ask sits half the spread above the live mid and the bid half below it, each clamped into the client's band.                 |
| Reprice threshold | 1.5%    | 1.5% to 10%   | A quote is rebuilt only once the mid has moved at least this far from the one it was set at.                                    |
| Book value cap    | 120 ADA | 60 to 120 ADA | A book worth more than this, its token valued at the keeper's mid, is closed back to the payout address.                        |
| Daily loss limit  | 5%      | 1% to 50%     | A book whose value falls by more than this share of its value at the start of the UTC day is closed back to the payout address. |

The spread must be more than twice the reprice threshold. A client changes their terms by signing and publishing a newer statement; see [Changing your terms](/saturnswap/setting-up-a-book#changing-your-terms). When and how a book is closed is in [The keeper can close your book](/saturnswap/risks-and-exit#the-keeper-can-close-your-book).

**Autonomy is bounded in two independent places.** The agent enforces its own risk configuration. Beneath it, the validator bounds what any keeper-signed action can do: value can land only at your order address, your payout address, or the bounded ADA fee leg (see [Custody](/saturnswap/mmaas#custody-what-we-can-and-cannot-do)). Every agent runs on paper before it is allowed to sign, and a kill switch halts it without touching client funds.

**Status.** The taker agent is built and rehearsed end to end on preprod (paper, live and kill), including a real on-chain fill, [`aea3d325…`](https://preprod.cexplorer.io/tx/aea3d325537d7afdcdb31803088304e681404951430abc08e72970883e459edd). It ships behind an operator control with two-layer authentication. Running it on mainnet depends on the onboarding of the client it would serve and the mandate it would run under. A preprod rehearsal is not a mainnet record.

## Limits of this evidence

* **It is our own flow.** The preprod volume is SaturnSwap's own two-sided liquidity on a public order book, its maker filled by its taker. It measures gas, batching and billing, not demand. Planned: publish mainnet fills as they settle, each attributed to who took it. Public transactions support verification; they do not establish independent demand.
* **Token-to-token pairs earn no service fee today.** The meter values a fill by the ADA that moved, and a token-for-token fill moves none. What is missing is an ADA-equivalent notional for the fill. Planned: value such a fill at the keeper's price-feed rate for the settling slot, record that rate on the fill so you can re-derive and dispute the number, and bill it from the prepaid channel exactly as an ADA fill is billed. The gap is in measurement only, because the service fee is already drawn from the prepaid channel, not from the swap. The billing rail, the cap and the finality gate would carry over unchanged.
* **Batch depth is bounded by transaction execution limits.** On the measured preprod book the practical ceiling is about 16 fills; past it the cost per fill rises.
* **Security scope.** This page measures cost, not safety. For what has been tested, at which revision, and what that evidence does not cover, see [Security evidence](/saturnswap/security-evidence).
* **The fee channel has different protections from your inventory.** See [How service billing works](/saturnswap/mmaas#how-service-billing-works).

Back to: [What MMaaS is](/saturnswap/mmaas) · [Risks, limits, and how to leave](/saturnswap/risks-and-exit)


# MMaaS: Security Evidence

Point-in-time audits are not enough for code that changes every week, so MMaaS is attacked continuously and every result is dated. An AI red team attacks the validator and the keeper. What it finds gets fixed and re-attacked before it ships. A full combined run (validator, keeper, backend and page) is repeated before public sign-up opens, then every week.

* **Weekly record.** The validator and the keeper are attacked every week, and every run is published with its date, including the runs that find nothing: see [the dated record](https://github.com/Flux-Point-Studios/docs/issues?q=is%3Aissue%20author%3Arealdecimalist%20%22Red%20team%22%20in%3Atitle).
* **Combined runs.** The most recent combined run to reach a verdict, on September 10, 2026, returned BLOCK: findings to fix before launch. Funding new books through the page stays closed until a combined run against the release that will take funds returns GREEN.
* **Validator tests.** Unit and property tests are recorded against a named source revision (below).

None of this is a guarantee that no vulnerabilities remain.

## Recorded validator tests

The September 9, 2026 internal run at contract source revision `44714f46a6d4c1f1296f48c98d55bcc2c7090df1` passed **122 unit tests and five property tests with 1,000 generated cases each**. The property additions did not change the production validator or compiled blueprint.

| Property              | What it checks                                                                      |
| --------------------- | ----------------------------------------------------------------------------------- |
| Conservation          | Generated inventory values cannot fund an unauthorised skim.                        |
| Pair preservation     | Splitting continuations cannot substitute a different input asset pair.             |
| Rewards and fees      | Withdrawn rewards remain conserved and are excluded from the inventory fee basis.   |
| Client exit           | The client-authorised path still works with invalid bot price floors.               |
| Fill/reprice sequence | Modeled fill continuations and reprices preserve the tested client exit properties. |

Removing the pair-preservation check or reward-fee exclusion caused the corresponding tests to fail in mutation runs. These results show that those tests detect those removed checks. They do not establish coverage of every possible defect.

**The fill-sequence properties model fills; they do not execute the separate DEX spend validator.** The generated inputs cover the defined model, not every Cardano transaction or a complete interaction between both validators.

The record above is from the internal contract repository. It is an internal test report, not a publicly reproducible formal-proof artifact. The [public verifier](https://github.com/Flux-Point-Studios/saturnswap-maker-verify) provides the validator source and ceremony/address verification path.

## Bind evidence to the code your book uses

Evidence binds to a **generation**, and a book keeps the generation its credential hashes. Which one that is, and which unapplied hash identifies it, is stated in [GENERATIONS.md](https://github.com/Flux-Point-Studios/saturnswap-maker-verify/blob/main/GENERATIONS.md) beside the source itself, and not here, where a copy would go stale the moment a generation is cut and would then deny a real book's existence.

Applying the nine ceremony parameters derives each book's different credential and addresses. Match those against your funded address using the public verifier; matching a source revision alone is insufficient.

A protection added in a later generation does not appear in an older book merely because source or documentation changed. See [Validator generations](/saturnswap/validator-generations).

We make no Z3 or other formal-proof claim for the active validator without a reproducible artifact naming the exact validator hash, assumptions, properties proved and verifier command. Unit tests, generated property cases and mutation checks are valuable evidence with their own scope; they are not exhaustive formal proofs.


# MMaaS: Validator Generations

An order address commits to the **applied** validator: source plus the client's nine ceremony parameters. A source generation hash identifies the **unapplied** source; it is not a client's stake credential. Publishing a new generation cannot upgrade an existing address or move its funds.

## The list lives in the verifier, not here

[**Validator generations (saturnswap-maker-verify/GENERATIONS.md)**](https://github.com/Flux-Point-Studios/saturnswap-maker-verify/blob/main/GENERATIONS.md)

That file is the only place the published generations are enumerated, and this page deliberately does not repeat them. A copy of that list on a docs site is a copy that goes stale the moment a generation is cut. A stale copy is worse than none, because a client whose book runs the newest generation reads an older list, does not find their hash, and concludes their source was never published. That page sits beside the source it describes and beside the tests that check it lists exactly what the repository ships, so it cannot say something the repository cannot do.

Which generation applies to YOUR address is decided by your credential, not by which is newest. The verifier finds it for you.

## Check an existing address

Start with the ceremony JSON and order address you actually funded. Use the command in [the public verifier README](https://github.com/Flux-Point-Studios/saturnswap-maker-verify#readme), including your expected order address, independent price-band check, and wallet possession proof. For a ceremony on any generation other than the current one, add the selector named in GENERATIONS.md:

```sh
--project ./generations/<the source generation in that table>
```

Run the **root** `verify_ceremony.py` with that option. It rebuilds the selected source, compares it with its committed blueprint, applies the parameters, and compares the result with your expected address. A historical directory contains source artifacts, not a second copy of the CLI. Do not change an expected address to make a mismatch pass. Do not substitute another generation's possession proof: its challenge also changes. `--derive-only` proves neither wallet possession nor live chain state. Seven-parameter and other unlisted generations need their own matching source release; the nine-parameter packages do not verify them.

Clone the verifier yourself from the [public repository](https://github.com/Flux-Point-Studios/saturnswap-maker-verify) rather than running a copy anyone hands you, including SaturnSwap. A doctored clone can pass its own checks, so a clean run from someone else's copy proves nothing.

## What the distinction means

Generations differ in what the bot is allowed to do with a client's order, and GENERATIONS.md states the differences per generation, in the table. Broadly: the earliest published generation conserves assets during a bot transaction but does not bind a continuation's declared trading pair to the spent one, nor exclude withdrawn staking rewards from the fee basis; later ones close those, and the current one also requires the bot's continuation to carry the ceremony's own beacons and to declare no expiration.

These are generation-specific guarantees. They do not claim that a generation has no other defect. The band is an immutable bid ceiling and ask floor; it does not guarantee a price relative to any oracle. Public taker fills run the DEX's trading rules and are distinct from bot owner actions.

Moving an old book to the current generation requires a new ceremony and address, and client-authorized recovery and funding transactions. The client-signature branch remains available on every generation; changing the verifier does not migrate a book. The included CLI escape helper uses a zero withdrawal and refuses a nonzero or unreadable reward balance by default. Verification support is not a claim that this helper can recover every delegated account without additional client-signed steps.


# MMaaS: Risks & Exit

What can go wrong, when the keeper closes your book, what SaturnSwap does not promise, and the two transactions that take your whole book back to your own wallet.

Read this before you fund anything. Market making is not a yield product. You are holding both sides of a market with real inventory, and the on-chain guarantees in [What MMaaS is](/saturnswap/mmaas#custody-what-we-can-and-cannot-do) are about **custody**, not about **outcome**.

## The keeper can close your book

The keeper does more than reprice. In the cases below it closes your book on its own: it cancels the order it quotes for you and sends everything in it to the payout address your ceremony names, and SaturnSwap signs and pays the network fee. SaturnSwap can also close a book by hand, to the same address. **In every case the funds go back to your payout address.** The validator backs this: a keeper transaction can only move your value to your order address, your payout address or the bounded ADA fee leg (see [Custody](/saturnswap/mmaas#custody-what-we-can-and-cannot-do)).

Three of the four cases are your own terms, the ones you signed in your consent statement (see [What the statement says](/saturnswap/setting-up-a-book#what-the-statement-says)).

| The keeper closes your book when                                                    | How it is measured                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **It is worth more than your book value cap**                                       | Each round the keeper can price your token: the ADA in your order plus your token valued at the keeper's mid, which moves at most 10% per round. A rise in your token's price counts, so a rise alone can close a book that no one has traded with.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **It loses more than your daily loss limit in a UTC day**                           | Against the book's opening value for the UTC day: its lowest complete valuation in the first 10 minutes after the keeper first values it completely that day, measured the same way as the cap. A fall inside those 10 minutes lowers the opening value instead of closing the book. The round that first values your book each UTC day records that value and does not quote, and neither does a newly funded book's first round. Your limit is your share of the opening value: at the default 5%, once the first 10 minutes have passed, a book that opened the day at 100 ADA is closed once it is worth less than 95 ADA. A fall in your token's price counts as a loss even with no trade. Your token is valued at the keeper's mid, which moves at most 10% per round, so after a sharper move the verdict trails the market by a round or more. A round in which the keeper cannot value your book completely, for example while a fill is not yet confirmed, neither sets the opening value nor closes the book. |
| **Your terms are outside the published bounds, or two of your statements conflict** | Checked each round against [the bounds on your terms](/saturnswap/setting-up-a-book#the-bounds-on-your-terms). The keeper never quotes on terms nearer the bounds than the ones you signed. It returns your order once. Two different statements with the same *signed at* time conflict, and the keeper returns the order rather than choose between them.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **No usable price for 15 minutes**                                                  | 15 minutes in a row in which either feed (bending.ai or GeckoTerminal) gives no price, or the two disagree by more than 5%, for any reason, including an outage at either provider. Every book reads the same two feeds, so a 15-minute outage at one provider closes every book at once.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

A close is not a pause. Your inventory is back at your payout address, as whatever mix of ADA and token the book held at that moment, and nothing is quoted until you fund again.

**A rise alone can close your book.** The page lets you fund at most five sixths of your cap, so a book funded at the most allowed and held entirely in your token is closed by a rise of more than 20% in its price; a book holding some ADA needs a larger rise. That rise is not rare. For a token as volatile as NIGHT has been, a measured daily standard deviation of 5.68%, we estimate the chance that its price touches +20% at some point as about 0.13% within 1 day, 6% within 3 days, 23% within 7 days, 39% within 14 days and 56% within 30 days. These are estimates from a random-walk model with no drift, not measurements. When it happens, the book comes back to your payout address at its higher value.

**Two cases are about capacity, not your book's value.** The keeper quotes one order per book. Any other order at your order address is sent back to your payout address, up to two a day for each client, and any beyond that rests unquoted. One keeper also quotes at most five books: a book that arrives while five are enrolled has its order returned to your payout address, and it can enrol again once a seat is free.

**Funding the same instance again the same UTC day.** After a daily-loss close, that instance stays closed until 00:00 UTC: anything you fund there before then is sent straight back to your payout address. After any other close, including your own exit, the daily loss limit still measures against the value your book opened that UTC day with, so a smaller book funded at the same instance that day can be closed again as soon as the keeper values it. In both cases, until the return lands, the new order rests at the edge of your range. Wait until 00:00 UTC, or set up a new instance.

A feed-outage close is also remembered: that instance is not quoted again, even after the feeds recover, and anything you fund there later is sent straight back to your payout address. To be quoted again, set up a new instance.

A close needs what a reprice needs: a running keeper, a synced node and our gas. During a [pause that stops every book](#pauses-that-stop-every-book-at-once), a close waits too. Your own exit, below, needs none of them.

## Leaving, in two transactions

Both are built and signed in your browser, by your wallet, from [saturnswap.io/v3/mmaas](https://saturnswap.io/v3/mmaas). Connect the wallet that owns the vault and your instances are found **from chain alone**, with no file to upload and nothing for us to look up. The exit steps sit under **Getting your funds out**.

### 1. Close the order

One transaction spends the resting order, burns its three beacons, and pays everything to the payout address your ceremony was built with. Every unit in the payout comes from the order; your wallet supplies only the network fee.

Before your wallet ever opens, the builder refuses if:

* the connected wallet is not the ceremony's payout address. The recovery is authorised by that key and nothing else can sign it;
* the credential is not **registered** on chain. The spend is authorised by the credential appearing in the transaction's withdrawals map, and an unregistered credential cannot appear there at all;
* the planned payout goes anywhere other than your payout address;
* the assembled CBOR fails an independent re-read. The bytes are checked against the order, the beacons and your address by code that shares nothing with the planner that produced them.

If your vault holds several resting orders, this closes one and tells you how many remain. Press it again.

### 2. Retire the credential and take the 2 ADA back

Registering the vault cost a 2 ADA Cardano stake deposit. Retiring it returns that deposit in full.

**Order matters, and the page enforces it.** Retiring the credential while anything still rests at the order address leaves that inventory fillable by takers and repriceable by nobody, including you, because your own recovery path withdraws from that same credential. So the retire step stays closed until the chain says, twice over, that there is nothing to strand:

* the order address holds **no UTxOs**, and
* the chain still reports the credential as **registered** (an unreadable answer is not a yes).

Both are re-read in the moment before you sign, not once at build time. If it does happen, it is stuck rather than lost: registration is permissionless, so anyone can re-register the credential for 2 ADA to unstick it. Only your own key can retire it.

### What it costs, measured on mainnet

These are real transactions. Follow them on an explorer rather than taking the numbers from us.

| Step               | Transaction                                                                                             | Fee          |
| ------------------ | ------------------------------------------------------------------------------------------------------- | ------------ |
| Close the order    | [`cc709973…`](https://cexplorer.io/tx/cc70997302c0bb08d06baac3bebbf487b4c4c5b141b716aa1282388100f9861c) | 0.588766 ADA |
| Retire and reclaim | [`43ee9766…`](https://cexplorer.io/tx/43ee97661fabcca07f58b0d295950a16f8b210936aecd2014ec698513daa0932) | 0.337673 ADA |

Total 0.926439 ADA, against 2 ADA returned.

**Who signed the close and the retire.** They ran on a pilot book SaturnSwap funded with its own ADA, so SaturnSwap's wallet signed them as that book's owner. Open either one on cexplorer and look at the witness set: it carries the book's owner key and not the ADAM bot key, which is the property that matters. No outside client has exited on mainnet yet, so this shows that the owner key alone can empty the address; it is not yet a record of a third-party client leaving.

A **funded** book carrying real inventory went the same way in [`181bde67…`](https://cexplorer.io/tx/181bde674d8a3baceba666647cc979fdf6c97052b2b1935337631292b304e7eb) (fee 0.591181 ADA, block 13,855,967). Decoded from the chain: the order address held 27.000000 ADA and 120,605,319 units of NIGHT plus its three beacons; the transaction produced **two outputs, both to the owner's address**, carrying 27.000000 ADA and 120,605,319 NIGHT (every unit preserved), all three beacons burned, and the whole thing authorised by a zero-lovelace withdrawal from the vault's own credential.

## Leaving if SaturnSwap is gone

The browser path above needs our page to be up. `escape.sh` does not need us at all. It ships in the public verification repo:

```bash
git clone https://github.com/Flux-Point-Studios/saturnswap-maker-verify
```

### What it actually does

It refuses to attach any script it has not rebuilt from a public source and hash-checked against your ceremony:

| Script                                    | Rebuilt from                                                                                                  | Must hash to                          |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| your applied `maker_stake_bound`          | the validator source in that repo, re-applied with your nine parameters                                       | your ceremony's `applied_script_hash` |
| the cardano-swaps two-way spend validator | the public [cardano-swaps](https://github.com/fallen-icarus/cardano-swaps) blueprint at commit **`ecbf5daf`** | `dapp_hash`                           |
| the two-way beacon policy                 | that same blueprint, applied with `dapp_hash`                                                                 | `beacon_id`                           |

Any mismatch is fatal and nothing is submitted. Because every input is public and every script is checked locally, you can point it at **any node you trust**. A hostile node can refuse you service, but it can never redirect your funds.

You can check one link of that chain right now, without running anything of ours. **The commit matters**: cardano-swaps has moved on since the deployment SaturnSwap books against. Its `v2.0.0` tag and its default branch now point to a later release, which produces different hashes, so pin the exact commit.

```bash
git init -q cardano-swaps
git -C cardano-swaps fetch -q --depth 1 https://github.com/fallen-icarus/cardano-swaps \
  ecbf5daf8f28ac6e56adc8cc28d2a0931e01194a
git -C cardano-swaps checkout -q FETCH_HEAD
python3 -c "
import json, hashlib
v = next(x for x in json.load(open('cardano-swaps/aiken/plutus.json'))['validators']
         if x['title'] == 'two_way_swap.swap_script')
print(hashlib.blake2b(bytes([2]) + bytes.fromhex(v['compiledCode']), digest_size=28).hexdigest())
"
# 11928a3ac3b65edbf103ea6bb3362e39b879a36f02897df31c40917b
```

That is the `dapp_hash` listed in [The five values SaturnSwap publishes](/saturnswap/setting-up-a-book#the-five-values-saturnswap-publishes), and baked into your ceremony. It is a third party's open-source contract, not ours.

### Running it

```bash
cd saturnswap-maker-verify
./escape.sh \
  --params my-ceremony.params.json \
  --cardano-swaps-plutus ../cardano-swaps/aiken/plutus.json \
  --project . \
  --network mainnet \
  --dest <where the funds should land> \
  --fund-addr <the wallet paying the fee> \
  --signing-key <your.skey>
```

You need Python 3, [aiken](https://aiken-lang.org) v1.1.22, and a `cardano-cli` pointed at a node. Two things worth knowing:

* **Signing is offline.** `--sign-cli` can be a separate, air-gapped binary; `cardano-cli transaction witness` needs no node and no network. `--build-only` writes the body and stops, so the key never has to touch the machine that talks to a node.
* **Recovery runs in rounds.** Three attached scripts plus a 16 KB transaction ceiling means a large book does not fit in one transaction. Each round measures itself against the limits your node reports and halves the batch if it does not fit. Rounds are independent, so an interrupted run resumes by running the command again.

It will **refuse** rather than guess if your vault has unclaimed staking rewards, or if it cannot read that balance at all. See [Staking and governance](#staking-and-governance).

**Keep your ceremony params file.** See [Checking it yourself](/saturnswap/setting-up-a-book#checking-it-yourself). If you lose it all nine values are recoverable from chain, but that is a reconstruction, and a reconstruction is work you do not want to be doing on the day you need it.

## The honest risk list

SaturnSwap ran books of its own on mainnet, with its own ADA, to find the sharp edges with its own money at risk. The measurements below that say "our own book" come from them.

### You are holding inventory, on both sides

A two-way order is a standing bid and a standing ask. Takers hit whichever one is better for them, which is by definition whichever one is worse for you at that moment. **You should expect to end up with more of the token and less ADA after a fall, and more ADA and less token after a rise.** That is what market making is. Over a trending move it is a loss against simply having held.

Nothing in the design offsets this. Our fee is a fee, not a hedge.

### The band bounds the price, not the outcome

Your two floors are enforced by the validator on every quote, so the keeper can never bid above your ceiling or ask below your floor. That is a hard constraint: an out-of-band quote is a transaction the chain refuses.

**It says nothing about where the band sits relative to the market.** The band bounds the spread; it does not put a floor under your loss. You chose those two numbers, and a band chosen around the wrong mid is a band the validator will faithfully enforce.

### ⚠️ A book nobody re-quotes is not idle: it is a live mispriced offer

This is the risk most people get wrong, so it is worth stating flatly.

A resting order keeps the datum it was funded with. If nothing reprices it, that datum stays exactly where it was while the market moves away. **A stale book is a standing offer at a stale price**. If it has never been repriced at all, that price is your ceremony floors, which are *the worst quote you ever authorised*.

We have measured this on our own book. One sat for 89.8 hours quoting a bid about 5% above the market, with 27 ADA behind it. Nothing took it, so it cost nothing. That was luck, not a property of the design.

Do not read "idle" as "safe". Ask which side is on the wrong side of the market, and how much inventory is behind it. The test is drift, not the age of the last reprice: the book is stale when the market has moved at least the keeper's reprice threshold, 150 basis points (about 1.5 percent) by default, away from the price your order is resting at. A large **"last worked"** figure on the re-entry panel is not itself the alarm, because a healthy keeper reprices only on a move that large and leaves a book in a quiet market untouched for hours or days. Compare your resting price against the current market price on any indexer to tell.

### One band per instance

Your nine parameters are a pure function: the applied script hash **is** the stake credential **is** the order address. Changing any parameter, including either floor, produces a different instance at a different address, with its own 2 ADA deposit. There is no in-place edit.

Moving to a new band is a single signed transaction that carries your whole book across, and the old instance's deposit is reclaimable, so the net cost is roughly the fees. But it is a move, not an edit, and it is yours to initiate.

## Staking and governance

The ADA in your vault is yours, and so is the stake on it. At registration you choose a stake pool and a governance position (Abstain by default). **Leave the stake pool blank**: today a book stops being repriced at its first reward payout, for the reason in [What changes the moment you delegate to a pool](#what-changes-the-moment-you-delegate-to-a-pool). Blank means the vault's ADA stakes nowhere and earns nothing.

Staking yield is excluded from the inventory validator's fee basis in every generation after the earliest: the basis subtracts any withdrawn rewards before the rate is applied. The earliest generation does not do this, and [Validator generations](/saturnswap/validator-generations) explains how to tell which one your book uses.

### Why the default is Abstain, and not nothing

Your vault is registered by one certificate that also records a governance choice, so the page always sets one. Abstain is the default because it is the neutral choice: it takes no governance position and hands voting power to nobody. No confidence and a named DRep are equally valid.

No DRep delegation at all would not lock your vault either. Every owner action on your vault, the keeper's included, is authorised by a withdrawal from its credential. Conway refuses a withdrawal from a reward account with no DRep delegation (`ConwayWdrlNotDelegatedToDRep`), but only when a key controls that account. Your vault's credential is a script, so the check never applies to it. On preprod, one vault credential, [`3227e143…`](https://preprod.cexplorer.io/stake/stake_test17qez0c2rsvpvdqpswfeadhpwxfs7fdsvxex4addseaasz5g8z86ce), was registered with a plain certificate that set no governance choice and has never delegated to a DRep. Since then, 14 transactions under protocol version 11.0, where the check is active, have been authorised by a withdrawal from it. One of them is [`a210b667…`](https://preprod.cexplorer.io/tx/a210b66797bdadf59d5fa2d86b2db2af190e60fddceb2663a6ce911c0918f174).

### What changes the moment you delegate to a pool

⚠️ Once a pool pays you, your vault's reward account is non-zero, and Conway requires a withdrawal to drain that account **exactly**. Measured against a real reward account holding 4,331,166,337 lovelace: a withdrawal one lovelace short was rejected outright, naming both figures. It is an equality, not a ceiling.

On the browser side this is handled. Every owner action (close, retire, move house) measures the balance from chain, states it, and **re-reads it in the moment before you sign**. If an epoch boundary moved it in between, the page refuses, tells you the old and new figures, and asks you to rebuild. Nothing is signed and nothing is touched. Retiring drains the account and deregisters the credential in the same transaction, on one signature.

**The keeper does not handle it yet.** It plans every reprice as if your reward balance were zero, so the reprice it plans has no output to pay a reward into. Before building, it reads the real balance from the node, and once that balance is non-zero it refuses the reprice, every round. From your first reward payout, **your book stops being repriced and rests at its last quote**, which is the stale-book exposure above.

So, plainly: **leave the stake pool blank.** A vault delegated to a pool today stops being quoted at its first reward payout. Your funds are not at risk and your own exit still works: the browser path handles a non-zero balance, and `escape.sh` refuses until you claim it and tells you so. But the service stops working for you.

## Operational limits

### If a price feed goes down, your pair is not quoted: it is not quoted wrongly

The keeper prices your pair from two independent public feeds, with a divergence breaker between them, and refuses an operator-set constant mid on mainnet. See [What your token needs](/saturnswap/mmaas#what-your-token-needs) for the rule and the reason. The short version: **fewer than two healthy feeds means the pair is not quoted that round**, because divergence is unverifiable and quoting into an unchecked number is worse than not quoting. If it lasts 15 minutes, the keeper closes your book. Every book reads the same two feeds, so an outage at either provider does that to every book at once; see [The keeper can close your book](#the-keeper-can-close-your-book).

A token with no listing on either feed cannot currently be quoted at all.

### Pauses that stop every book at once

One keeper quotes every book, through one Cardano node, paying gas from one operator wallet. Either of these stops every book at the same time, whatever your market is doing:

* **The node stalls.** The keeper reads the chain and builds every transaction through that single node, with no failover. When the node's tip falls more than 4 minutes behind the clock, the keeper refuses the whole round rather than quote from a stale chain.
* **Our gas runs out.** Every reprice and every keeper close is paid from that one operator wallet. When it cannot cover a transaction, the keeper skips it, and no book is repriced until we top the wallet up.

While either lasts, your book rests at its last quote, which is the stale-book exposure above, and the closes in [The keeper can close your book](#the-keeper-can-close-your-book) wait too. There is no alert to clients. A climbing **"last worked"** figure alone does not tell you, because a healthy book in a quiet market also rests untouched. The test is drift: if the market has moved at least your reprice threshold away from the price your order is resting at and the order has not moved, nobody is repricing you. A pause cannot cost you custody, and your own exit needs neither: your wallet signs and pays for it, and `escape.sh` runs against any node you choose.

A price-feed outage also reaches every book at once, because every book reads the same two feeds, but it does not pause them: after 15 minutes it closes every book, and each instance stays closed. See [The keeper can close your book](#the-keeper-can-close-your-book).

Your daily loss limit is your book's alone. One book tripping its limit closes that book and no other.

### What you can actually see

Honestly: not much, and you should not rely on us to tell you.

* The page shows each of your instances with what it holds and **"last worked&#x20;*****N*****h ago"**, computed from the age of the UTxO at your order address.
* That number comes from the chain, so you can compute it yourself from any indexer without asking us. Read it with your resting price: a large age in a quiet market is normal, and a market that has moved at least your reprice threshold away from that price is the signal.
* There is **no public health endpoint and no alerting to clients today.** Our own book-health check is internal and deliberately not public. It is a list of which books are not being repriced and exactly what they hold, which is an adverse-selection target list aimed at the people it exists to protect.

If you are running real size, watch your order address yourself.

## What you still have to trust

The validator bounds where your value can go. It does not bound everything, and what remains is short but real.

* **Quote quality is off-chain conduct.** The chain proves the keeper cannot take your inventory. It does not prove the keeper quotes well. Judge that from the public book, from "last worked", and from your own dashboard at [saturnswap.io/v3/mmaas/book](https://saturnswap.io/v3/mmaas/book).
* **The bot key touches your inventory on every reprice.** Repricing is the service: each reprice spends your order and rebuilds it. The validator fixes where the value can land, not whether the bot key can move it.
* **The fee line in your statement bounds one fee.** Its `our fee` line is the inventory validator's bound on the ADA fee leg of a keeper transaction: at most that share of the ADA the transaction pays out to your wallet, and nothing when it closes your order. The service fee is drawn from your separate prepaid balance, which that bound does not protect; see [How service billing works](/saturnswap/mmaas#how-service-billing-works).
* **The five published values are ours to publish and yours to check.** The verifier takes `dapp_hash` and `beacon_id` as given. Check them against [The five values SaturnSwap publishes](/saturnswap/setting-up-a-book#the-five-values-saturnswap-publishes) and on chain.
* **Your keys are your own claim.** The setup records your wallet's key and payout address. No tool can prove to anyone else that they are really yours.
* **The verifier you run must be the real one.** A doctored clone can pass its own checks. See [Check an existing address](/saturnswap/validator-generations#check-an-existing-address).
* **No outside client has exited on mainnet yet.** See [What it costs, measured on mainnet](#what-it-costs-measured-on-mainnet).

## What SaturnSwap does not promise

* **No guaranteed fills.** Your order rests on a public order book. Takers arrive or they do not. Thin markets stay thin.
* **No guaranteed profit.** See the inventory risk above. A market maker can quote perfectly and still finish behind on a trending move.
* **No guarantee the keeper is running at any instant.** It is one service. It can be down, [paused for every book at once](#pauses-that-stop-every-book-at-once), or refusing your book for a reason that is correct. There is no uptime commitment here.
* **No guarantee the code is free of vulnerabilities.** An AI red team attacks the validator and the keeper every week and publishes every run with its date ([the dated record](https://github.com/Flux-Point-Studios/docs/issues?q=is%3Aissue%20author%3Arealdecimalist%20%22Red%20team%22%20in%3Atitle)), and validator unit and property tests are recorded at named revisions. The most recent combined run to reach a verdict, on September 10, 2026, returned BLOCK, and funding new books stays closed until a combined run against the release that will take funds returns GREEN. See [Security evidence](/saturnswap/security-evidence).
* **Bounded control over trading inventory.** The current validator requires keeper actions to preserve assets within the permitted order, client payout and bounded ADA fee outputs. The prepaid fee channel is separate and its operator signing branch can spend that balance; the inventory fee bound does not protect it. See [What it costs](/saturnswap/mmaas#what-it-costs).
* **No ability to stop you leaving.** Your key alone cancels every order and pulls the funds back, unconditionally, with no notice to us and no cooperation from us. We cannot deregister your credential to pocket its deposit, and we cannot delegate your stake.

A client who reads this page and proceeds anyway is a client who will not be surprised. That is the point of it.

Back to: [What MMaaS is](/saturnswap/mmaas) · [Setting up a book](/saturnswap/setting-up-a-book)


# API Integration (Aggregators)

Integrate SaturnSwap swaps from your own app or aggregator using the public GraphQL API — build, sign, submit. No API key, no on-chain contract work.

This guide is for developers building **on top of** SaturnSwap — aggregators, routers, bots, and front-ends that want to execute Cardano swaps through SaturnSwap's order book without re-implementing the on-chain transaction logic.

You do **not** build SaturnSwap transactions yourself. You call the public GraphQL API, which returns a ready-to-sign transaction that already carries the Plutus redeemers and SaturnSwap's protocol co-signature. Your user signs it in their own wallet, you hand it back, and SaturnSwap submits it to the chain. Trades remain fully non-custodial.

{% hint style="info" %}
**Why route through the API instead of building txs directly?** SaturnSwap's validators charge a protocol fee. When a transaction is co-signed by SaturnSwap's authority key (which the API does for you on every order), the standard protocol fee applies. Transactions built and submitted **without** that co-signature fall back to the contract's higher anti-bot fee. Routing through the API gets your users the standard fee automatically — and you inherit any future fee or routing improvements with no code changes.
{% endhint %}

## Endpoint

```
POST https://api.saturnswap.io/v1/graphql/
Content-Type: application/json
```

No authentication or API key is required for the swap endpoints — they are the same public operations the SaturnSwap web client uses.

## The flow

Every order is three steps: **create → sign → submit**.

```
createOrderTransaction   ──►  unsigned tx (CBOR hex) + transactionId
        user wallet      ──►  partial-sign (CIP-30)
submitOrderTransaction   ──►  on-chain transactionId
```

1. **Create.** Call `createOrderTransaction` with the order details. You get back a `transactionId` and an unsigned transaction (`hexTransaction`).
2. **Sign.** Have the user's wallet partial-sign the transaction (CIP-30 `signTx(hex, true)`), then merge the returned witness set back into the transaction. Add **only** the user's witness — do not modify the transaction body.
3. **Submit.** Call `submitOrderTransaction` with the **same** `transactionId` and the signed transaction. SaturnSwap lifts the user's witness into its stored copy of the transaction (which holds the script redeemers and the protocol co-signature) and submits it. You get back the on-chain `transactionId`.

{% hint style="warning" %}
**Conway tag-258.** Some wallet CSL builds cannot parse Conway canonical-set encoding (CBOR tag `258`, bytes `0xD9 0x01 0x02`) and will throw `expected Array got Tag` on `signTx`. If you hit this, strip the tag-258 prefixes from the transaction bytes before signing. SaturnSwap computes the `transactionId` over the tag-258-stripped body, so stripping it is expected and does not invalidate the signature.
{% endhint %}

## Step 1 — `createOrderTransaction`

```graphql
mutation Create($input: CreateOrderTransactionInput!) {
  createOrderTransaction(input: $input) {
    successTransactions { transactionId hexTransaction }
    failTransactions { error { message code } }
    error { message code }
  }
}
```

Example — a **market buy** spending 5 ADA on a pool:

```json
{
  "input": {
    "paymentAddress": "addr1...<the user's wallet address>",
    "marketOrderComponents": [
      {
        "poolId": "<pool uuid>",
        "tokenAmountSell": 5,
        "tokenAmountBuy": 1,
        "marketOrderType": "MARKET_BUY_ORDER",
        "slippage": 2,
        "version": 2
      }
    ]
  }
}
```

`hexTransaction` in the response is the unsigned transaction (CBOR hex). You can batch multiple components — and even multiple order types — in a single `createOrderTransaction` call.

### Input reference

`CreateOrderTransactionInput`:

| Field                   | Type                     | Notes                                          |
| ----------------------- | ------------------------ | ---------------------------------------------- |
| `paymentAddress`        | `String!`                | The user's Cardano wallet address (the taker). |
| `marketOrderComponents` | `[MarketOrderComponent]` | Market (immediate) fills.                      |
| `limitOrderComponents`  | `[LimitOrderComponent]`  | Resting limit orders.                          |
| `cancelComponents`      | `[CancelComponent]`      | Cancel a resting order by `poolUtxoId`.        |

`MarketOrderComponent`:

| Field             | Type            | Notes                                                                                                                                         |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `poolId`          | `String!`       | Target pool (see [Pool discovery](#pool-discovery)).                                                                                          |
| `tokenAmountSell` | `Float!`        | Amount you **give**, in display units (e.g. `5` = 5 ADA on a buy; `1000` = 1000 tokens on a sell). SaturnSwap scales by the token's decimals. |
| `tokenAmountBuy`  | `Float!`        | Minimum amount you **receive** (slippage floor).                                                                                              |
| `marketOrderType` | `PoolUtxoType!` | `MARKET_BUY_ORDER` (give ADA, get token) or `MARKET_SELL_ORDER` (give token, get ADA).                                                        |
| `slippage`        | `Float`         | Max slippage as a **percent**, `0.1`–`100`.                                                                                                   |
| `version`         | `Int`           | Use `2`.                                                                                                                                      |

`LimitOrderComponent` mirrors the above with `limitOrderType` = `LIMIT_BUY_ORDER` or `LIMIT_SELL_ORDER`, `tokenAmountSell`/`tokenAmountBuy` as the exact give/receive amounts, and no `slippage`.

Order-type enum (`PoolUtxoType`): `LIMIT_BUY_ORDER`, `LIMIT_SELL_ORDER`, `MARKET_BUY_ORDER`, `MARKET_SELL_ORDER`, `CANCEL`.

## Step 2 — sign in the user's wallet

Using a CIP-30 wallet (Lace, Eternl, Vespr, Tokeo, …):

```js
// hexTransaction came from step 1
const witnessSetHex = await wallet.signTx(hexTransaction, true); // partial = true
const signedHex     = assembleTransaction(hexTransaction, witnessSetHex);
// `assembleTransaction` merges the witness set into the tx (e.g. via lucid-cardano or CSL).
```

Only the user's verification-key witness is added; the transaction body is unchanged.

## Step 3 — `submitOrderTransaction`

```graphql
mutation Submit($input: SubmitOrderTransactionInput!) {
  submitOrderTransaction(input: $input) {
    transactionIds
    error { message code link }
  }
}
```

```json
{
  "input": {
    "paymentAddress": "addr1...<same user address>",
    "successTransactions": [
      { "transactionId": "<from step 1>", "hexTransaction": "<signedHex from step 2>" }
    ]
  }
}
```

`transactionIds` are the on-chain transaction hashes. The `transactionId` you pass **must** match the one returned by `createOrderTransaction` — it keys SaturnSwap's stored copy of the fully built transaction.

## Pool discovery

Resolve a token to its `poolId`, and read the live book:

```graphql
query Pools {
  pools(where: { ticker: { eq: "SNEK" } }) {
    nodes { id ticker lp_fee_percent }
  }
}
```

* `poolByTokens(...)` — look up a pool by its token's policy id and asset name.
* `orderBookBuyPoolUtxos` / `orderBookSellPoolUtxos` — the resting bids and asks for a pool.

## Errors

* `createOrderTransaction` returns per-component failures in `failTransactions { error { message code } }` and request-level problems in `error { message code }`. Common `code`s include `Slippage` (the book moved past your slippage tolerance — widen `slippage` or reduce size), `InsufficientBalance`, and `WalletFragmented` (the wallet's ADA is spread across too many UTxOs; consolidate with a self-payment).
* `submitOrderTransaction` returns submission errors in `error { message code link }`.

## Reference transaction

A 5-ADA market buy executed end-to-end through this API on Cardano mainnet: [`ca8de851aa044d09ebb135e28acb70a3dd4753059c5636e0f4470652df76bb23`](https://cardanoscan.io/transaction/ca8de851aa044d09ebb135e28acb70a3dd4753059c5636e0f4470652df76bb23).


# ADAM Litepaper

Updated November 2025 — Version 1.2

<figure><img src="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FqQnNTIuoEfgAG8VIHB6V%2FADAM.png?alt=media&amp;token=2378df6c-11cf-47fe-a9de-06e960dfe0ba" alt="" width="563"><figcaption><p>AI‑Driven Adaptive Market Making (ADAM)</p></figcaption></figure>

***

### Abstract

AI‑Driven Adaptive Market Making (ADAM) is an autonomous portfolio‑balancing and liquidity‑provisioning system built on Cardano. ADAM combines deterministic rebalancing logic with real‑time, AI‑powered token‑risk analysis provided by [**T**](https://x.com/agentic_t), Flux Point Studios’ agentic intelligence entity. The goal is to maintain optimal asset allocation based on user specifications while surfacing actionable insights on market conditions, social sentiment, and on‑chain metrics—empowering users to compound yield with lower risk.

***

### Motivation

Traditional market‑making and rebalancing strategies rely on static rules that ignore rapidly evolving token fundamentals, community sentiment, and liquidity shocks. DeFi participants need:

* **Adaptive execution** that reacts to changing risk factors.
* **Actionable intelligence** distilled from diverse data sources.
* **Non‑custodial automation** they can trust.

ADAM addresses these gaps by unifying a rules‑based rebalancer with **T**'s risk‑analysis engine.

***

### System Overview

```
┌────────────────────────────┐
│  Wallet / Portfolio State  │  ← UTxO snapshot + prices
└──────────────┬─────────────┘
               │ fetch
               ▼
┌────────────────────────────┐
│  Allocation Analyzer       │  ← target %, tolerance
└──────────────┬─────────────┘
   needs rebalance? │ yes             no │
               ▼                      ▼
┌────────────────────────────┐   ┌─────────────────────────┐
│  Rebalancing Engine        │   │  Sleep / Monitor        │
│  (deterministic)           │   └─────────────────────────┘
└──────────────┬─────────────┘
               │ builds tx
               ▼
┌────────────────────────────┐
│  Trade Execution Layer     │  ← DEX router
└──────────────┬─────────────┘
               │ tx hash
               ▼
┌────────────────────────────┐
│  AI Risk Analyzer (T)      │  ← TapTools, Xerberus, X, Others
└──────────────┬─────────────┘
               │ notifications / dashboard
               ▼
           End‑user / dApp
```

***

### Parameters (User Specified)

<table><thead><tr><th>Variable</th><th>Default</th></tr></thead><tbody><tr><td><pre class="language-properties"><code class="lang-properties">MIN_PROFIT_THRESHOLD
</code></pre></td><td><pre class="language-properties"><code class="lang-properties">0.02
</code></pre></td></tr><tr><td><pre><code>MAX_POSITION_SIZE_ADA
</code></pre></td><td><pre><code>100
</code></pre></td></tr><tr><td><pre><code>MIN_TRADE_SIZE_ADA
</code></pre></td><td><pre><code>50
</code></pre></td></tr><tr><td><pre><code>MAX_SLIPPAGE
</code></pre></td><td><pre><code>3.0
</code></pre></td></tr></tbody></table>

***

### AI‑Enhanced Risk Analysis

While the deterministic engine keeps allocations on target, **T** continuously scores each token on:

* **Price momentum & liquidity** (DEX volumes, order‑book depth)
* **On‑chain health** (active wallets, whale flows, contract events)
* **Social sentiment** (Twitter/X, Discord, Reddit activity)

#### Unified API

```bash
POST /analyze-token
{
  "tokenName": "SNEK",
  "policyId": "279c909f348e533da5808898f87f9a14...",
  "network": "cardano"
}
```

The response returns a directional bias (Bullish / Bearish), confidence level, and explanatory bullet points. Users can opt‑in to:

* **Alerts** before rebalances if risk spikes.
* **Override suggestions** (e.g., pause buys on high‑risk tokens).

### ADAM Analytics Engine Example

<figure><img src="https://1356692922-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUuGwxkf8UtZNwSX6MybN%2Fuploads%2FjD6uwrPiIahBwQdzwdUP%2Fimage.png?alt=media&amp;token=585e4289-80e2-4bf2-8658-51169132d678" alt=""><figcaption></figcaption></figure>

***

### Implementation Stack

| Layer                                                   | Tech                                                                                  |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Liquidity Pool Insights and DEX transaction submissions | <https://github.com/IndigoProtocol/dexter> & <https://github.com/IndigoProtocol/iris> |
| Off‑chain agent runtime                                 | Node.js (TypeScript)                                                                  |
| Data ingestion                                          | TapTools, Xerberus, Blockfrost, X, Lunar Crush, ADAWhiz, Market Raker AI              |
| Wallet & Tx library                                     | MeshJS + lucid-evolution                                                              |

***

### Security & Compliance

* **Non‑custodial keys**: ADAM operates via client‑side wallet signatures; funds never leave user custody.
* **Rate‑limiting**: AI calls are signed + metered; no PII stored.

***

### Launch & Access

> **ADAM v2 update (2026).** ADAM v2 removes launch passes and subscriptions entirely — access is open and priced **per transaction only**. T1/T2 ADAM Launch Passes are being bought out with cMATRA through the [cMATRA Token Merger](/materios-partner-chain/faq#33a-i-hold-a-t1-or-t2-adam-launch-pass-will-i-lose-access-to-adam-if-i-surrender-it) (redemption window closes November 28, 2026) — surrendering a pass does **not** cost you ADAM access. The phased-access history below is preserved for the record.

**ADAM** launched in three controlled phases:

* ~~**Phase 1** – Access granted for holders of T1 ADAM Launch Pass (Black and Copper - 250,000 $AGENT - Max Supply of 10 - Earliest Access to Launch and all new features) while we closely monitor operational performance.~~ **Phase 1 Complete. There was a mint issue that allowed 43 passes to be minted. We chose to honor them all. (Secondary Market:** [**https://www.jpg.store/collection/t1adamlaunchpass**](https://www.jpg.store/collection/t1adamlaunchpass)**)**
  * **T1 Benefits:**
    * **LIFETIME ACCESS TO ADAM**
    * **+2 Additional Trading Agents**
* ~~**Phase 2** – Access widens to holders of T2 ADAM Launch Pass (Aluminum - 100,000 $AGENT - Max Supply of 150 - Earlier Access to Launch and all new features). Once again we monitor and confirm stability. (Sale Date: 8/1/2025 at 17:00 UTC).~~ **Phase 2 Complete. (Secondary Market:** [**https://www.jpg.store/collection/t2adamlaunchpass**](https://www.jpg.store/collection/t2adamlaunchpass)**)**
  * **T2 Benefits:**
    * **2yr ACCESS TO ADAM (Starting November 1, 2025)**
      * **+1 Additional Trading Agents**
* **Phase 3** – Public launch with ~~20,000 $AGENT~~ 50 $USDM per month subscription for access to ADAM.

These *ADAM Launch Passes* acted as a bridge for tiered early access during launch. Under ADAM v2 they are no longer required — see the update note above.\
\
These Launch Passes will be available starting with T1 on 7/3/2025 at <https://fluxpointstudios.com/adam>

### Subscription (superseded by ADAM v2)

~~Once launched, users pay 50 $USDM per month to Flux Point Studios to activate **one trading agent bound to a single wallet**.~~ **Superseded:** ADAM v2 has no subscription and no $AGENT-denominated pricing — usage is billed **per transaction only**. ($AGENT itself is consolidating into cMATRA via the [token merger](/materios-partner-chain/cmatra-token-merger).)

***

### Team

[Flux Point Studios, Inc.](https://fluxpointstudios.com/)

***

### Legal Disclaimer

*This document is for informational purposes only and does not constitute investment advice or an offer to sell any security. Digital asset markets are volatile and carry risk. Always perform your own due diligence.*

***

*© 2025 Flux Point Studios, Inc. All rights reserved.*


# T Backend Developer Guide

<img src="https://github.com/user-attachments/assets/cef3c0e4-c20d-4ae5-a6e1-7c00ab4fb0a1" alt="agentT_realistic" height="400" width="400">

**Welcome to T Backend!** This guide helps you integrate with the **T API** and understand the core request flows.

### Quick Links

* **Base URL**: `https://api-v3.fluxpointstudios.com`
* **Swagger API Docs**: [API Docs](https://api-v3.fluxpointstudios.com/docs)
* **Support**: `contact@fluxpointstudios.com` · [Discord](https://discord.gg/MfYUMnfrJM)

***

## Authentication

### Service API key (required)

Every request to `POST /chat` and `POST /token-analysis` **requires** a service `api-key` header. The key authenticates you as a trusted, registered caller:

```bash
curl -s https://api-v3.fluxpointstudios.com/chat \
  -H "api-key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"message":"hello"}'
```

A missing, invalid, inactive, or expired key returns **`401 Unauthorized`**.

If you need an API key, contact `contact@fluxpointstudios.com` or reach out on [Discord](https://discord.gg/MfYUMnfrJM).

### Optional wallet session (metered agent mode)

`POST /chat` accepts an **optional** `Authorization: Bearer <wallet-session>` header on top of the api-key:

* **No bearer** → **free conversational mode** (the default; the SaturnSwap web-app path). No ledger debit/refund.
* **Valid bearer** → **metered agent mode** (the autonomous-agent runtime). The reply includes `balance_after` from the server ledger.
* A **malformed / expired / revoked** bearer fails closed with **`401`** — only the *absence* of a bearer downgrades to free mode.

> The api-key is always required in both modes. The bearer only adds *spending identity*; it never replaces the api-key.

### Browser / extension callers

CORS is `allow_origins: *`, which works for **header-based** auth (it does not cover cookies). From a browser or extension:

* Send `credentials: "omit"` (do not rely on cookies).
* Send a **normal User-Agent** — the Cloudflare WAF may return `403` for unusual or empty UAs.

***

## Public API Surface

The customer-facing Swagger docs are scoped to:

* `GET /health`, `GET /api`
* `POST /chat`
* `POST /token-analysis`
* `GET /usage`
* `POST /images/*`

If you have additional capabilities enabled for your deployment, you'll receive separate documentation for those routes.

***

## 1) Chat (`POST /chat`)

Send a message and receive a reply. **`/chat` is authenticated with the `api-key` header only — it is not a payment endpoint** (no x402 invoices on this route).

### Request schema

| Field         | Type   | Required | Notes                                                                                                                                                    |
| ------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message`     | string | **yes**  | 1–32000 chars.                                                                                                                                           |
| `session_id`  | string | no       | **Logging / correlation only.** It does **not** carry conversation memory — the server keeps no per-session history. (See "Conversation context" below.) |
| `image_data`  | string | no       | Base64 data URI for multimodal input (e.g. `data:image/png;base64,...`).                                                                                 |
| `stream`      | bool   | no       | Default `false`. `true` → Server-Sent Events (see Streaming).                                                                                            |
| `system`      | string | no       | System prompt override.                                                                                                                                  |
| `persona`     | string | no       | Persona selector.                                                                                                                                        |
| `profile`     | string | no       | Profile selector.                                                                                                                                        |
| `temperature` | float  | no       | `0`–`2`.                                                                                                                                                 |
| `top_p`       | float  | no       | `0`–`1`.                                                                                                                                                 |
| `max_tokens`  | int    | no       | `1`–`262144`. Default `2048`.                                                                                                                            |
| `meta`        | object | no       | Free-form metadata.                                                                                                                                      |
| `context`     | object | no       | Public wallet snapshot, treated as untrusted LLM context. The server never reads client-sent balances for entitlement.                                   |
| `request_id`  | string | no       | Per-turn idempotency key (UUID v4), stable across retries. Keys debit/refund in metered mode.                                                            |

> There is **no `model` field** (the server selects the model — Kimi by default) and **no `history` / `messages` array**. Each call is a single turn.

### Response schema

```json
{
  "reply": "…",            // always set (never empty, even on provider failure)
  "used_tools": { },        // tool-call summary, or null
  "reply_json": null,       // always null — see note below
  "provider": "kimi",
  "model": "…",
  "reasoning": "…",        // Kimi thinking content, or null
  "balance_after": 0        // metered (bearer) mode only; null in free mode
}
```

> **Note:** `reply_json` is always `null`. There is no structured-output / JSON-mode feature — parse `reply` (a string) yourself if you need structured data.

### Basic example

```python
import requests

r = requests.post(
    "https://api-v3.fluxpointstudios.com/chat",
    headers={"api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={"message": "What is Cardano?"},
)
print(r.json()["reply"])
```

### Conversation context

`session_id` is used only to correlate logs/telemetry — it does **not** make the server remember previous turns. If you need multi-turn context, include the relevant prior content in `message` (or `system`) yourself.

### Streaming (Server-Sent Events)

Set `"stream": true` to receive `text/event-stream` output. Each frame is `data: {json}\n\n` where the JSON has a `type`:

* `content` — `{"type":"content","text":"…"}` (answer tokens)
* `reasoning` — `{"type":"reasoning","text":"…"}` (Kimi thinking tokens)
* `tool_call` — `{"type":"tool_call","name":"…","args":{…}}`
* `tool_result` — `{"type":"tool_result","name":"…","ok":true|false}`

The stream terminates with `data: [DONE]\n\n`.

```python
import requests

with requests.post(
    "https://api-v3.fluxpointstudios.com/chat",
    headers={"api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={"message": "Summarize Cardano in 5 bullets.", "stream": True},
    stream=True,
) as resp:
    resp.raise_for_status()
    for line in resp.iter_lines():
        if line:
            print(line.decode("utf-8"))  # e.g. b'data: {"type":"content","text":"…"}'
```

### Image input (optional)

Provide `image_data` as a base64 data URI:

```python
import requests

r = requests.post(
    "https://api-v3.fluxpointstudios.com/chat",
    headers={"api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
        "message": "What's in this image?",
        "image_data": "data:image/png;base64,AAAA...",  # your base64
    },
)
print(r.json()["reply"])
```

### Errors

* **`401`** — missing/invalid `api-key` (or a malformed `Authorization: Bearer`).
* **`422`** — request body fails validation (e.g. `message` too long, `temperature` out of range).
* Otherwise the endpoint degrades to `200` with a descriptive `reply` rather than returning a 5xx for chat-logic failures.

***

## 2) Token Analysis (`POST /token-analysis`)

Analyze a token. Requires the `api-key` header (same as `/chat`). The request accepts **both snake\_case and camelCase** field names.

### Request schema

| Field (camel / snake)                                               | Type   | Notes                                                                                                                                     |
| ------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `token` / `tokenName`                                               | string | Token symbol or name (e.g. `SNEK`). Required (unless it is a known internal ticker).                                                      |
| `policyId` / `policy_id`                                            | string | The Cardano policy id (56-hex). Required for non-internal tokens.                                                                         |
| `assetNameHex` / `asset_name_hex`                                   | string | Cardano asset name in hex. **Required for V2 Cardano** (omitting it returns `400`; pass an empty string `""` if the asset name is empty). |
| `network`                                                           | string | Default `cardano`. Allowed: `cardano`, `ethereum`, `base`, `solana`, `polygon`, `avalanche`.                                              |
| `api_version` / `apiVersion` (body) **or** `X-API-Version` (header) | string | `"1"` = LLM analysis (default). `"2"` = deterministic risk engine. Header wins over body.                                                 |

> `network` defaults to `cardano`. The version can be set in the body (`api_version`/`apiVersion`) or via the `X-API-Version` header; the header takes precedence, and the default is `"1"`.

### Example (V2, Cardano)

```python
import requests

r = requests.post(
    "https://api-v3.fluxpointstudios.com/token-analysis",
    headers={
        "api-key": "YOUR_API_KEY",
        "Content-Type": "application/json",
        "X-API-Version": "2",
    },
    json={
        "token": "SNEK",
        "policyId": "279c909f348e533da5808898f87f9a14bb2c3dfbbacccd631d927a3f",
        "assetNameHex": "534e454b",   # REQUIRED for V2 Cardano ("" if the asset name is empty)
        "network": "cardano",
    },
)
print(r.json())
```

### Response shapes

The response is a JSON object whose shape depends on `api_version`.

**V2 (`"2"`)** — a deterministic `AnalysisReport`:

```json
{
  "token_name": "SNEK",
  "network": "cardano",
  "api_version": "2",
  "risk_engine": { "overall_score": 0.42, "risk_level": "…", "subscores": { }, "confidence": 0.8, "…": "…" },
  "market":      { "price_usd": 0.0, "market_cap_usd": 0.0, "volume_24h_usd": 0.0, "…": "…" },
  "liquidity":   { "pool_depth_usd": 0.0, "pool_count": 0, "spread_bps": 0 },
  "holders":     { "holder_count": 0, "top_10_holder_pct": 0.0 },
  "security":    { "contract_verified": false, "registry_present": false, "…": "…" },
  "data_quality":{ "coverage": 0.0, "sources_used": [], "sources_failed": [], "…": "…" },
  "_meta":       { "request_id": "…", "from_cache": false, "…": "…" }
}
```

(Null fields are omitted. The response is also augmented with a `_meta` block — request id, cache flag, scoring details.)

**V1 (`"1"`, default)** — LLM analysis:

```json
{
  "token": "SNEK",
  "network": "cardano",
  "analysis": "…",                  // LLM-generated text
  "riskLevel": "…",
  "marketData": { "price": 0.0, "marketCap": 0.0, "volume24h": 0.0, "priceChange7d": 0.0, "priceChange30d": 0.0 },
  "dataQuality": { "coverage": 0.0, "sourcesUsed": [] }
}
```

### Notes & errors

* Results may be cached for performance. Bypass with `x-bypass-cache: 1`.
* **`400`** — missing `token`/`network`, a non-alphanumeric `policyId`/`token`, an unknown `network`, or (V2 Cardano) a missing `assetNameHex`.
* **`401`** — missing/invalid `api-key`.
* **`422`** — body fails type parsing.

***

## 3) Usage (`GET /usage`)

Return **this API key's own** usage. Authenticated with the same `api-key` header as `/chat` (no x402, no wallet session). The endpoint is **key-scoped**: a caller only ever sees usage attributed to its own key — never another key's data and never aggregate/admin totals.

### Request

No body. Send your service API key:

```bash
curl -s https://api-v3.fluxpointstudios.com/usage \
  -H "api-key: YOUR_API_KEY"
```

### Response schema

```json
{
  "key_id": 2,
  "owner": "saturnswap",
  "name": "SaturnSwap Frontend",
  "is_active": true,
  "created_at": null,
  "expires_at": null,
  "lifetime_calls": 4902,
  "usage": {
    "total_calls": 3,
    "total_tokens": 1547,
    "by_endpoint": {
      "/chat": { "calls": 2, "total_tokens": 1547 },
      "/token-analysis": { "calls": 1, "total_tokens": 0 }
    },
    "today": { "calls": 3, "total_tokens": 1547 },
    "this_month": { "calls": 3, "total_tokens": 1547 }
  },
  "as_of": "2026-06-24T21:50:43.532893Z",
  "note": "counts may lag up to ~30s"
}
```

| Field                                      | Notes                                                                                         |
| ------------------------------------------ | --------------------------------------------------------------------------------------------- |
| `key_id`                                   | Internal numeric id for your key (not the key value).                                         |
| `owner` / `name`                           | Your key's owner and label.                                                                   |
| `is_active`                                | Whether the key is currently active.                                                          |
| `created_at` / `expires_at`                | Key lifecycle timestamps (UTC; may be `null`).                                                |
| `lifetime_calls`                           | All-time call counter for the key.                                                            |
| `usage.total_calls` / `usage.total_tokens` | Totals across all endpoints in the tracked window.                                            |
| `usage.by_endpoint`                        | Per-endpoint breakdown — `/chat` and `/token-analysis`, each with `calls` and `total_tokens`. |
| `usage.today` / `usage.this_month`         | Calls and tokens for the current UTC day and month.                                           |
| `as_of`                                    | UTC timestamp the response was computed.                                                      |
| `note`                                     | Freshness note (see below).                                                                   |

### Notes & errors

* **Eventual consistency:** per-call events are buffered and flushed about every **30 seconds**, so counts may lag up to \~30s behind real time.
* **Token cost:** `/chat` records real model token usage. `/token-analysis` calls are counted with a **flat / no token cost** (`total_tokens` is `0`).
* **`401`** — missing/invalid `api-key`.

***

## 4) Images (`/images/*`)

### Generate (`POST /images/generate`)

```python
import requests

r = requests.post(
    "https://api-v3.fluxpointstudios.com/images/generate",
    headers={"api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={"prompt": "A futuristic Cardano validator node in space", "size": "1024x1024", "n": 1},
)
data = r.json()
if data.get("success"):
    print("images:", len(data.get("images") or []))
else:
    print("error:", data)
```

### Edit (`POST /images/edit`)

* `input_images` is a list of base64 images
* Each image is validated to **<= 25MB**

```python
import requests

r = requests.post(
    "https://api-v3.fluxpointstudios.com/images/edit",
    headers={"api-key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
        "prompt": "Add plants and warm natural lighting",
        "input_images": ["data:image/png;base64,AAAA..."],
        "n": 1,
        "size": "1024x1024",
    },
)
print(r.json())
```

### Upload + edit (`POST /images/upload-and-edit`)

Use this if you want to upload an image file directly instead of base64. Refer to the Swagger docs for the exact multipart form fields.

### Variations (`POST /images/variations`)

API-key only. Refer to the Swagger docs for the request format.

***

## Operational Notes

### Request IDs

You may send `X-Request-Id` and the server will echo `X-Request-ID` back on responses. This helps correlate logs and support requests.

### Common status codes

* **401**: missing/invalid `api-key` (or a malformed `Authorization: Bearer`).
* **400**: invalid request parameters (e.g. unknown network, missing `assetNameHex` for V2 Cardano).
* **413**: payload too large (commonly for image base64 uploads).
* **422**: request body fails validation.
* **5xx**: transient server or upstream failures; retry with backoff. (Note: `/chat` degrades to a `200` with a descriptive `reply` instead of returning 5xx for chat-logic failures.)

***

## Troubleshooting

### 1) "401 Unauthorized"

* Ensure the `api-key` header is present and correct.
* Confirm the key is active and not expired (contact support if unsure).
* If you send `Authorization: Bearer …`, make sure the wallet session is valid — a malformed/expired bearer also 401s.

### 2) "403 Forbidden" (browser / extension)

* The Cloudflare WAF can block unusual or empty User-Agent strings. Send a normal UA.
* Use `credentials: "omit"` — CORS is `allow_origins: *` for header auth, not cookies.

### 3) "400 Bad Request" on `/token-analysis`

* For V2 Cardano you must include `assetNameHex` (use `""` if the asset name is empty).
* Check `policyId` and `token` are present and alphanumeric, and `network` is one of the supported values.

### Debug tip

```python
import requests

resp = requests.post(url, headers=headers, json=payload)
print(resp.status_code, resp.text)
```

***

## Additional Resources

* **Swagger docs**: [API Docs](https://api-v3.fluxpointstudios.com/docs)

***

## You're Ready

Quick checklist:

* [ ] Get an API key (`contact@fluxpointstudios.com` or Discord)
* [ ] `GET /health`
* [ ] `POST /chat` (with `api-key`)
* [ ] `POST /token-analysis` (include `assetNameHex` for V2 Cardano)
* [ ] `POST /images/generate`


# Cardano UE SDK

Unreal Engine SDK (CORE)

## Flux Point Cardano SDK — Core (FAB)

> **SHARDS is no longer part of this SDK.** The free UE 5.5 build shipped with a demo integration that used the legacy SHARDS token. SHARDS was retired in the [cMATRA Token Merger](/materios-partner-chain/cmatra-token-merger), and that dependency is being removed. The licensed Core SDK runs on ADA only and needs no Flux Point token. SHARDS holders should redeem before **November 28, 2026**.

### Setup

* Install plugin into your project Plugins folder.
* Project Settings > CardanoSdk:
  * CurrentNetwork: mainnet or preprod
  * ApiKey: Blockfrost project\_id
  * BaseUrl: <https://cardano-mainnet.blockfrost.io/api/v0> or preprod URL
  * TreasuryAddress: preconfigured (locked in FAB)
  * PlatformFeeBps: preconfigured (locked in FAB)
  * PlatformMinLovelace: 2,000,000 (locked in FAB)

### Blueprint Quickstart

* Use `ImportMnemonic` once to load your funded 12-word wallet.
* Toggle `ForceImport` true once to overwrite any saved wallet, then false.
* Flow: BeginPlay → Branch(ForceImport)
  * True: Delete Game in Slot → ImportMnemonic → LogIn
  * False: Has Wallet → (if false ImportMnemonic) → LogIn
* After `LogIn`: `GetAddress` → `GetBalance` → `Mint Asset`.

### Mint Configuration

* CIP-25 struct allows setting MintPriceLovelace and optional CreatorAddress.
* Platform fee: min(percentage of price, percentage of network fee), floored at 2 ADA to treasury.
* Creator payout: (MintPriceLovelace - platform\_fee) to CreatorAddress when provided.

### Reliability & Logging

* Detailed logs on all nodes (errors include Cardano C messages).
* Validity window set late and auto-repaired if encoding drifts.
* HTTP submit fallback to Blockfrost with application/cbor.

### Notes

* Requires Blockfrost key.
* Native script uses after-slot timelock.
* Ships with cardano-c runtime libs under ThirdParty.

### Support

* Docs: <https://docs.fluxpointstudios.com/cardano-ue-sdk>
* Discord: <https://discord.gg/fluxpointstudios>


# Flux Point Staking (Concluded)

The legacy AGENT & SHARDS staking program has concluded. Unstake, claim, and trade eligible legacy assets for cMATRA — the Cardano-side form of MATRA, the network token of the Materios blockchain — be

> **This program has been retired.** The AGENT & SHARDS staking program — including NFT boosts and all revenue-rewards streams — concluded with the launch of the [cMATRA Token Merger](/materios-partner-chain/cmatra-token-merger) on **May 28, 2026**. No new staking rewards accrue. Valid tracked rewards were reconciled and materialized into redeemable units before the redemption window opened (see [FAQ Q22](/materios-partner-chain/faq#22-what-happens-to-legacy-staking-rewards-that-were-tracked-operationally-or-in-dashboards)).

***

## What to do now

If you still have AGENT, SHARDS, or NFTs in a legacy staking position:

1. **Unstake and claim.** Withdraw your staked assets (and any final claimed rewards) through the staking dApp at [fluxpoint.ada-anvil.io](https://fluxpoint.ada-anvil.io/en/) so they return to a wallet you control.
2. **Surrender and redeem.** Trade eligible legacy assets — AGENT, SHARDS, Flux Point Team Pass, SE Brawlers, Brawl Pass: Enter the Dragon, and T1/T2 ADAM Launch Passes — for **cMATRA** at the official portal: [fluxpointstudios.com/matra-merger](https://fluxpointstudios.com/matra-merger).
3. **Don't wait for the deadline.** The redemption window closes **November 28, 2026**, and the on-chain surrender path is permanently disabled after that date. See [Launch Readiness](/materios-partner-chain/launch-readiness) and the [pre-launch checklist](/materios-partner-chain/launch-readiness#pre-launch-checklist-for-holders).

Read the [Legal & Disclaimers](/materios-partner-chain/legal-and-disclaimers) before redeeming.

***

## Going forward: one network token

The era of many assets with bolted-on utility — and of Cardano-side staking programs paying out revenue-rewards — is over. Everything consolidates into **MATRA, the native network token of the** [**Materios blockchain**](/materios-partner-chain/materios), whose utility is the network itself:

* **Delegate to earn block rewards.** Delegate to Cardano SPOs participating in Materios cross-validation, or stake and delegate MATRA to Materios validators as mainnet staking rolls out — the same way ADA holders delegate to Cardano stake pools and earn ADA. Rewards are protocol block rewards for securing the network, not revenue sharing. See [FAQ Q39–39b](/materios-partner-chain/faq#39-how-are-validators-expected-to-be-rewarded).
* **Use the network.** Holding MATRA generates MOTRA, the capacity token that pays Materios transaction fees.
* **Govern the network.** MATRA carries governance weight as the chain decentralizes.

***

*Historical program details (reward buckets, NFT boost percentages, and revenue-rewards allocations) have been removed because they no longer apply; they remain available in the* [*git history*](https://github.com/Flux-Point-Studios/docs) *of this page.*


# PoI Governance (Retired)

> **This page is retired.** PoI governance — $AGENT-weighted voting via Clarity stakes and inference-pool bonds — is discontinued and will not ship. There is no $AGENT-based governance, and no separate PoI DAO, going forward.

$AGENT is being consolidated into **cMATRA** under the [cMATRA Token Merger](/materios-partner-chain/cmatra-token-merger), converging into **MATRA — the native network token of the** [**Materios blockchain**](/materios-partner-chain/materios). Governance of the Materios chain is carried by MATRA as the chain's governance decentralizes (currently a 2-of-3 multisig transitioning per the [Materios overview](/materios-partner-chain/materios#on-chain-pallets)).

The historical mechanics formerly described on this page remain available in the [git history](https://github.com/Flux-Point-Studios/docs/commits/main/poi-governance.md).


