Skip to content

feat(examples): compliant private stablecoin (privUSD) on Lit#411

Open
clawdbot-glitch003 wants to merge 3 commits into
mainfrom
glitch003/lit-private-stablecoin
Open

feat(examples): compliant private stablecoin (privUSD) on Lit#411
clawdbot-glitch003 wants to merge 3 commits into
mainfrom
glitch003/lit-private-stablecoin

Conversation

@clawdbot-glitch003
Copy link
Copy Markdown
Collaborator

Adds a private-stablecoin example plus a design plan (plans/private-stablecoin.md) for a compliant private stablecoin: balances and transfers are hidden on-chain via commitment/nullifier notes with encrypted blobs in event logs, and a Lit Action acts as the prover in place of a ZK circuit. Compliance is built in — OFAC screening on every operation, KYC at the mint/redeem dollar edges (attestation, no PII stored), publicly provable 1:1 USDC reserves, and warrant-gated selective disclosure that decrypts exactly one note while the rest stay dark. It reuses the compliance-transfer-gate CID-pinned-oracle trust model and was hardened after an adversarial /codex review (pinned contract + screening RPCs, ledger PKP baked into the action CID, validated disclosure threshold + warrant-to-note binding, SafeERC20 with a balance-delta check, KYC on redeem, strict expiry). The PrivUSD contract has 7 passing Hardhat tests, and the full flow (KYC+mint → reserve proof → private transfer → 3-of-5 disclosure, 2-of-5 rejected) runs live on Base Sepolia. Demo-grade simplifications and their production paths are documented in the example README and the plan.

🤖 Generated with Claude Code

Add a private-stablecoin example + design plan. Balances/transfers are
hidden on-chain via commitment/nullifier notes with encrypted blobs in
events; a Lit Action acts as the prover (no ZK circuit), with OFAC
screening on every op, KYC at the mint/redeem edges, provable 1:1
reserves, and warrant-gated selective disclosure. Built on the
compliance-transfer-gate trust model and hardened after an adversarial
review (pinned contract RPC, baked ledger PKP, validated disclosure
threshold, SafeERC20 + balance-delta). 7 contract tests pass; runs live
on Base Sepolia.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@clawdbot-glitch003 clawdbot-glitch003 requested a review from a team May 29, 2026 02:31
glitch003 and others added 2 commits May 28, 2026 19:35
…-stablecoin

# Conflicts:
#	examples/README.md
- require https on both pinned RPCs (block http MITM downgrade)
- reject non-finite expiry (1e999/Infinity) on KYC attestations + warrants
- bind redeem KYC to the payout recipient, not the caller
- reject no-op transfers (empty input/output) that burn a nonce (grief DoS)

Re-verified live on Base Sepolia; 7 contract tests still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants