Dominik Schmid
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Compliant Private Stablecoin on Miden — Working Design Document > **Status:** Draft / working doc > **Participants:** Miden, M0, Predicate, external compliance counsel > **Audience:** Technical + product + legal/regulatory > **Purpose:** Shared design space for a **$-pegged, privacy-preserving, compliant stablecoin** on Miden. This is a **living document**. It will contain open questions, alternatives, and half-baked ideas. Please add comments, `TODO:`s, and counter-proposals inline. --- ## 1. Goal & Scope ### 1.1 What we are trying to build We want users to be able to: - Hold a **$-pegged stablecoin** issued by **Moonpay** via **M0** in **private Miden accounts**. - Transfer this stablecoin **privately by default** using Miden [private notes](https://docs.miden.xyz/miden-base/note#note-storage-mode). - Do this in a way that is **legally, regulatorily, and operationally acceptable** for: - Moonpay, 1Money, etc as the issuer - M0 as the platform, - Predicate as compliance infra provider, - Institutions operating in the **US** and **EU** (at minimum). High-level requirements: - **Privacy:** End-users can use the private stablecoin on private notes on Miden. - **Compliance:** Issuer, Miden, and M0 can satisfy regulatory (AML / CTF / KYC) obligations and avoid “Tornado-style” regulatory outcomes. - **Programmability:** Compliance logic should be **programmable at the asset level** using Miden’s programmable asset model (faucet callbacks). - **Evolvability:** We assume a **training-wheels** approach: start with conservative controls and gradually increase privacy and decentralization as we gain confidence. ### 1.2 What “compliance” might mean here It is not 100% clear to me what a compliant stablecoin is. Is USDC on Ethereum mainnet compliant? This needs to be refined by a legal counsel or Predicate, but roughly: - **KYC / KYB** - Asset issuer must KYC/KYB purchasers in primary issuance - Clients after primary issuance might only be subject to risk-based analysis (to be analyzed) - **AML / CTF** - Asset issuer needs to follow BSA and maintain an AML program, including overseeing the circulation of assets - Asset issuer needs to file SARs reports as required - Asset issuer and Miden need to limit high-risk users (e.g. major exploits, terrorist financing) from picking up and utilizing the asset in secondary markets. This is more of a principles-based approach - Miden needs to ensure that appropriate AML/CFT settings are put in place in any centralized points - Ability to **screen counterparties and flows** against: - Sanctions lists (OFAC, EU, UN, etc.). - Known hacks, scams, mixers, high-risk services. - Ability to **detect suspicious patterns** and file SARs / STRs where required. - Ability to **avoid commingling** with clearly illicit funds. - **Issuer controls** - At minimum: - Ability to **blocklist** certain addresses / accounts. - Ability to **freeze / pause** the asset or specific positions. - For Miden, this likely maps to: - Ability to **refuse transfers** (e.g., faucet callback returns `false`). - Ability to **refuse redemptions / burns** or disable new minting. - **Auditability / disclosure** - Ability to **reconstruct flows** for: - Regulated intermediaries (custodians, exchanges, M0 itself), - Regulators or auditors under lawful process. - This can leverage **view keys / selective disclosure / ZK proof chains** rather than full transparency. > **Open questions (to refine with counsel / issuer)** > - Which concrete regulatory regimes do we need to comply with? (e.g., US MSB rules, travel rule, MiCA, AMLD6/AMLR, etc.) > - Do we require **full KYC** for all users, or only for certain tiers / limits? > - How much **ex ante control** is required (blocklists, policy engine) vs **ex post auditability**? > - What is the minimal set of issuer powers regulators will insist on (freeze, clawback, list control, etc.)? [freeze] --- ## 2. Background: Privacy & Compliance Design Space ### 2.1 Frameworks we’re referencing We adopt the **Types of Privacy / Compliance Enforcement / Disclosure Rules** framework from the Inco + Predicate report *“Navigating Privacy and Compliance in Blockchain Systems”*[1] Key axes (very compressed): - **Types of privacy** - Pseudonymity → Confidentiality → Anonymity → Fully private. - **Layer of enforcement** - Asset / Application / Protocol (chain). - **Point of enforcement** - Deposit / transfer / withdrawal. - **Compliance mechanism** - Programmatic policies, KYC/KYB, PoI/ASP, auditor keys, lineage, etc. - **Disclosure rules** - Who can see what (user, voluntary third party, involuntary third party, protocol), and **how viewing rights are controlled** (pre-defined vs programmable). We should explicitly place **“M0 private stablecoin on Miden”** somewhere in this design space later in the doc. ### 2.2 Other projects and reference architectures This section is deliberately short; we can extend with more detail if useful. #### 2.2.1 Aleo + USDCx - **What it is** - Aleo and Circle are launching **USDCx**, a private, USDC-backed stablecoin on Aleo using Circle’s xReserve infrastructure [2] - Fully redeemable into “normal” USDC 1:1 on supported chains. - **Privacy model** - Aleo is a **fully private L1**; notes inside Aleo hide (encrypt) senders, receivers, and amounts using ZK proofs - Public chains only see deposit/withdraw events via the **Verulink** bridge; inside Aleo, transfers are private (encrypted). - **Compliance model (high-level)** - Compliance is primarily enforced at the **bridge / app layer**: - Programmatic policies at deposit into Aleo - Rate limits, delay windows, risk-based controls on bridging. - Probably also some freeze capabilities and visibility for the issuer - Disclosure: users can share view keys for audits; governance has adopted guidance (e.g., ARC-100) on best practices for bridges > **Why relevant for us:** example of a **major issuer** (Circle) endorsing “private but compliant” design: enforcement at **boundary (bridge)** + strong **selective disclosure** inside private environment. #### 2.2.2 Confidential / auditor-view designs (Solana Token-2022, AvaCloud eERC20) - **What they do** - Token-2022: **confidential transfers** on Solana (amounts encrypted); optional **auditor key** that can decrypt balances [3] - AvaCloud eERC20: similar design on EVM: balances and amounts encrypted; issuer can appoint / rotate **auditors** with view-only power - **Pattern** - **Asset-level confidentiality**, **asset-level compliance** via: - Auditor keys (view-only, not enforcement), - Issuer-controlled policy over who can audit. > **Why relevant:** shows a path where the stablecoin **itself carries the compliance hooks** (auditors, controls) independent of specific dApps. #### 2.2.3 PoI / ASP / privacy pools - Protocols like **Railgun**, **Privacy Pools** etc. use **proof-of-innocence** or **association sets**: - Users prove that funds **do not intersect** with a bad set, or **do belong** to a curated good set, using ZK proofs, without revealing full history - These systems often: - Enforce compliance at **deposit and withdrawal**, while inner transfers remain private. - Use semi-centralized **curators** for lists. > **Why relevant:** gives us a language for compliance that is **more nuanced than a static blacklist** (e.g., “your funds are in the clean set curated by X”). #### 2.2.4 Regulatory / theory papers - **“Privacy-Protecting Regulatory Solutions Using Zero-Knowledge Proofs”** (Burleson/Korver/Boneh) discusses: - Using ZKPs for **selective disclosure** to meet AML / CTF requirements without full transparency [4] - Other work (e.g., zkFi, Derecho, MIT/BoE digital pound report) explores: - Middleware architectures, - Selective de-anonymization, - Design of **viewing keys and audit trails** > **TODO:** Once we have a concrete strawman, we should explicitly map it against these patterns: what we reuse vs where Miden’s model is different. --- ## 3. How a Compliant Private Stablecoin Could Work on Miden ### 3.1 Miden primitives we rely on (very high level) We assume the following: - **Notes / assets** - Assets live in **notes**; notes can be consumed / created privately, with ZK proofs verifying correctness. This is pretty similar to Aleo / Aztec, only notes can be consumed in Miden. - **Programmable assets / faucets** - Each asset has an **issuing faucet** that can be invoked on transfer / mint / burn. - Transfers can require a **callback into the faucet** which: - Sees some subset of transaction data (to be specified), - Runs arbitrary logic, - Returns `true` (allow) or `false` (reject) [it can return up to 16 Felts]. Ref: Miden programmable asset discussion. (https://github.com/0xMiden/miden-base/discussions/1068) ### 3.2 Roles and responsibilities - **Moonpay / 1Money (issuer)** - Issues the **Miden-native representation** of the stablecoin. - Meets offchain obligations. - Ultimately responsible for regulatory compliance as issuer. - **M0 (stablecoin platform)** - Maintains reserves and infra to issue the stablecoin. - **Predicate (compliance infra)** - Provides **policy engine** and **real-time risk attestation**. - Potentially also curates/operates **association sets**, block/allowlists, and other onchain policy artifacts. - **Miden protocol** - Provides **execution + privacy**. - Provides the programmable asset hooks (faucet callback). - **Compliance expert(s) / counsel** - Translate regulatory requirements into concrete **policy primitives** and **documentation** (what reports we can produce, etc.). ### 3.3 Strawman: Asset-level enforcement via faucet callback **Idea:** Stablecoin is a Miden programmable asset; every transfer calls back into the **M0 stablecoin faucet**, which in turn queries Predicate / onchain state to decide whether to allow the transfer. Rough flow: 1. **User constructs a private transfer** of M0-USD on Miden. 2. During execution, the VM: - Invokes the **faucet callback** with: - Some metadata about the transfer (structured note tags, risk attestation, etc.). 3. The faucet logic: - Checks: - **Blocklist / allowlist** membership, - Optional **Predicate policy attestation** (e.g., signed message that “this transfer complies with policy vX”), - Optional **limits** (velocity, per-address caps, etc.). - Returns `true` or `false`. 4. If `true`, transaction is valid; if `false`, transaction fails and notes are not created / consumed. This makes the **asset itself** the enforcement point, regardless of wallet or dApp. 5. For every transaction, there is always a proof. That means, also the faucet callback is proven to be true, if the transaction succeeds. #### 3.3.1 What does the faucet actually see? On option is: - **Metadata-rich** - Faucet sees: - Pseudonymous sender/receiver identifiers, - Asset type (fixed: stablecoin), - Transfer amount (possibly bucketed / thresholded), - Optional jurisdictional flags / account types. - Faucet can implement more nuanced policy (e.g., velocity limits, per-jurisdiction rules), at the cost of more data being visible to the issuer / Predicate. > **Open design question:** > What is the **minimum metadata** the faucet must see to satisfy compliance, and what can be kept **purely private** while remaining acceptable to regulators? ### 3.4 Where and how we enforce compliance Using the Inco+Predicate framework, a first placement (to debate) might be: - **Types of privacy** - Inside Miden: target **“fully private”** (sender, receiver, amount all hidden from the public). - At the **edges** (mint / redeem from non-private chains): likely only **pseudonymous** or **confidential**. - **Layer of enforcement** - **Asset level:** faucet logic for transfers, mints, burns. - **Application level:** wallet / on-ramp enforcing UX rules (e.g., no unsigned transfers, forcing policy attestation). - **Boundary level:** when bridging or redeeming off Miden, additional checks may apply (e.g., KYC’d exchange). - **Point of enforcement** - **Deposit / mint into Miden private pool** - Strong policy checks (KYC, AML screening, risk scoring). - **Transfers inside Miden** - Faucet callback ensures policy invariants (e.g., no blocked parties, limits). - **Withdrawal / redemption** - Additional checks (e.g., higher scrutiny for large redemptions, travel rule data). - **Compliance mechanism candidates** - **Programmatic policies (Predicate)** - Real-time risk checks at mint / transfer. - **Blocklist / allowlist** - Enforced in faucet; semantics TBD (account-based, key-based, tag-based). - **Association sets / PoI** - For some flows, users may prove funds **belong to a “clean” set** rather than rely solely on a blocklist. - **KYC / identity** - Possibly used at mint / redemption, with **ZK attestations** used inside Miden to avoid re-exposing identity. > **Open questions** > - Do we want **mandatory KYC** for all holders, or tiered (e.g., anonymous small holdings vs fully-KYC’d larger holdings)? > - Do we want to support **PoI / ASP-style proofs** as a first-class mechanism, or is that out of scope for v1? > - How much of the policy logic should be **onchain in the faucet** vs **offchain in Predicate’s policy engine** (with signed attestations)? ### 3.5 Disclosure / auditability model We need a story for: - **User self-view** - Users must be able to see their balances and history (already in Miden model). - **Voluntary third-party disclosure** - Users (or regulated intermediaries acting for them) should be able to: - Share **view keys** or **exported histories** to auditors, accountants, tax advisors. - Provide **ZK proofs** that payments/auth holdings satisfy certain properties (e.g., “all funds originated from KYC’d accounts”, “no interaction with sanctions list X”). - **Involuntary disclosure under lawful process** - M0 and/or Predicate may need the ability to: - Perform **targeted investigations** when given an identifier (account, note tag, etc.) and legal authority. - Produce AML reports backed by **cryptographically sound evidence** (e.g., derived from onchain state + proofs). This is where we need to map Miden’s **viewing key / audit key** story: > **Open questions** > - Miden does not support **view keys** at note / account level natively. Data is stored offchain. Is this needed? > - Do we need a separate **“regulator view”** capability (e.g., auditor keys analogous to Token-2022 / eERC20), or can we get far enough with user-/intermediary-provided proofs? > - How do we avoid recreating a **centralized panopticon** while still satisfying enforcement needs? ### 3.6 Is “just a blocklist” sufficient? One key question for v1: > **Is an issuer-controlled blocklist (and ability to pause) sufficient to call this “compliant” for US / EU, at least initially?** Dimensions: - **Pros** - Mirrors current USDC-style controls on transparent chains. - Simple mental model: Predicate can freeze assets associated with sanctioned entities or clear abuse. - Easier to implement quickly inside Miden via faucet callback. - **Cons** - In a **fully private** environment, it becomes harder to: - Identify which notes/accounts belong to bad actors **without** more metadata or external proofs. - Demonstrate to regulators that the issuer is doing sufficient **AML risk management**, not just freezing addresses after the fact. - If the blocklist is **mostly empty** (because Miden is new / small), regulators might see this as **compliance theater** unless backed by a clear risk-based rationale. > **Open questions for compliance expert + Predicate** > - What **minimum controls** beyond a simple blocklist are expected? > - e.g., transaction monitoring rules, velocity checks, association-set logic, enhanced due diligence for certain counterparties. > - Can we credibly argue for a **phased rollout**: > 1. Phase 0: basic blocklist + pause + full KYC at mint/redemption. > 2. Phase 1: add Predicate policy engine integration (risk-scored policy decisions on faucet callback). > 3. Phase 2: introduce PoI / ASP-style sets, richer view/audit tooling. > - How do we **document and communicate** this as a **risk-based program**, not just a tech feature? --- ## 4. Next Steps (for all parties) **For Miden:** - Specify exactly: - What the **faucet callback interface** looks like (inputs/outputs, what metadata is accessible). - How **note tags** and programmable assets can encode compliance-relevant information. **For Asset Issuer:** - Define initial **risk appetite** and **jurisdictional scope**. - Outline: - On/Off-ramp partners, - KYC model, - Reporting obligations. **For Predicate:** - Propose: - A **concrete policy schema** for M0 stablecoin on Miden (e.g., JSON representation of rules). - A **signing / attestation format** that the faucet can verify. - Options for **association sets**, blocklists, and how they are updated onchain. **For compliance expert:** - Validate: - Whether the **strawman control set** is realistic for US/EU regulators. - Where additional controls / documentation are needed (e.g., Travel Rule, record-keeping, SAR filing processes). --- ## 5. Appendix / References [1] Inco + Predicate — *Navigating Privacy and Compliance in Blockchain Systems* (2024) [2] Aleo + Verulink + USDCx press and docs [3] Solana Token-2022 confidential transfer docs; AvaCloud eERC20 docs [4] Burleson, Korver, Boneh — *Privacy-Protecting Regulatory Solutions Using Zero-Knowledge Proofs* (a16z crypto, 2022) > **TODO:** Once we converge on a baseline design, add: > - A one-page **“placement in the framework”** diagram for the Miden stablecoin. > - Concrete **sequence diagrams** for: mint, private transfer, redemption, and audit flow.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully