• Reading the docs…
Start trading

Concepts

Council

The Council is the committee of nn members that holds the Council key as tt-of-nn threshold shares. It has two duties: it releases the Ledger data key to each enclave the Registry admits, and it runs the Escape, where its members re-encrypt each owner’s last committed balance to that owner’s escape key, with a proof the program checks for every share.

Size and threshold#

Members nn Threshold tt Colluding members who learn nothing Offline members an Escape tolerates
9 5 up to 4 up to 4

The nine members run as nine separate services, each holding its own key share.

These are the mainnet Council’s figures. CouncilConfig has room for nine members, and the program accepts a Council only with 2t>n2t > n. With n=2t−1n = 2t - 1, any two sets of tt members share at least one member, and the key generation below runs in the honest-majority setting in which it is proven secure. Trust lists the live members and their verification keys.

What CouncilConfig holds#

CouncilConfig is the program account that records the Council:

  • The Council key PC=s−1HP_{\mathcal{C}} = s^{-1}H, a twisted ElGamal key on ristretto255. Its secret ss exists only as the members’ shares sjs_j. No party ever holds it whole.
  • One verification key per member, Sj=sjPCS_j = s_j P_{\mathcal{C}}. Every share a member posts is checked against its SjS_j.
  • One signing key per member, the Ed25519 key that signs every message the member posts to the Council’s transcript.
  • The member count nn, the threshold tt and the Council epoch: 0 at installation, one more at each rotation.

Its layout and seeds are in Accounts.

Two things are encrypted under the Council key:

  • The wrapped Ledger data key (below).
  • The Council handle D=rPCD = rP_{\mathcal{C}} that every Ledger leaf carries beside its commitment C=bG+rHC = bG + rH. Together they form a ciphertext of the balance bb that decrypts as C−sD=bGC - sD = bG. The handle is the Escape’s only path to a balance. Trading, Commits and disclosure never use it.

Key generation#

The key comes from distributed key generation by the protocol of Gennaro, Jarecki, Krawczyk and Rabin, run among the members’ nodes:

Step What members do
Deal Each member shares a random secret by Pedersen verifiable secret sharing: it posts hiding commitments and one share pair per member, each sealed with HPKE to that member’s key.
Complain Each member checks every pair addressed to it against the dealer’s commitments and posts a complaint for each failure. A dealer answers by posting that pair in the clear. Dealers with an unanswered or failed complaint drop out, and the rest form the qualified set.
Reveal Each qualified dealer posts Feldman commitments. A share that fails them is posted as proof of the fault, and that dealer’s commitments are rebuilt in public from the members’ shares. The public key is fixed only after the qualified set is, so no member can bias it.
Output ss is the sum of the qualified dealers’ secrets, and each member’s sjs_j is the sum of the shares it received.
Twist Two further sharings, a mask ϰ\varkappa on base HH and a sharing of zero, run once at genesis with all nn members. Each member posts its masked product sjϰj+ojs_j \varkappa_j + o_j with a proof; the nn products interpolate to sϰs\varkappa, which turns ϰH\varkappa H into PC=s−1HP_{\mathcal{C}} = s^{-1}H without revealing ss. Each member then posts SjS_j with a proof that it uses the same sjs_j.

Every message of the run is signed by its member and posted on chain through council_log under the Council’s address, the run’s broadcast channel: the transcript is public and ordered, and each step ends at a slot deadline. A node signs a step only before its deadline and takes as input only what every member posted for the step before. council_log names the Council’s address whether or not CouncilConfig exists there yet, so the whole run is on chain before the Council is installed.

Installation#

Installing the result is a separate instruction, sent once key generation has finished in the transcript. initialize_council, signed by the Pool’s admin, creates CouncilConfig once with Council epoch 0, the Council key PCP_{\mathcal{C}}, the nine verification keys SjS_j in member order, the nine members’ signing keys and t=5t = 5. The program accepts them only with 2t>n2t > n, distinct signing keys and verification keys that form one tt-of-nn sharing of HH (A check from the account alone).

The installed values are the transcript’s output: each member’s installed message states the Council as that member computed it, and anyone can recompute the Council key and every verification key from the transcript itself and compare them with the account (Checking the key generation transcript).

