Settle the invoice. Hide the price. Kill the double-spend.
Confidential B2B invoice settlement in USDC — proving amount ≤ credit limit & paid on time without exposing the price — with on-chain anti-fraud nullifiers.
settle_invoice(proof, inputs, ...)
→ valid & unspent → paid ✓
→ replayed → nullifier reject ✗
Stellar Hacks: Real-World ZK · DoraHacks
Pricing leakage
Competitors monitor settlement contracts, read invoice values, and reverse-engineer your confidential wholesale pricing.
Double-factoring fraud
A supplier settles the same invoice with multiple financiers — costing the trade-finance industry billions annually.
Invoices tokenized as SEP-41 assets with encrypted metadata. The buyer settles with a client-side Noir proof — amount within credit limit, paid on time — never revealing the value.
Private
validity, not value, on-chain
Fraud-proof
Poseidon2 nullifier blocks replay
Terms
amount ≤ limit, time ≤ due
Atomic
verify → nullify → pay
$ npm run prove:demo
1. supplier mints SEP-41 invoice + AES-GCM envelope
2. buyer Noir proof: amount ≤ limit · time ≤ due
nullifier = Poseidon2(invoice_id, buyer)
3. settle_invoice(...) → UltraHonk via P26 MSM on-chain
valid & unspent → register nullifier, pay USDC ✓
replayed → nullifier rejects ✗
Settle the same invoice twice → the second reverts on the nullifier. Hosted app = UX sandbox; load-bearing ZK = prove:demo + deployed contract.
ZK Circuit
Noir / UltraHonk · range proof (amount ≤ credit line) + due-date check + Poseidon2 nullifier
Verifier
Rust/Soroban + rs-soroban-ultrahonk · Protocol 26 BN254 MSM · reads due_date & nullifier from bb's own public_inputs blob
Token
SEP-41 standardized invoice assets, ecosystem-compatible
Settlement
require_auth() buyer approval · ledger().timestamp() terms · event receipts
UltraHonk on-chain, consuming bb's native public_inputs bytes — sidestepping the field-ordering bugs that break naive integrations.
$T+
global trade finance; invoice factoring alone is multi-trillion.
$B
lost to double-factoring fraud every year — structurally invisible without a shared registry.
1st
on-chain primitive that protects pricing AND makes double-factoring impossible.
Per-settlement fee — basis points on each confidential invoice settlement.
Anti-fraud network — financiers pay to query/contribute to the shared nullifier registry (value compounds with size).
Enterprise SaaS — confidential settlement module for ERP / supply-chain finance platforms.
Cost moat — sub-cent settlement beats legacy factoring reconciliation overhead.
| Legacy factoring | Public-chain settle | Obscura | |
|---|---|---|---|
| Price privacy | ⚠️ paper | ❌ | ✅ ZK range |
| Double-factoring blocked | ❌ manual | ❌ | ✅ nullifier |
| On-chain settlement | ❌ | ✅ | ✅ |
| Terms enforced in ZK | ❌ | ❌ | ✅ |
| Cost | overhead | gas | sub-cent |
✅ Verifies on testnet
Real Noir/UltraHonk proof accepted on-chain — npm run prove:demo.
✅ Negative control
Tampered inputs rejected on-chain.
✅ Settlement hardened
settle_invoice reads real bb public_inputs (due_date/nullifier); broken to_xdr removed; double-spend guard tested.
✅ Measured cost
ZK verify + settlement ≈ 144,562 CPU (~0.14% budget), ~51KB mem. 120+ assertions, 6-stage CI.
30 DAYS
stellar.expert verified; live confidential-settlement + double-spend-rejection demo.
60 DAYS
Cumulative credit tracking — global outstanding-debt state (today: per-invoice check only).
90 DAYS
Shared cross-financier nullifier registry, in-browser proving, first trade-finance partner.
Edy Cu
full-stack + applied-ZK engineer
Solo-built the Noir/UltraHonk invoice circuit (range proof + due-date + Poseidon2 nullifier), the Rust/Soroban settlement contract with the embedded rs-soroban-ultrahonk verifier and SEP-41 integration, the AES-GCM tokenizer, and the Next.js console. One of five real on-chain ZK products shipped for this hackathon.
Obscura gives trade finance its first on-chain primitive that protects pricing and makes double-factoring cryptographically impossible — settled on Stellar.