# Federation: a verdict co-signed by independent operators

A Mirror verdict used to carry the authority of one operator's key. "Why should I trust that operator?" had one honest
answer: you do not have to, if several independent operators reach the same verdict and sign it themselves.

A federation is that set of operators. A corridor names its operators, and a verdict is co-signed only when k of them
signed the identical record.

## Why it can work here

The reconciliation is deterministic. Given the same committed legs, every honest operator produces the byte-identical
record: there is no clock, no randomness and no hidden state in it. So honest operators must agree, and a disagreement
is not noise to average away. It is a finding. Determinism is what turns "trust one operator" into "check that several
agree".

## The rules

- **k is at least 2, and at most the number of operators listed.** One operator's word is not a co-signature.
- **Operators are distinct keys and distinct organisations.** Two keys held by one organisation are one operator, and
  the federation refuses to list them. A federation of one company is one company.
- **A kid is derived from its public key, never trusted.** A federation cannot name one key and sign with another.
- **A signature counts only if** it verifies over the record, under a key the federation lists, and the proof names that
  key. A record for another shipment counts for nothing.
- **One operator counts once,** however many answers it gives.
- **Dissent blocks.** Two different records for the same shipment, from any operators, mean nothing is co-signed, even if
  k of them agree.
- **An operator that does not answer is not a vote.** k agreeing operators are enough. An operator that answers with a
  different federation for the corridor, or shows no corridor at all, is a disagreement, and it blocks the co-sign.
- **The federation is ratified with the corridor.** The members vote on the operator list as they vote on the table.
  No operator can add itself, and no bank can pick a friendly operator for one trade.

## Who runs it, and what the operators learn

Each operator receives the same committed legs that a single operator would receive. The federation adds trust, not
disclosure: no operator sees a value, a band, a price or a counterparty. The bank's client sends the legs to each
operator, collects the signed answers and hands them to the federation. The client is `server/federate.js`, and it
holds no key of its own.

## What a co-signed verdict is, and is not

It is a record that k independent operators, each listed by the members, signed identically. Anyone can check it offline
from the artifact and the federation alone (`verifyFederated`): no network, no database, no trust in the bank that
presents it.

Checking a co-signed verdict in a browser is **not available yet**: the federation derives each operator's key id with a synchronous SHA-256, which the browser kit (WebCrypto only) does not provide. It runs in Node, which is where the bank's client and any examiner's script run.

It is **not** threshold ECDSA, and it is not secure multi-party computation. Each operator holds its own key and signs on
its own. The federation removes the single-operator trust assumption; it does not make the operators one.

A co-signed **clear** still rests on the independence gate. Two banks agreeing is still undetermined on every operator,
federation or not. The federation never changes what a clear asserts.

## What is still needed

The software is built and tested with three operators in one process. A federation is only as independent as the
organisations that run it, and that is an outside matter:

- at least two more operators run by organisations that are not Mirror and not each other, on separate infrastructure;
- the members ratify the operator list, with their names on the signed record;
- and, for a clear, the independence gate still needs a witness.

Until those exist, no corridor should name a federation at all. A list of operators that Mirror runs is one operator, however many keys it holds, and listing them as independent would be the claim the rules exist to prevent.
