Why Miden

Darwin is not a protocol that was ported to Miden. The thing it does (a basket position nobody else can read, with the basket's rules enforced by an account the network runs) depends on Miden's execution model.

Privacy is the default, not a feature

On an account-model chain, state is a global map and every balance in it is public. Privacy has to be added back with proofs over a shielded pool, and anything the pool does not cover leaks.

Miden stores value in notes, and a note can be private: the chain commits to it and verifies the proof that consumes it, while the note's contents (assets, script, recipient) stay with the parties who know them. A Darwin position is a private note minted to your account, and the note that starts your trade is private too. There is no per-user ledger slot anywhere, so there is nothing to read and nothing to leak.

Execution happens client-side

A Miden transaction is proven by whoever makes it, and the network verifies a proof rather than re-executing the work. For Darwin that means a buy can carry its own logic: the note is the program. Your browser builds it, your wallet proves and signs it, and the network checks it.

Network accounts hold the rules

Miden's network accounts are executed by the network itself: a note that targets one is picked up and executed with no one online, and it runs only the code the account allows.

The BLUEDW vault is a network account. Darwin's relay buys the coins on the DEX (that part needs patience and cannot be one transaction), but the share price, the mint and the redemption happen in a transaction the vault runs, with prices it reads itself. See Network Settlement.

Accounts carry code, and that code can be locked down

A Miden account has procedures, and a network account can be deployed with an allowlist of note script roots it will accept. The BLUEDW vault accepts only the note scripts in its allowlist (its in-kind deposit and redeem, plus standard Miden notes), and anything else simply does not execute. The allowlist can be extended by the vault's owner, which is an upgrade path Darwin states openly on Risks.

Foreign procedure invocation prices the trade honestly

A note needs a price, and the two usual answers are both bad: a keeper writing prices into our storage (trust the keeper) or a signed quote (trust the signer). Miden lets one account call another's procedure during execution (foreign procedure invocation), so the note reads Pragma's median itself, at settlement, as part of the same proof.

What it costs

Being honest about the trade-offs, since this page is otherwise a list of advantages:

  • A private note has to be delivered out of band. The chain cannot hand you something it cannot read, so accepting a position is a second transaction. See Buying.
  • Reading your own portfolio requires your own client. There is no explorer view of a private position, for you or for anyone else.
  • Real assets live on a DEX, and a DEX fill is asynchronous. That is why a trade goes through a relay and takes about 2 minutes. See How a Trade Works.