0xMiden / 0xMiden/miden-proposals

Define and Implement Core Miden Standards (Tokens, Wallets, Components)

Aperta
#8 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
1
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## TL;DR

Ethereum has **ERC standards** (e.g., ERC20, ERC721, ERC4337) that define common interfaces and expectations for smart contracts. These standards form the foundation for interoperability across wallets, dApps, and tooling.

Miden needs a similar ecosystem of **canonical standards** for contracts like tokens, wallets, and multisigs — adapted to its **actor-based architecture**, **off-chain private state**, and **client-side proving model**.

We’re looking for a team to design and implement these standards as modular **account components** in the Miden Standard Library. Smart contracts in Miden consists of one or more components that can be customized or imported from the Miden Lib

---

## Goal

Create a set of open, reusable **Miden Standards** covering the most important contract use cases:

- **Fungible tokens** (Miden equivalent of ERC20)
- **Non-fungible tokens** (ERC721-like)
- **User wallet contracts**
- **Multisig wallets**
- Plus: review of Ethereum/Solana standards to identify further opportunities (What are we missing on Miden)

These standards will be implemented as modular account components in the [`miden-lib`](https://github.com/0xMiden/miden-base/tree/next/crates/miden-lib/asm/account_components) repository, forming the foundation for the **Miden Standard Library**.

---

## Scope & Phases

### Phase 1: Specification

- Define expected behavior, interfaces, and modularity for each standard
- Align designs with Miden architecture:
- Account abstraction via smart contracts
- Note model
- Private off-chain state
- Consider optional features (e.g., allowances, metadata, access control)
- Compare with standards from Ethereum, Solana, and Sui
- Document what is directly applicable
- Identify gaps or adaptations needed for Miden

Deliverables:
- Formal spec documents for each standard (token, NFT, wallet, multisig, etc.)
- Compatibility table comparing with existing Ethereum/Solana standards
- Developer-friendly documentation for the spec (in Markdown or Docs site)

---

### Phase 2: Implementation

- Implement each standard as a set of **account components** in `miden-lib`
- Write clean, composable MASM (Miden Assembly) modules
- Ensure compatibility with current `miden-tx` and `miden-client` versions
- Add unit tests and test vectors for validation

Deliverables:
- `*.masm` files for each standard in the `account_components/` folder
- Unit tests and example transactions
- SDK integration examples (if needed)

---

### Phase 3: Developer Experience

- Tutorials and guides on how to use each standard
- Showcase how to compose contracts from standard modules
- CLI or SDK tools to instantiate and configure standard contracts

Deliverables:
- Markdown guides or tutorials
- Demo applications (optional)
- Example client code (Rust or TS)

---

## Initial Standards to Define

| Standard | Description |
|----------------|------------------------------------------------------------|
| `FungibleToken`| Transferable, divisible token (ERC20-style) |
| `NonFungibleToken` | Unique token with metadata (ERC721-style) |
| `UserWallet` | Basic programmable wallet with spend auth & note mgmt |
| `MultiSigWallet`| N-of-M multisig contract for shared custody |

More to be added based on gap analysis.

---

## Desired Expertise

- Experience with smart contract standards (ERCs, SPL tokens, Move modules)
- Familiarity with Miden's VM, account model, and MASM
- Strong skills in formal specification and developer tooling
- Bonus: experience writing on-chain libraries or frameworks

---

## Deliverables Summary

- Formal specs for each standard (Markdown or Docs)
- MASM implementations in `miden-lib/account_components`
- Tests and validation suites
- Developer documentation and examples

Let’s build the Miden Standard Library — a clean, composable foundation for private, programmable assets.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

The issue is a large-scale design and implementation project for core Miden standards. Start by reviewing the Miden architecture, especially the actor-based model and account components in the miden-lib repository. Examine existing Ethereum ERC standards and Solana SPL tokens to identify adaptations needed. The work involves formal specification, writing MASM modules, and creating tests, which requires deep familiarity with the Miden VM and smart contract design.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
backend-api-design
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.