feat(examples): compliant private stablecoin (privUSD) on Lit#411
Open
clawdbot-glitch003 wants to merge 3 commits into
Open
feat(examples): compliant private stablecoin (privUSD) on Lit#411clawdbot-glitch003 wants to merge 3 commits into
clawdbot-glitch003 wants to merge 3 commits into
Conversation
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>
…-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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
private-stablecoinexample 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 thecompliance-transfer-gateCID-pinned-oracle trust model and was hardened after an adversarial/codexreview (pinned contract + screening RPCs, ledger PKP baked into the action CID, validated disclosure threshold + warrant-to-note binding,SafeERC20with 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