Skip to content
Open app ↗

GuidesChain

Build on Prilius Chain

Deploy your own Solana program on Prilius Chain, and use its anonymous ring from your app.

Prilius Chain runs the Solana runtime with the Helius Privacy Rings stack: the ring program, an anonymous ring, Photon, the Ring RPC and a prover. Our launchpad is the first app on it. Yours can be next: any Solana program deploys here as it would on Solana, and your app can fund one-time addresses from the anonymous ring, like the launchpad’s stealth trades do.

JSON-RPC https://rpc.prilius.xyz (the standard Solana methods, rate-limited per IP)
Websocket wss://rpc.prilius.xyz (same host and port as the RPC)
Ring RPC, ring indexer, prover https://rpc.prilius.xyz/ring, /indexer, /prover
Anonymous ring 3TkRY4nFrA8BrQddTbM9K5RXm6grPenxzmjdYa8MCqJc (its tree: 777pvSGe5LaBd9nCczvE2FXEauiwtfGJ5XRpjKyniGor)
Runtime Agave 4.2.2, SBPF v3 programs
Programs already there SPL Token, Token-2022, Associated Token Account, the ring program, the launchpad and PumpSwap (addresses)
Native coin SOL, bridged 1:1 from Solana. There is no faucet: deploys and fees are paid in bridged SOL.

We tested every step below on a local chain running the same validator, behind the same public gateway and the same rate limits as rpc.prilius.xyz (scripts/program-deploy/test-deploy.sh in our repository).

  1. Build for SBPF v3. Prilius Chain only accepts new programs in SBPF v3: deploying v0, v1 or v2 programs is turned off since genesis (SIMD-0500). The default build of cargo-build-sbf is v0 and fails on deploy with “Detected sbpf_version required by the executable which are not enabled”. Build with:

    Terminal window
    cargo-build-sbf --arch v3

    We tested native programs on the solana-program 3 crate. With Anchor, make sure your build passes --arch v3 to cargo-build-sbf; we have not tested Anchor yet.

  2. Bring SOL. Bridge SOL from Solana to the wallet that will deploy (Getting started). See the costs below.

  3. Deploy through the RPC. The chain is reached through its RPC gateway only, so the CLI must send its transactions over RPC with --use-rpc:

    Terminal window
    solana program deploy target/deploy/your_program.so \
    --url https://rpc.prilius.xyz --use-rpc

    The gateway allows 20 requests per second per IP, with bursts of 60. A large program is written in hundreds of transactions: the CLI hits the limit and retries on its own. In our test, a 216 KB program took about a minute.

  4. Call it from any Solana client (@solana/web3.js, @solana/kit, Anchor’s client) pointed at https://rpc.prilius.xyz. A program can be called from the slot after its deploy.

You pay the rent of the program’s account, as on Solana, plus network fees. Measured in our test:

Program size Paid for the deploy
15.5 KB 0.11 SOL
216 KB 1.51 SOL

That is about 7 SOL per MB of program. solana program close gives the rent back when you no longer need the program.

You do. The upgrade authority of your program is the wallet that deployed it, as on Solana, and no Prilius key has a say over it. The Prilius cold key holds the authorities listed on Network. Like every account on the chain, your program still runs on a chain that one operator can halt or reorder.

Build a privacy app with the anonymous ring

Section titled “Build a privacy app with the anonymous ring”

The stealth trades of the launchpad use the anonymous ring in a pattern any app can reuse:

  1. Into the ring. The user deposits SOL from their wallet into a hidden identity. The deposit is public, and only says “this wallet put SOL in the ring”. Each deposit pays 0.005 SOL of ring entry.
  2. Out to a one-time address. The Ring RPC relays a withdrawal to a brand-new address and pays its fee, so the address has no on-chain link to the user’s wallet.
  3. Act. The one-time address sends whatever your app needs: a payment, a buy, a mint, a vote. It is an ordinary signer: any instruction of any program works.
  4. Back into the ring. What is left goes back into the hidden identity, not to the wallet: a direct transfer would link the two.

We wrote a client for these four steps, on top of Helius’s ring SDK. The launchpad’s stealth trades run on it.

import { connectRing, deposit, enroll, HiddenIdentity, oneTimeAddress, priliusEndpoints, returnToRing, sendInstruction, sync, withdrawTo } from "@prilius/ring";
const ring = await connectRing(priliusEndpoints(), { trustOperatorProver: true });
const identity = await HiddenIdentity.fromSeed(ring, seed); // a 32-byte seed the user keeps
await deposit(ring, wallet, identity, 100_000_000n); // public: wallet -> ring
await sync(ring, identity);
await enroll(ring, identity); // once per identity
const burner = await oneTimeAddress(); // keep burner.secretKey until it is empty
await withdrawTo(ring, identity, burner.signer.address, 100_000_000n);
await sendInstruction(ring, yourInstruction, burner.signer); // your app, from the one-time address
await returnToRing(ring, burner.signer, identity); // what is left goes back into the ring

Its example, a private payment, runs these steps on a local copy of the chain and its ring in about 30 seconds. It then checks that no transaction shows both the wallet and the one-time address.

Everything runs where the user’s keys live, in the browser or a script: the seed of the hidden identity and the key of each one-time address never reach our servers. The ring endpoints are public at rpc.prilius.xyz/ring, /indexer and /prover. The prover is rate-limited: one proof every two seconds per IP, in bursts of five.

What your users trust is the same as for a stealth trade: The anonymous ring has an auditor: Prilius can see every flow. The prover runs outside a secure enclave. Start small. With few users, the amounts and times of deposits and withdrawals can still be matched: standard amounts and random delays make it harder, not impossible.

Deploying on Prilius Chain costs real bridged SOL. Try your program on a local validator first: Agave’s solana-test-validator 4.2.2 turns on the same SBPF rules, so a program that deploys and runs there with --arch v3 deploys here too.