Mera
ExecutionInstant confidential swapsClear from encrypted balances in one 150ms slot.Hidden-size limit ordersLock encrypted size in a private escrow PDA.Sealed RFQ block tradesRequest signed quotes without leaking size.
Vault & AuditShielded vault & keysDeposit SOL, SPL, or Token-2022 into a Ring.Viewing key verifierDecrypt and prove a single settled fill.
Docs/Concepts
2 min read

Custom Rings & Compliance

Permissionless Default Ring versus institutional Custom Rings, Confidential and Anonymous modes, allowlists, freezes, and auditor keys.

A Ring is an isolated shielded execution domain on mera_core with its own ShieldedVault PDAs, commitment root, settlement counter, and compliance policy. Every wallet can trade in the permissionless Default Ring, while funds, treasuries, and regulated venues can deploy dedicated Custom Rings with their own membership rules and auditor key.

Default Ring vs Custom Rings

PropertyDefault Ring (`ring-default`)Custom Ring
MembershipOpen (allowlist_enabled: false)Configurable (allowlist_enabled: true by default)
Privacy modeConfidential (mode = 0)Confidential (mode = 0) or Anonymous (mode = 1)
Auditor keyNone (Pubkey::default())Optional designated auditor_pubkey
Freeze controlsProtocol-levelRing-level (RingConfig.frozen) and per-member (RingMember.frozen)
Liquidity isolationShared permissionless vaultsIsolated ShieldedVault PDAs per Ring and mint

Privacy modes

RingConfig.mode selects between two privacy tiers defined by Solana Privacy Rings:

  1. Confidential (`mode = 0`, API value `"confidential"`). Encrypts assets, order sizes, and shielded balances on Solana L1 while keeping wallet participation compatible with standard account inspection.
  2. Anonymous (`mode = 1`, API value `"anonymous"`). Encrypts counterparties, assets, and balances on Solana L1 under the Ring's compliance policy, paired with allowlists, freeze controls, and an auditor key.

On-chain compliance controls

Each Custom Ring stores its policy directly in its RingConfig PDA (["ring", SHA-256(ring_id)]) and per-wallet permissions in RingMember PDAs (["ring_member", ring_pubkey, member_wallet]):

  • Authority (`authority`). The wallet that signed create_ring. Only authority can call set_ring_member (has_one = authority enforced on chain). The Ring authority always has access to its own Ring.
  • Allowlist (`allowlist_enabled`). When enabled, the API and relay verify that any non-authority wallet attempting to deposit, withdraw, quote, place orders, or settle has a RingMember record with allowed == true and frozen == false. Unauthorized wallets receive RING_ACCESS_DENIED (403).
  • Member freeze (`RingMember.frozen`). The Ring authority can freeze or unfreeze an individual member wallet at any time via set_ring_member. Frozen wallets receive RING_FROZEN (403).
  • Ring freeze (`RingConfig.frozen`). When a Ring is frozen, deposit_shielded, withdraw_shielded, place_hidden_order, fill_hidden_order, settle_confidential_swap, and settle_sealed_rfq all reject on chain with MeraError::RingFrozen (6004).
  • Auditor key (`auditor_pubkey`). Stores the designated compliance or audit public key for the Ring so institutional desks can bind Ring-level audit workflows alongside per-trade Transaction Viewing Keys.

Active Ring switching

Shielded balances and open hidden orders are scoped per Ring. In /rings, clicking Set Active Ring switches the active Ring context across /trade and /balance. In @mera/sdk and the REST API, pass ringId explicitly on every balance, deposit, withdraw, swap, order, and RFQ request.

Cross-ring federation (roadmap)

In this build, trades settle between counterparties inside the same Ring. Build 4 on Mera's roadmap adds cross-ring settlement instructions and policy-matching in the RFQ relay so two separate Custom Rings can clear sealed block trades against each other without merging allowlists or sharing full ring state.