What is Cashu?
Cashu is an open-source ecash protocol that enables instant, private, and near-zero-fee Bitcoin transactions. Sovran implements the Cashu protocol through thecoco-cashu-core library, providing a production-ready ecash wallet.
Ecash Fundamentals
Tokens & Proofs
Ecash in Sovran consists of proofs - cryptographic tokens that represent satoshis. These proofs:- Are bearer instruments (whoever holds them can spend them)
- Can be combined and split freely
- Are issued and redeemed by mints
- Can be transferred offline via QR codes, NFC, or text
Mints
Mints are servers that:- Issue ecash - Create proofs backed by Lightning payments
- Redeem ecash - Convert proofs back to Lightning
- Swap ecash - Exchange proofs without revealing amounts
Multi-Mint Architecture
Sovran supports multiple mints simultaneously, managed throughcoco-cashu-react:
Balance Distribution
Sovran includes a balance distribution system that automatically spreads incoming funds across your mints based on configurable percentages:- Set distribution per currency unit (SAT, USD, EUR, etc.)
- Configure using basis points (10,000 bp = 100%)
- Automatic rebalancing when receiving payments
Protocol Operations
Mint (Lightning → Ecash)
- Request Lightning invoice from mint
- Pay invoice with external wallet
- Mint issues ecash proofs
- Proofs stored locally in SQLite
Melt (Ecash → Lightning)
- Provide Lightning invoice to pay
- Mint creates melt quote with fees
- Submit proofs to mint
- Mint pays Lightning invoice
- Spent proofs removed from local storage
Send/Receive
Sending:- Select amount and mint
- Create token from available proofs
- Token encoded as
cashuA...string - Share via QR, NFC, or Nostr DM
- Scan or paste token
- Verify mint is trusted (or add it)
- Redeem proofs with mint
- New proofs stored locally
Payment Requests (NUT-18)
Sovran implements NUT-18 for requesting payments with optional constraints:Transport Types
- Nostr - Send ecash via Nostr DM (recommended)
- POST - HTTP callback URL
- WebSocket - Real-time delivery
Security Model
Privacy
- Blind signatures - Mints cannot link spending to receiving
- No on-chain footprint - Ecash transfers are off-chain
- Nostr integration - Optional identity layer
Trust Assumptions
Mitigation strategies:- Use multiple mints
- Check mint audits
- Monitor community ratings
- Keep small balances
- Use established mints with reputation
Storage & Recovery
Local Database
Proofs are stored in SQLite viacoco-cashu-expo-sqlite:
- One database per Nostr profile
- Encrypted device storage
- Automatic proof state management (pending, spent, reserved)
Backup
Sovran uses NIP-04 encrypted events to backup:- Mint list
- Preferences
- Transaction history metadata
Recovery
To restore funds after device loss:Supported NUTs (Standards)
Sovran implements these Cashu protocol standards:- NUT-00 - Base protocol (mint, melt, swap)
- NUT-01 - Mint information
- NUT-02 - Keysets
- NUT-03 - Request minting
- NUT-04 - Minting tokens
- NUT-05 - Melting tokens
- NUT-06 - Splitting tokens
- NUT-07 - Token state check
- NUT-08 - Overpaid fees
- NUT-09 - Restore
- NUT-10 - Spending conditions
- NUT-11 - Pay to Public Key (P2PK)
- NUT-12 - DLEQ proofs
- NUT-18 - Payment requests
Developer Resources
Key Modules
Helper Functions
Next Steps
Mint Management
Add, remove, and manage your mints
Know Your Mint
Audit mints and check community ratings
Mint Swapping
Move ecash between mints via Lightning
Wallet Rebalancing
Automatically distribute balance across mints