agorix
AirdropMarketsCollectionsLeaderboardActivity
Agorix · Decentralized Marketplace
Independent · Resilient · Community-Run

A cross-chain marketplace, run by the community.

Discover, list, and trade across Bitcoin, Ethereum, and Solana on an open, community-run network.

Marketplace
CollectionsMarketsLeaderboardActivity
Network
GovernanceExplorerAirdropDocs
Account
ProfileSettings
Legal
Terms of ServicePrivacy PolicyYour Privacy Choices
agorix.io — Lasting Access
CID: 0xA60R1X · v0.1
AirdropMarketsCollections
D
Protocol Docs
GovernanceToken EconomicsMPC TreasuryMisbehavior StrikesDelegation SystemBurn Voting
Docs/Governance & Economics/MPC Treasury
Governance & Economics

MPC Treasury

Threshold wallet where the private key is split across ALL nodes. Three ceremony types, two wallet tiers, multi-chain support, emergency reshare, and epoch batching.

#MPC Treasury

The MPC (Multi-Party Computation) Treasury is a threshold wallet where the private key is split across ALL network nodes. No single node -- not even the foundation -- can spend treasury funds alone. There is no hot wallet to hack.

#Core Principle

The private key is NEVER reconstructed. Not during key generation. Not during reshare. Not during signing. Each node holds a key share and produces a partial signature. Partial signatures are combined to create a valid on-chain signature without ever assembling the complete key. The full private key literally never exists in one place.

#Three Ceremony Types

#1. DKG (Distributed Key Generation)

Runs once per asset to bootstrap a new key pair.

StageWhat Happens
PREPARECoordinator broadcasts ceremony parameters, participants acknowledge
COMMITMENTEach node generates a random polynomial and broadcasts commitments
SHARE_EXCHANGENodes exchange encrypted key shares via pairwise channels
VERIFICATIONEach node verifies received shares against commitments
FINALIZEDPublic key derived, key shares stored locally, wallet address usable

All nodes participate simultaneously. Each receives a unique key share. The public key (wallet address) is immediately usable for receiving funds. The private key exists only as distributed shares that never leave their respective nodes.

#2. RESHARE

Runs automatically when node membership changes (join or leave events).

StageWhat Happens
PREPARECoordinator identifies old and new participant sets
COMMITMENTOld shareholders commit to re-sharing their existing shares
SHARE_EXCHANGEOld shares are redistributed to include new nodes
VERIFICATIONNew shareholders verify they received valid shares
FINALIZEDNew share set active, old shares from departed nodes invalidated

The public key stays the same, so no fund migration is needed. This is triggered automatically when autoReshareOnMembershipChange is enabled (default: true).

#3. SIGN

Runs for each treasury transaction requiring an on-chain signature.

StageWhat Happens
PREPARECoordinator broadcasts the transaction to sign
NONCE_COMMITEach signer commits to a random nonce
NONCE_REVEALNonces are revealed and aggregated
PARTIAL_SIGNEach signer produces a partial signature using their key share
FINALIZEDPartial signatures combined into a valid ECDSA or Ed25519 signature

The resulting signature is indistinguishable from a normal single-key signature. No one can tell it was produced by an MPC ceremony.

#Two Wallet Tiers

Treasury Wallet (67%+ threshold):

  • Threshold: 6667 bps -- the standard BFT threshold (survives up to 33% node loss)
  • Requires governance-voted spending proposals
  • Used for: foundation operations, grants, strategic investments
  • Minimum 3 signers required regardless of percentage

Rewards Wallet (67%+ threshold):

  • Same BFT threshold as treasury for consistent security
  • Used for: claim payouts, batch distributions
  • Weekly epoch frequency for batch signing
  • Consistent threshold prevents lower-bar attack surface

Both wallets require the same 67%+ BFT threshold, ensuring a uniform security model across all MPC operations.

#Multi-Chain Keys

The MPC system maintains separate key pairs per chain:

