Conditional Note consumption on Miden via soulbound NFTs #2250
Dominik1999
started this conversation in
General
Replies: 1 comment
-
|
Looks great! This is how I imagined a name service to work too. You consume a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Conditional Note Consumption via Private Identity Attestations on Miden
Summary
We want to enable conditional note consumption on Miden based on real-world identity claims (e.g. citizenship), while preserving privacy, unlinkability, and good UX. Most important, good UX.
Example:
This discussion explores a proof of concept (PoC) that integrates external identity providers (Privado or zkPassport) with Miden’s private state model, enabling claims to be proven once and then reused privately in subsequent transactions.
Problem Statement
On Miden, assets move via notes, and notes can impose consumption conditions.
A common class of conditions is identity-based:
The challenge:
a) Identity data must remain private
b) Identity proofs should not be repeated for every interaction (No runtime dependency on the identity provider during consumption)
c) The check should happen inside the Miden transaction (Miden tx kernel should be able to check)
Why Existing Approaches Are Not Sufficient Out of the Box
Public-chain identity NFTs
Proof-per-interaction identity systems
Key Observation: Private State Changes the Design Space
Miden supports private accounts and private state. This enables a hybrid model:
This model is not possible on transparent blockchains, but is feasible on Miden. Actually also on Aztec, maybe Aleo.
Proposed Solution (High Level)
No identity data is revealed, and no external system is contacted at runtime.
Attestation / “Soulbound NFT” Structure (Proposed)
Attestation Header (signed by issuer)
schema_id(e.g.passport_v1)issuer_idissuer_pubkey_idsubject_commitment(bound to Alice, unlinkable)claims_root(Merkle root over claims)expiryrevocation_idnonceIssuer Signature
Claims Tree (private)
Merkle tree with individual claim leaves, e.g.:
citizenship == USdate_of_birth == 1989-12-12document_type == passportOnly the leaf required by a note’s predicate is opened during a transaction.
Conditional Note Consumption on Miden
First Alice needs to obtain the attestation artifact. She needs to register with an identity provider. Then she can use the artifact to consume notes.
Registration Flow: Privado-Based PoC (With a Tweak)
Privado’s native model is stateless proof-per-interaction. This PoC explores materializing a credential once into private state.
The idea is to use Privado's off-chain verifier as bridge and issuing entity of the Miden NFT.
Registration Flow: zkPassport-Based PoC
sequenceDiagram autonumber participant Alice participant Issuer as zkPassport (Issuer) participant L1 as Aztec / Ethereum participant Bridge as Bridge / AggLayer / Trusted single sig bridge participant Miden as Miden Network participant Account as Alice Miden Account (Private) Alice->>Issuer: Submit passport + liveness proof (off-chain) Issuer->>Issuer: Verify passport & identity Issuer->>Issuer: Derive claims (citizenship, DOB, expiry) Issuer->>Issuer: Build claims Merkle tree → claims_root Issuer->>Issuer: Compute subject_commitment (bound to Alice) Issuer->>Issuer: Sign attestation header Issuer->>L1: Mint Attestation NFT / SBT (payload + signature) L1-->>Alice: Attestation token minted Alice->>Bridge: Bridge attestation payload to Miden Bridge->>Miden: Create note carrying attestation object Miden->>Account: Store attestation in private account stateNote consumption flow
During transaction execution, Alice proves:
If all checks pass, the note is consumed.
sequenceDiagram autonumber participant Alice participant Account as Alice Miden Account (Private) participant Kernel as Miden Transaction Kernel participant CondNote as Conditional NC participant IssuerKeys as Issuer Key Registry (on Miden) participant Revocation as Revocation Root (optional) Alice->>Account: Select attestation object Alice->>Kernel: Build tx witness (attestation, claim leaf, Merkle path) in advice provideer Kernel->>Account: Check attestation exists in private state Kernel->>IssuerKeys: Fetch issuer public key via FPI Kernel->>Kernel: Verify issuer signature Kernel->>Kernel: Check expiry Kernel->>Kernel: Verify Merkle opening -> claims_root Kernel->>Kernel: Check claim satisfies NC predicate opt Revocation enabled Kernel->>Revocation: Check revocation_id not revoked end Kernel->>CondNote: Authorize NC consumption CondNote-->>Kernel: Release assets Kernel-->>Account: Credit assets to accountOpen Questions
Goal of This Discussion
This discussion is not to finalize a protocol, but to:
Feedback from both identity provider teams is highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions