StaffPurse Transparency Protocol
A corporate spend management ecosystem using Stellar Soroban smart contracts to provide immutable, cryptographic proof of expenses.
Vision
Corporate spend management is historically opaque. Auditors rely on trusting internal databases. StaffPurse changes this by hashing daily expense records into a Merkle tree and anchoring the root on the Stellar blockchain — proving records have never been tampered with.
Drips Wave Program
StaffPurse is built in alignment with the Drips Wave program, pushing boundaries of Soroban smart contracts and seamless Web3 UX.
Architecture
Three repositories with clean separation of concerns:
Contracts
Rust/Soroban smart contracts storing Merkle roots on Stellar.
App
Flutter mobile client and Deno Edge functions for batching.
Web
Next.js public verification dashboard.
staffpurse-contracts
The source of truth. A Rust StaffPurseAnchor contract deployed to Soroban.
Core Functions
- anchor_root(batch_date, root_hash) — admin-only write
- get_root(batch_date) — public read for verification
- WASM upgrade pathways for future features
staffpurse-app
Flutter mobile app + Supabase backend + Deno Edge Functions for the daily anchoring pipeline.
Pipeline
- Employees submit expenses via the Flutter app
- At 00:05 UTC, pg_cron triggers the
anchor-batchfunction - Merkle tree built from un-anchored records (SHA-256 leaves)
- Root submitted to Soroban via Stellar RPC
- Records updated with Merkle inclusion proofs
staffpurse-web
Next.js + Tailwind CSS, deployed to GitHub Pages. All cryptography runs in the browser.
How Verification Works
The dashboard fetches records via REST API, queries the Soroban contract for the daily root, and recomputes the root from the record hash and proof entirely in the browser. If it matches, a Verified badge is shown.