ChainAlgorithmUsage
SOLEd25519SPL token operations, reward distributions
ETHsecp256k1ERC-20 distributions, staking contract
BTCsecp256k1Bitcoin treasury holdings
BTC_ORDINALSsecp256k1Ordinal-specific operations

Each chain gets its own DKG ceremony and independent key shares. A compromise of one chain's shares does not affect other chains.

#Emergency Reshare

When network health degrades, the system triggers an immediate reshare without waiting for the standard grace period:

  • Trigger: More than 15% of shareholders go offline (emergencyReshareHealthBps = 8500, meaning health drops below 85%)
  • Grace period: Standard reshare waits 5 minutes (reshareGracePeriodMinutes); emergency reshare fires immediately
  • Detection: Heartbeat staleness checked every 120 seconds (heartbeatStalenessSecs)
  • Sweep loop: Runs every 15 seconds when degraded, every 30 seconds when stable
  • Ceremony healer: Separate loop running every 20 seconds to detect and recover stalled ceremonies (up to 5 retry attempts)
  • Stale share refresh: Shares older than 168 hours (7 days) trigger proactive reshare via maxStaleShareSetHours

The emergency reshare action type is EMERGENCY_RESHARE_INITIATED, broadcast as a protocol event.

#Epoch System

Payouts are batched into epochs to minimize ceremony overhead:

text
OPEN  -->  CLOSING  -->  FUNDING  -->  SIGNING  -->  BROADCASTING  -->  CONFIRMED
                                                                    -->  FAILED
StageWhat Happens
OPENClaims accumulate as PENDING entitlements
CLOSINGEpoch cutoff reached, no new claims accepted
FUNDINGVerify treasury has sufficient balance for all claims
SIGNINGMPC SIGN ceremony produces batch transaction signature
BROADCASTINGSigned transaction submitted to the blockchain
CONFIRMEDOn-chain confirmation received, claims marked SIGNED
FAILEDTransaction failed, claims returned to next epoch

Default epoch frequency: 168 hours (weekly), governance-configurable. Each ceremony stage has a 30-second timeout (ceremonyStageTimeoutMs).

#Spend Proposals

Any staked node can propose a treasury spend:

  • PROPOSED: Node submits a spend proposal with amount, recipient, and justification
  • VOTING: All staked nodes vote. Required approvals: ceil(N * thresholdBps / 10000) where N is total staked nodes
  • APPROVED: Quorum achieved after the 7-day voting period
  • EXECUTING: MPC SIGN ceremony generates the transaction signature
  • EXECUTED: Combined signature submitted on-chain, funds transferred

Governance-approved spends are flagged in the foundation audit system so they do not trigger withdrawal warnings.

#Production Activation

In production, the foundation master node (Node-1) manually activates the initial MPC DKG ceremony:

  • The mpcTreasury.enabled flag starts as true but autoInitiateCeremony is false
  • Node-1 triggers DKG once the network has sufficient node count and stake distribution
  • This prevents premature key generation when a small group could control the treasury
  • The dev cluster auto-triggers DKG for convenience via instrumentation.ts
  • Automatic ceremonies kick in only after decentralization milestones are reached

#Security Properties

  • No hot wallet. No single point of key compromise exists anywhere in the system.
  • BFT threshold. Up to 33% of nodes can be compromised without risk (67% threshold).
  • Key rotation. Every reshare effectively rotates key material, invalidating old shares.
  • Full transparency. All ceremony events are public protocol events visible in the explorer.
  • Self-healing. The ceremony healer automatically recovers from failed rounds with retry logic.
  • Multi-chain isolation. Compromise of one chain's key shares does not affect other chains.
PreviousToken EconomicsNext Misbehavior Strikes

On this page

  • MPC Treasury
  • Core Principle
  • Three Ceremony Types
  • 1. DKG (Distributed Key Generation)
  • 2. RESHARE
  • 3. SIGN
  • Two Wallet Tiers
  • Multi-Chain Keys
  • Emergency Reshare
  • Epoch System
  • Spend Proposals
  • Production Activation
  • Security Properties