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.