Stellar Stabletrust
Confidential payment infrastructure for Stellar. Encrypt token balances onchain using homomorphic encryption invisible to ledger explorers, accessible only to the owner.
What is Stellar Stabletrust?
Stellar Stabletrust is a confidential payment layer built on top of the Stellar network. It wraps standard Stellar tokens in an encrypted balance system once tokens enter the confidential layer, their amounts are encrypted onchain and opaque to ledger explorers.
Under the hood, Stellar Stabletrust uses twisted ElGamal homomorphic encryption on the Ristretto255 curve and zero-knowledge proofs verified by the Fairblock Network (Fairyring) to enable private transfers without revealing balances or transaction destinations.
The system is composed of two smart contracts and a cross-chain relayer: a Stellar Soroban contract that holds token custody and captures user intent, a Fairyring CosmWasm contract that manages all cryptographic state, and FairyPort a production-grade bidirectional relayer that bridges the two chains.
Developers integrate via the @fairblock/stellar-stabletrust TypeScript SDK, which abstracts all cryptographic operations client-side.
How it works
01
Deposit
Convert public Stellar tokens into encrypted confidential balances. Tokens are held in escrow by the Soroban contract.
02
Transfer
Send privately amounts and destinations stay encrypted. Recipient credit goes into a pending balance awaiting confirmation.
03
Withdraw
Return funds from the confidential layer back to standard Stellar tokens. A ZK range proof ensures the balance stays non-negative.
Key properties
Encrypted onchain
All balances are stored as ElGamal ciphertexts. No amount is ever stored in plaintext on either chain.
ZK-proof verified
Every transfer and withdrawal is accompanied by cryptographic proofs of validity and range checked to prevent under- or over-flows.
Cross-chain integrity
The Stellar contract and Fairyring contract maintain synchronized state via FairyPort with replay protection via monotonic tx_id.
Two-phase finality
Incoming transfers sit in a pending balance until the recipient explicitly calls apply_pending, enabling async settlement.
Client-side decryption
Only the account holder can decrypt their balance. Private keys are never transmitted to any server or relayer.
Homomorphic arithmetic
The Fairyring contract performs additions and subtractions on encrypted ciphertexts without ever seeing plaintext amounts.
Use cases
Private Payroll
Stream salaries on Stellar without exposing compensation data onchain.
Confidential Treasury
DAOs and protocols moving capital privately without revealing positions.
Anonymous Contributions
Token contributions that obscure investor participation from competitors.
AI Agent Payments
Autonomous agents transacting on Stellar without exposing balances or destinations.
Network support
| Network | Type | Environment |
|---|---|---|
| Stellar Testnet | Soroban (user-facing) | Testnet |
| Fairyring Devnet | CosmWasm (cryptographic state) | Testnet |
