Skip to content

writealishah/miden-time-locked-notes

Repository files navigation

0xMiden Epoch: ZK Time-Locked Notes Interface

Video.Project.2.mp4

License Status Blockchain 0xMiden Epoch is a minimalist, fully client-side interface designed to experiment with Miden Assembly (MASM) and native Account Abstraction on the 0xMiden network. It demonstrates how to issue cryptographic Time-Locked Notes without relying on heavy EVM smart contracts.

⚡ The Architecture

Instead of utilizing global state variables like Ethereum's block.timestamp, Miden Epoch leverages Miden's unique UTXO-based Note model. When a user initiates a lock, the interface dynamically constructs a MASM constraint script that asserts the push.env.block_number. The Heavy ZK-STARK proving algorithm is intended to be executed entirely locally via the @miden-sdk/miden-sdk WebWorker, ensuring total privacy until the exact unlock epoch is breached.

Core MASM Logic Implemented:

begin
    push.{target_block}
    push.env.block_number
    gte assert
    # ... asset transfer logic ...
end

🛠️ Built With

  • Frontend: React + Vite + TypeScript
  • Styling: Tailwind CSS (Vercel-Brutalist Aesthetic)
  • Blockchain SDK: @miden-sdk/miden-sdk (Simulation Mode enabled for V1 UI demo)

💡 Core Use Cases

By pushing the time-lock execution to the edge (client-side STARK proofs), this architecture immediately powers:

  1. Trustless Token Vesting: Team members / investors receive locked notes that mathematically cannot be consumed until the unlock epoch, entirely bypassing expensive EVM vesting contracts.
  2. OTC Escrows: Over-the-counter trades where assets are locked for a specific dispute or clearing period.
  3. Inheritance & Delayed Transfers: Programmable dead-man switches where funds unlock for specific beneficiaries in the future automatically.

🚀 Getting Started

Run locally for development:

npm install
npm run dev

Build for Production:

npm run build

📜 Notice

This is a conceptual UI prototype designed to push the boundaries of what is possible on client-side ZK-Rollups. Currently simulating proving delays for frontend demonstration purposes prior to full testnet network integration.

Built for the 0xMiden Builder Ecosystem.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors