Private swap
Trade one asset for another from your private balance.
Open SwapConfidential transfers on Robinhood Chain. The chain shows who sent to whom. The asset and the amount stay encrypted.
These numbers come from Robinhood Chain, chain id 4663. The pool counts are live.
Above this line the chain shows the addresses, the deposits and the withdrawals. Below this line it keeps three things sealed: the asset, the amount and the memo.
Addresses, time and type are public for each transaction. Deposits and withdrawals show the asset and the amount. A private transfer stores only ciphertext.
Reading pool events…
Anyone can read the addresses. Nobody without a key can read the asset, the amount or the memo. Example values
You move a token from your public balance into the pool. The deposit is public. The pool gives you a sealed note.
You send to an address. A Groth16 proof shows that the amounts balance. The asset, the amount and the memo stay encrypted.
You give one person a key for one transaction. That person sees that transfer only.
You move a note back to a public address. The withdrawal is public. Your remaining private balance stays hidden.
Trade one asset for another from your private balance.
Open SwapLock a note for a deal. Release it to the other party, or take a refund after the time limit.
Open EscrowShare a key for a single transaction. The holder sees that transfer and no other.
Open ViewCombine many small notes into one note. The next send is then simple.
Open WalletProofs come from a prover service. The prover receives the witness of each proof, which includes your nullifier secret. It is stateless. You can run the prover binary on your machine instead. Security notes
A TypeScript SDK prepares each call, makes the proof and runs a simulation before it returns. It is a port of Helius Solana Privacy Rings.
import { Rings, PrivateWallet, sendPrepared } from "@rings/sdk"; const rings = new Rings({ chainId: 4663n, pool, publicClient, prover, indexer });const wallet = new PrivateWallet(keys, indexer, rings.assets);await wallet.sync(); // The chain sees from and to. It does not see NVDA or the amount.const call = await rings.prepareTransfer({ keys, wallet, to: "0x19be7c2a40d3f8a1b6e05c9d27f4a8b3c61e02d7", token: NVDA, amount: 2_100_000_000_000_000_000n,});const hash = await sendPrepared(walletClient, call); // Show this one transfer to one person.const key = wallet.exportTxViewingKey(hash);