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.Asset IDs (faucet_id)
Pragma Miden identifies assets with aprefix:suffix format, corresponding to the [prefix, suffix, 0, 0] word pushed onto the Miden stack:
Deployments
Contract addresses change between testnet iterations. Always refer to the pragma-miden README for the latest deployed addresses.