Skip to main content
Version: 0.14 (unstable)

What are Accounts?

Accounts are the primary actors in Miden. Every entity on the network — wallets, smart contracts, token faucets — is an account. Unlike traditional blockchains where user wallets and smart contracts are fundamentally different, Miden treats them all as programmable accounts with the same structure.

Each account is an independent state machine that executes transactions locally and generates a zero-knowledge proof of correct execution. This means accounts never share a global execution environment — they run in isolation, which enables parallel execution and privacy by default.

Anatomy of an account

Every account has four parts:

PartDescription
CodeOne or more components that define the account's behavior — its public API and internal logic
StoragePersistent state — up to 255 typed slots of Value or StorageMap
VaultThe fungible and non-fungible assets the account holds
NonceA counter that increments exactly once per state change, providing replay protection

The network doesn't store the full account state. Instead, it stores cryptographic commitments — hashes of the code, storage, and vault (see account design). Only the account owner (or a public account's observers) sees the actual data.

Components, not contracts

On Ethereum, a smart contract is a single monolithic unit of code deployed to an address. On Miden, accounts are composed of components — reusable modules that each contribute their own storage layout and exported procedures.

use miden::{component, Asset};

#[component]
struct MyWallet;

#[component]
impl MyWallet {
pub fn receive_asset(&mut self, asset: Asset) {
self.add_asset(asset);
}
}

An account can have multiple components. For example, a DeFi account might combine a wallet component (for holding assets), an auth component (for signature verification), and custom application logic — all in a single account. Components communicate with each other through cross-component calls using WIT (WebAssembly Interface Types) bindings.

Account types

Accounts are configured by type and storage mode:

TypeDescription
RegularAccountUpdatableCodeStandard account — code can be updated after deployment
RegularAccountImmutableCodeAccount with fixed code — cannot be changed after deployment
FungibleFaucetMints and burns fungible tokens
NonFungibleFaucetMints and burns non-fungible tokens (NFTs)

Storage mode controls privacy:

ModeDescription
PublicFull state is stored on-chain and visible to everyone — suitable for shared protocols like DEXs and faucets
PrivateOnly a state commitment is stored on-chain — the actual data stays with the account owner

How accounts differ from EVM contracts

EVMMiden
ExecutionEvery validator re-executes every transactionAccount owner executes locally, submits a ZK proof
State visibilityAll state variables are public on-chainState is private by default (only commitments on-chain)
Code structureMonolithic contract deployed to an addressMultiple reusable components composed into one account
IdentityWallets are EOAs, contracts are separateEverything is an account — wallets are smart contracts
Failurerevert consumes gas, leaves an on-chain traceProof cannot be generated — no on-chain trace, no cost