Pragma on Miden
A native oracle implementation for Miden — decentralized, verifiable, and designed around Miden’s actor model and client-side proving architecture.
What is Pragma Miden?
Pragma Miden brings Pragma’s oracle infrastructure to Miden, a zero-knowledge rollup that rethinks blockchain architecture around privacy and parallel execution. On Miden, each account is an independent state machine. Transactions are executed and proven locally by the client — the network only stores cryptographic commitments, never raw state. This enables parallel transaction processing and strong privacy guarantees by default. Pragma Miden is built directly on top of this model: publishers write prices to their own accounts via self-transactions, and the oracle aggregates across all registered publishers at query time using Foreign Procedure Invocation (FPI) — no off-chain intermediary, no trusted aggregator.Architecture
Oracle Account
Maintains a registry of trusted publisher account IDs. Computes the median price on demand by reading across all publisher accounts via FPI.
Publisher Accounts
Each publisher is a Miden account that owns its own storage. Publishers write price entries via self-transactions — local execution, STARK-proven, submitted to the network.
How it works
1
Publishers push prices
A publisher executes a self-transaction locally, proven by the Miden VM. The transaction calls
publish_entry on the publisher’s own account, writing a (pair, price, decimals, timestamp) word into its storage map.2
Oracle aggregates on query
When a consumer calls
get_median, the oracle account uses FPI to read the latest entry from each registered publisher account. It then computes the median across all available prices — fully on-chain, with the result verifiable by the Miden proof system.3
Result returned on the stack
The oracle returns
is_tracked and median_price on the Miden VM stack. Because the entire computation is locally proven, the consumer can verify correctness without trusting any third party.Live oracle
The Pragma-owned oracle is running on Miden testnet, fed by the samepragma-sdk price-pusher we use for Starknet. You can browse live medians at miden.pragma.build.
The testnet runs Miden node 0.17 (since October 2026, after a chain reset): clients must be on miden-client 0.17 / pragma-sdk >= 2.16.3. Every transaction pays a small fee in the chain’s native asset (a 14-entry publish costs ~112 base units); reads through get_median are free. Publishers fund their account from the public faucet, the price-pusher does it automatically.
Asset IDs (faucet_id)
Pragma Miden identifies assets with aprefix:suffix format. On the Miden stack the pair is the word [0, 0, suffix, prefix] (push.0.0.{suffix}.{prefix} in MASM, prefix on top):
The
faucet_id of a pair is permanent: an index is never reassigned to another asset and never reused, even if Pragma stops publishing its pair. New pairs always take the next free index, so you can pin an index in your contracts.
6:0 to 14:0 are Miden-only feeds: Pragma publishes them on Miden but not on Starknet. Decimals follow pragma-sdk’s min(base.decimals, quote.decimals), so most pairs use 8 and USDT/USD / USDC/USD / XAUT/USD use 6 — always read the decimals of the pair you consume rather than hardcoding it.
The list is driven by pragma-sdk’s STARKNET_PAIR_TO_MIDEN_FAUCET mapping; new pairs land there first.
Deployments
Contract addresses change between testnet iterations. Always refer to the pragma-miden README for the latest deployed addresses.