Thanks for your interest in contributing. DShield is a shielded stablecoin wallet on Stellar (Soroban contracts + Noir circuits + a Next.js frontend), currently a testnet demo. This guide covers how to get set up and how to submit changes.
- This is unaudited software handling a shielded pool of funds (testnet only, for now). Be conservative with changes to
contracts/andcircuits/— correctness bugs there are security bugs. See Security Model in the README before touching hashing, nullifiers, or recipient binding. - Open an issue before starting significant work (new features, architecture changes) so we can align on approach before you invest time.
- Small fixes (typos, docs, obvious bugs) can go straight to a PR.
Prerequisites: Rust + wasm32v1-none target, stellar CLI, Noir (nargo) + Barretenberg (bb), Node + pnpm, just.
just setup # verify all prerequisites are installed
just start && just deploy # local network, deploy contracts, write frontend/.env.local
cd frontend && pnpm install && pnpm devRun just --list for the full set of available recipes (build, deploy, demo, clean, etc).
- Fork the repo and create a branch off
dev. - Make your change. Keep diffs focused — unrelated cleanup makes review harder.
- Add or update tests for any behavior change. This repo treats tests as load-bearing:
just test-contracts— Rust/Soroban contract testsjust test-frontend— frontend unit testsjust test— bothjust test-e2e(ortests/e2e.sh) — full on-chain deposit/withdraw loop against a local network
- If you touch a Noir circuit, make sure it still compiles and the corresponding proof round-trips:
nargo compile && nargo executein the circuit's directory, then regenerate the checked-infrontend/src/circuits/*.json/frontend/public/circuits/*.jsonartifacts the frontend embeds for client-side proving (seejust build-circuits). - Run the frontend linter (
pnpm lintinfrontend/) and make surepnpm buildtype-checks cleanly. - Open a PR against
dev, notmain— all active development merges intodev. Describe why the change is needed, not just what changed — link the issue if there is one. CI (circuit compile/proof round-trip, contract tests, frontend tests, lint, and an on-chain e2e run) must pass before merge.
circuits/— Noir circuits (shielded_pool,compliance,disclosure,hasher), compiled with Barretenberg's UltraHonk (keccak transform).contracts/— Soroban contracts in Rust:pool(deposits/withdrawals/nullifiers),verifier(BN254/UltraHonk proof verification),compliance(KYC registry + disclosure proof verification).frontend/— Next.js wallet UI, including the client-side prover.scripts/,tests/e2e.sh— demo and end-to-end scripts driven by thejustfile.DESIGN.md— deeper technical design notes if you want the full picture before diving in.
Use GitHub Issues. For anything that could be a security vulnerability (a way to double-spend, forge a proof, bypass recipient binding, drain the pool, etc.), do not open a public issue — see SECURITY.md instead.
This project follows the Contributor Covenant. Be respectful; disagreements about code are fine, personal attacks aren't.