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
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.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.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:
| faucet_id | Asset |
|---|---|
1:0 | BTC/USD |
2:0 | ETH/USD |
3:0 | SOL/USD |
4:0 | BNB/USD |
5:0 | XRP/USD |
6:0 | HYPE/USD |
7:0 | POL/USD |
Deployments
Contract addresses change between testnet iterations. Always refer to the pragma-miden README for the latest deployed addresses.