For solvers
Quote from your own inventory, keep the spread
Market makers, desks, bots and agents answer Midnight swap requests with signed, binding quotes. Fondaco runs the venue and the rules; the solver SDK does the Midnight-specific work. You bring pricing, inventory and strategy.
The economics
The spread is yours
- Your spread against the reference price is your revenue. Fondaco takes none of it.
- The protocol fee (4 bps) is an output in your leg, in the pair's shielded token. On a buy it comes out of the USDM the user gives; on a sell you pay it on top of what the user receives. The relay will not pass on a fill without it.
- The app fee belongs to the wallet or app that brought the trade; it is also an output in your leg, declared in your quote.
- The network fee is DUST, paid by whoever completes and submits — you, on the offer-file path, or when you sponsor a wallet's balance.
Free, and not
Joining is free, as are the relay, the SDK, the mock relay and the reputation record. Paid services are planned — hosted GPU proving, priority relay access, inventory and DUST tooling, data feeds — and none is built yet.
The first cohort
Fee holidays and reputation seniority for the first solvers admitted.
Illustrative size and spread; the protocol fee is the configured value
One fill, worked
| A user buys NIGHT with | 1,000.00 USDM |
| Your spread against the reference price, 15 bps | 1.50 USDM |
| Protocol fee output in your leg, 4 bps, from the user's USDM | 0.40 USDM |
| App fee output for the front-end, 12 bps, from the user's USDM | 1.20 USDM |
| Your network fee, if you complete and submit | DUST, see below |
Measured: a fill is about ≈ 29 KB and ≈ 2.8 DUST at a blank ledger's prices (devnet, real proofs, 28 Oct 2026, the previous ledger release); Preprod prices operations 2–3× higher, and a wallet there paid 0.72–0.95 DUST to balance a leg. Mainnet figures replace these after launch.
The programme rules
Bonded, admitted, ranked in public
Verbatim from the programme document. The numbers are relay configuration; the relay serves the values in force at GET /api/v2/programme/rules, and every change writes an audit row.
Joining
| Step | What happens | Where it is enforced |
|---|---|---|
| KYB | The operating entity is recorded: legal name, jurisdiction, registration number, evidence references. Its legal name is screened against the sanctions list. Approval requires a clear result. | Programme.upsert_entity/2 and screen_entity/2; audit kinds kyb.record and kyb.screening |
| Registration | The solver gets an id, a kind (rfq, ladder or matcher), one or more secp256k1 signing keys bound to the entity, and a bearer token (stored only as its hash). It starts in dry run. | POST /api/v2/admin/solvers; audit kind solver.registered |
| Bond | USDM deposited to the published escrow is recorded as a ledger entry against the solver. | POST /api/v2/admin/solvers/:id/bond; table bond_entries |
| Dry run | The solver receives live request flow. Its quotes are signature-checked and recorded, never shown to users, and never win. The relay notes when a dry-run quote would have won (would_win). | SiRelay.Routing.Request (dryRun: true on each request) |
| Admission | The gate checks KYB approved, bond ≥ minimum, dry run ≥ 48 h, ≥ 50 dry-run quotes with p95 response ≤ 300 ms, and no bad signatures. Ladder solvers and the matcher are checked on duration and signatures only. | GET /api/v2/admin/solvers/:id/gate, then POST …/admit; audit kind solver.admitted |
On the devnet the stack shortens the dry run to 20 s and 5 quotes (DRY_RUN_MIN_MS,
DRY_RUN_MIN_QUOTES). The mainnet defaults are the numbers above.
Rules
| Rule | Value | Notes |
|---|---|---|
| Identity | KYB of the operating entity; signing keys bound to it, unique across solvers | A key can be revoked; quotes signed by a revoked key are refused. A solver's keys are published at /api/v2/solvers/:id |
| Bond | Minimum 10,000 USDM | Staked NIGHT accepted once staking exists |
| Limits | Largest single quote: 50% of the bond. Open, accepted-but-unsettled notional: 100% of the bond. | A request above a solver's quote limit is not sent to it. The open-notional check is re-done inside the reservation transaction. |
| Quote binding | A firm quote binds until its expiresAt, which must be at least the request's minDeadlineMs (60 s by default) after issue | The signature covers the network, the relay, the request, the size, both tokens with their kinds, the settlement, the fee declaration and the app (the MIP draft, §6) |
| Fee declaration | Each quote declares {token, protocolBps, appBps}. It must equal the request's fees, or the quote is refused. | Fees are paid in a shielded token of the pair (USDM when the pair has it), as shielded outputs with disclosed openings; a pair with no shielded token carries no fees |
| Fade | An accepted quote that is not delivered: no leg before the make timeout, a leg that fails verification, a job not claimed or not submitted before its deadline, or a failed job attributable to the solver | Penalty: 50 bps of the notional, minimum 5 USDM, capped at 500 USDM, debited from the bond |
| Fee breach | A submitted transaction that does not carry the declared fee outputs, or does not contain the user's offer | Penalty at the cap, plus immediate suspension |
| Suspension | Fulfilment (completed ÷ (completed + fades + breaches)) below 95% over 7 days, with at least 20 outcomes | Reinstatement is an operator decision, recorded in the audit trail |
| Appeals | Any penalty can be appealed. A reversed decision credits the amount back to the bond; upheld keeps it. | POST /api/v2/admin/penalties/:id/appeal and …/decide; audit kinds penalty.* |
| Ladders | Indicative only. A ladder solver that misses a job is recorded (ladder_miss) but not penalised. | Ladders are signed, bound to this relay and network (the MIP draft, §7), and replaced by sequence number; a quote derived from one is marked indicative |
| Quote budget | 600 quote frames per second per solver; one quote per solver per request (duplicates refused) | Quote-stuffing defence; message budget 2,000 frames/s per connection |
| Kill switch | The operator can pause any solver: no requests, no ladder quotes, no accepts | POST /api/v2/admin/kill-switch {solverId, paused} |
Reputation and ranking
The public record at GET /api/v2/solvers and /api/v2/solvers/:id comes from the
append-only solver_events ledger. The operator's own solver and matcher appear on the same
page, marked as the operator's. Over 30 days it shows:
- quotes and dry-run quotes;
- requests won, quotes accepted, fills completed;
- fades, breaches and ladder misses;
- 7-day fulfilment;
- median and p95 response time, and median time to fill;
- settled volume in USDM;
- 7-day uptime (from connection sessions);
- seniority since admission;
- the current bond and the most recent penalties with their status.
Ties between equal net outputs go first to the matcher (crossing users needs no inventory), then to the higher reputation score (7-day completions less fades and breaches), then to the earlier quote.
The operator's own solver
maker-1 and the matcher run on the public SDK with their own keys and tokens and their
own processes, under the same rules. The relay gives them no data a third party could not
have. The reference price is the relay's public feed (/api/v2/network). The matcher is
exempt from the bond, because it never quotes on its own inventory; its fades are still
recorded. Our solver sunsets once at least 3 external solvers fill 60% of volume for 2
months.
Services
Joining is free. Paid tiers, none of which is built yet: hosted GPU proving, priority relay access, inventory and DUST tooling, data feeds.
Rendered from docs/solver-programme.md, last changed 10 November 2026.
The solver SDK
What it does, what you bring
The SDK does
- The relay connection, signed quotes and ladders, the job runner.
- Offers and legs: building your leg with its fee outputs and their openings, proving, merging with a user's offer.
- DUST: registration, paying, sponsoring a wallet's balance.
- Reservations and inventory locks, so one lot is never promised twice.
- The exit policy for the sell side.
You bring
- Inventory: NIGHT, USDM, the shielded tokens you quote.
- Pricing: your reference prices, your spreads, your hedges.
- Strategy: which pairs, which sizes, when to stand aside.
Pricing can be a webhook, so a bot in any language works; the SDK handles everything Midnight-specific around it. It never signs above a bound you set from the reference price and your inventory, so a webhook bug cannot overpay.
# Your pricer, in any language. The SDK posts each request (250 ms to answer by default):
POST /price { "requestId": "…", "pair": { "give": …, "want": … }, "giveAmount": "…",
"minWantAmount": "…", "feeDecl": { … }, "notional": "…", "settlements": [ … ] }
→ { "wantAmount": "…" } # the SDK signs a firm quote at this price
→ { "decline": true } # no quote Run it now
From a mock relay to Preprod
The mock relay speaks the real solver protocol in process, generates request flow, checks every quote as the relay does and reports what the admission gate would see. The dry run's duration is the one check it cannot simulate; it says so.
Not live yet. The si-solver command and its mock relay are the next solver SDK release (docs/devex.md §3). Until they ship, a solver runs against the local devnet stack.
npx si-solver dev # an inventory solver against the mock relay, stub pricer
npx si-solver dev --webhook http://localhost:8080/price # price through your own endpoint
npx si-solver gate-check # replays 50 requests, prints the admission checks
npx si-solver keys # a signing key and the registration payload - Mock relay —
npx si-solver dev; nothing else to install. - Local devnet — the whole stack on your machine with
scripts/stack.sh(Elixir, Rust, NATS, Postgres, a proof server) and one-second blocks. How to run it. - Preprod — with a token from us, against the hosted Preprod relay.
- Mainnet — after the dry run on live flow and admission.
Who we want first
The first cohort
- Desks already solving on CoW, 1inch or NEAR Intents.
- Genius Yield smart-order-router operators.
- Nightmode operators.
- Agent builders: anything that holds keys and answers a quote request.
Fondaco runs a solver of its own only to start the market, under the same rules and on the public SDK, with no data a third party could not have. It winds down once 3 external solvers fill 60 of volume for 2 months.
The sell side
The exit policy, stated plainly
NIGHT cannot leave Midnight through Fondaco: there is no NIGHT → cNIGHT exit to Cardano. Every sale of NIGHT for USDM leaves the NIGHT on Midnight with the solver that bought it, so the sell side is the hard side. Fondaco's own solver buys under a published policy — a bid ladder below the reference price by size, a daily budget, and a discount that widens as its NIGHT inventory grows. The live version is served at GET /api/v2/exit-policy; these are its devnet values, and mainnet values are set at launch.
Terms
| Term | Value |
|---|---|
| Bid ladder: discount below the reference mid, by sale size | ≤ 1,000 NIGHT: 30 bps; ≤ 5,000 NIGHT: 50 bps; ≤ 20,000 NIGHT: 90 bps; above that, no bid |
| Fees | Protocol (4 bps) and app fee on the USDM paid out, paid by us on top of what the user receives |
| Daily exit budget | 2,000 USDM paid out per UTC day |
| Largest single exit | 250 USDM (our quote cap) |
Bands
| Signal | Threshold | Action |
|---|---|---|
| Midnight-side NIGHT above target | > 60% of inventory value | The discount widens by 20 bps per started 10 points above target. We also recommend diverting the surplus to DUST-capacity sales and hedging part of it on a perp. |
| Midnight-side NIGHT at cap | 2,000,000 NIGHT | NIGHT → USDM closes (requests get no quote) |
| USDM float below floor | < 3 days of average daily exit | The discount widens by 25 bps and an alert says to bridge USDM in via VIA |
| Daily exit budget used | 2,000 USDM | Exits stop until 00:00 UTC |
| Hedge | Above the NIGHT target | Recommended perp hedge: 50% of the excess NIGHT value, with a margin buffer sized for a 3× move. This is a recommendation only: nothing trades on a CEX from this code. |
What is not offered
NIGHT → cNIGHT (a same-asset exit to Cardano) needs the Cardano reserve and the HTLC legs, which are not built; it is listed as not offered in the publication.
Rendered from docs/exit-policy.md, last changed 10 November 2026.
Apply
A short form: your entity, what you solve on today, the inventory and pairs you expect. No documents at this stage; identity checks follow a conversation.