Rotation#

rotate_council installs a new sharing of the Council secret, with its members’ verification and signing keys, under the same Council key. The program accepts a rotation only if:

  • it is signed by at least tt of the current members’ signing keys, each a signer of the transaction; neither the admin nor the upgrade authority takes part;
  • no Escape has been triggered (otherwise it fails with EscapeActive), so every Escape share is checked against the Council the Escape recorded;
  • the new Council epoch is the current one plus one, and the Council key is the current PCP_{\mathcal{C}};
  • the new verification keys, signing keys, nn and tt pass the checks of installation: up to nine members, 2t>n2t > n, distinct signing keys and one tt-of-nn sharing of HH.

The Council key is unchanged and the new verification keys interpolate to H=sPCH = sP_{\mathcal{C}} again, so the new shares are shares of the same secret ss (Section 6.6). Every leaf’s Council handle and the wrapped Ledger data key stay valid with nothing re-encrypted. Each rotation’s keys are in its instruction data, so the Council’s whole history reads back from the chain (Checking a rotation).

The Ledger data key#

The Ledger data key kLk_L decrypts every trader record and the enclave ciphertext of every leaf (Ledger). Outside an enclave it exists only wrapped under the Council key: a handle c1=rPCc_1 = rP_{\mathcal{C}}, and kLk_L sealed with AES-256-GCM under SHA256(c1c_1 ‖ rHrH), bound to the program, the Council epoch it was made under and PCP_{\mathcal{C}}.

  • Wrap. The first admitted enclave generates kLk_L before the first Commit and posts the wrapper through council_log, signed with its Registry signing key. It is the Pool’s one wrapper: readers accept the first valid wrapper on chain and no different one after it.
  • Release. An enclave asks the members for kLk_L under its EnclaveKey record, with a fresh challenge. Each member checks on chain that the record is admitted, that the Registry holds its keys as an admitted key whose interval contains the current slot, and that the wrapper is the one anchored. It then re-encrypts c1c_1 toward the record’s YEY_E, with the proof an Escape share carries, and posts the share to the transcript.
  • Open. The enclave verifies each share against its member’s SjS_j, combines tt of them into (A,B)(A, B), and computes B−yEA=sc1=rHB - y_E A = s c_1 = rH, which opens the wrapper. Each new key epoch’s key receives the same kLk_L the same way.

YEY_E is the key the enclave’s attestation bound (Attestation), so kLk_L reaches only code whose measurement the Registry admitted.

What the Council does#

The Council’s only operation is re-encryption, toward a key the chain has verified: the data key toward an admitted enclave, and in the Escape a leaf’s handle DD toward an owner’s escape key YuY_u, so the balance never appears in plaintext on chain. For the Escape, with a fresh random κj\kappa_j, member jj posts

math
Aj=κjG,Bj=sjD+κjYuA_j = \kappa_j G, \qquad B_j = s_j D + \kappa_j Y_u

with a proof that AjA_j and BjB_j are formed this way from the share behind its registered SjS_j. The program checks each proof in escape_share and rejects an invalid share on its own, so every other member’s share still counts. At the tt-th valid share it combines them by Lagrange interpolation into one pair (A,B)(A, B), from which only the holder of yuy_u recovers bGbG.

Each member’s node watches for open EscapeRequest accounts and posts its share to each in an escape_share transaction of its own. Escape gives the whole sequence, from trigger_escape to the payout.

What no set of members can do#

Guarantee Holds against Rests on
Learn ss or any balance any t−1t - 1 members perfect secrecy of Shamir sharing, hiding of Pedersen commitments, DDH in ristretto255
Pay an Escape to anyone but the owner, pay more than the committed balance, or pay a leaf twice all nn members the Merkle path to the frozen root, soundness of the share and claim proofs, Commit authenticity
Sign a Commit or move a vault token outside the Escape all nn members the program, which accepts Commits only under an enclave key the Registry admitted

Corrupt members choose their masks κj\kappa_j but not their shares sjs_j, so a combined pair always decrypts, for the owner, to the leaf’s committed balance. The owner’s claim proof then binds the payout to a destination only the owner chose. Completing the Escape for every owner rests on tt members landing their share transactions on chain.