Veilum
Private stablecoin payments on Stellar, with a web dashboard and its own Chrome wallet.
Overview
Users shield public stablecoins into encrypted notes, send them privately inside a Soroban pool, and unshield to any public account. Noir circuits produce UltraHonk proofs that the pool verifies on-chain, and a compliance layer gates entry and exit without exposing transfers inside the pool.
The problem
Every Stellar payment is public: who paid whom, how much and when. Businesses paying salaries or suppliers in stablecoins leak their entire ledger. Privacy that regulators can't reason about is a non-starter, so the design has to be private inside and accountable at the edges.
What I built
- A multi-asset shielded pool (USDC, EURC and more) on Soroban with an incremental Poseidon2 Merkle tree and on-chain UltraHonk verification
- Noir circuits for note hashing, Merkle membership, nullifiers, balance conservation and ASP membership
- A relayer so private transfers and withdrawals never use the user's wallet as the transaction source
- Association Set Providers: an on-chain membership tree and deny list that gate shield and unshield, while internal transfers stay ASP-free
- Shielded receive addresses (shd_…), browser-side proving with Noir.js and bb.js, and an indexer that archives pool events beyond RPC retention
- A self-custodial Chrome extension wallet with an encrypted vault, HD accounts and background sync
Decisions
Be explicit about what is visible
Shield reveals depositor, token and amount; private transfers reveal only nullifiers and commitments; unshield reveals the recipient but not which notes funded it. The README publishes that table instead of overselling privacy.
Prove in the browser, verify on the relayer too
Users generate proofs client-side, and the relayer re-proves with the CLI for reliable on-chain verification, so a flaky browser never strands funds.
More screens

Under the hood
struct Note { owner: Field, token: Field, amount: Field, blinding: Field }
fn hash_note(note: Note) -> Field {
poseidon2_hash4(note.owner, note.token, note.amount, note.blinding)
}
fn verify_merkle_path(leaf: Field, siblings: [Field; 20], directions: [bool; 20], root: Field) -> bool {
let mut acc = leaf;
for i in 0..20 {
if directions[i] { acc = merkle_parent(siblings[i], acc); }
else { acc = merkle_parent(acc, siblings[i]); }
}
acc == root
}
fn main(spending_key: Field, in_amounts: [Field; 2], /* … */ mode: pub Field /* … */) {
A shielded transfer circuit
The Noir circuit behind Veilum and Shielded Token: spend two notes, create two, reveal nothing.
fn main(
// … private inputs, including the ASP Merkle path and
membership_blinding: Field,
// … public inputs shared with the transfer circuit, plus
asp_membership_root: pub Field,
owner_pk_public: pub Field,
) {
// …
assert(owner_pk == owner_pk_public);
let asp_leaf = poseidon2_hash3(owner_pk, membership_blinding, 2);
assert((if verify_asp_path(asp_leaf, asp_merkle_siblings, asp_merkle_directions, asp_membership_root) { 1 } else { 0 } - 1) * mode == 0);
// … then the same note, nullifier and conservation constraints as the transfer circuit
}
Compliance without deanonymising
A second circuit that proves a withdrawer is on an approved list without saying who they are.
#[contractimpl]
impl UltraHonkVerifierContract {
/// Initialize the on-chain VK once at deploy time.
pub fn __constructor(env: Env, vk_bytes: Bytes) -> Result<(), Error> {
env.storage().instance().set(&Self::key_vk(), &vk_bytes);
Ok(())
}
/// Verify an UltraHonk proof using the stored VK.
pub fn verify_proof(env: Env, public_inputs: Bytes, proof_bytes: Bytes) -> Result<(), Error> {
if proof_bytes.len() as usize != PROOF_BYTES {
return Err(Error::ProofParseError);
}
let vk_bytes: Bytes = env.storage().instance().get(&Self::key_vk()).ok_or(Error::VkNotSet)?;
let verifier = UltraHonkVerifier::new(&env, &vk_bytes).map_err(|_| Error::VkParseError)?;
verifier.verify(&proof_bytes, &public_inputs).map_err(|_| Error::VerificationFailed)?;
UltraHonk verification on Soroban
Verifying Noir proofs inside a Stellar smart contract.
