Example applications built with Arcium, the encrypted compute network on Solana. Each example computes on encrypted data using multi-party computation (MPC): confidential inputs stay encrypted end to end, and no compute node sees them in plaintext.
The examples share the same computation lifecycle:
- The client submits plaintext or locally encrypted inputs. Confidential client
inputs use x25519 key exchange and
RescueCipher. - The Anchor program queues a computation with the Arcium program.
- An MPC cluster executes the encrypted instruction defined in
encrypted-ixs/. - The result returns on-chain via a callback instruction, which stores or reveals it.
Data stays private as long as one node in the cluster is honest; the protocol tolerates a dishonest majority. See Core Concepts and Computation Lifecycle for the full picture.
Recommended path: work through them in order. Each introduces one new pattern.
| Example | Pattern | Encrypted on-chain state | Main concept |
|---|---|---|---|
| Coinflip | Trustless randomness | No | ArcisRNG, revealing results |
| Rock Paper Scissors | Hidden moves | Yes (vs player), No (vs house) | Enc<Shared, T> inputs, RNG opponent |
| Voting | Private aggregation | Yes | Enc<Mxe, T> accumulators, callbacks |
| Medical Records | Controlled sharing | Yes | Re-encryption to a new owner |
| Sealed-Bid Auction | Encrypted comparison | Yes | First-price and Vickrey clearing prices |
| Blackjack | Hidden game state | Yes | Pack<T> storage efficiency |
| Ed25519 Signatures | Distributed signing | No | Keys that never exist in one place |
Prerequisites: the Arcium CLI,
which requires Rust, the Solana CLI, Anchor, and Docker. Toolchain versions are
pinned per example in Cargo.toml and rust-toolchain.toml.
Every example builds and tests the same way:
cd voting # or any example
yarn install
arcium build # compiles the encrypted circuit and the Anchor program
arcium test # runs the tests against a local Arcium clusterEach example has the same layout:
encrypted-ixs/ # Arcis circuit: the code that runs inside MPC
programs/ # Anchor program: queues computations, handles callbacks
tests/ # TypeScript tests: encryption happens client-side here
arcium testhangs at keygen after a version bump: stale localnet cache. Removeartifacts/localnet/mxe_utility_pubkeys.binandartifacts/localnet/private_shares_node_*, then rerun.- Computation stuck in
queued: the local cluster did not finalize; rerun the test. Persistent failures usually mean the circuit and program are out of sync: runarcium buildagain. AbortedComputationin a callback: the MPC output failed verification. Check that the argument order in the queue call matches the circuit signature exactly.
Mental Model · Arcis reference · Best Practices · Discord
These examples are for learning. They are not audited and cut corners a production deployment must not; see each example's Limitations section.