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
| Property | Default Ring (`ring-default`) | Custom Ring |
|---|---|---|
| Membership | Open (allowlist_enabled: false) | Configurable (allowlist_enabled: true by default) |
| Privacy mode | Confidential (mode = 0) | Confidential (mode = 0) or Anonymous (mode = 1) |
| Auditor key | None (Pubkey::default()) | Optional designated auditor_pubkey |
| Freeze controls | Protocol-level | Ring-level (RingConfig.frozen) and per-member (RingMember.frozen) |
| Liquidity isolation | Shared permissionless vaults | Isolated ShieldedVault PDAs per Ring and mint |
Privacy modes
RingConfig.mode selects between two privacy tiers defined by Solana Privacy Rings:
- 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.
- 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. Onlyauthoritycan callset_ring_member(has_one = authorityenforced 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
RingMemberrecord withallowed == trueandfrozen == false. Unauthorized wallets receiveRING_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 receiveRING_FROZEN(403). - Ring freeze (`RingConfig.frozen`). When a Ring is frozen,
deposit_shielded,withdraw_shielded,place_hidden_order,fill_hidden_order,settle_confidential_swap, andsettle_sealed_rfqall reject on chain withMeraError::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.