Skip to content
Oracle infrastructure · DeFi data layer

DIA oracle ported to Midnight in Compact

25
DIA price feeds live on Midnight
100+
feeds the stack is designed to scale to

Midnight is not an EVM chain: it uses Compact, its own smart contract language, and a distinct operator and SDK model, so DIA's existing oracle could not be redeployed as-is. Protofire partnered with DIA to stand up a shared oracle stack on Midnight: DIA's oracle contract logic re-expressed in Compact, automated feeders on the MidnightJS SDK aggregating market data from multiple independent sources, a containerized deployment, and health and price-consistency monitoring. The oracle Protofire built and operated served 25 asset price feeds with 5-30 second update cycles, live end to end in 61 days.

Snapshot
Client
DIA (cross-chain oracle provider) and Midnight Network (data-protection blockchain in the Cardano/IOG ecosystem)
Sector
Oracle infrastructure / DeFi data layer

DIA's oracle contracts and feeder infrastructure, proven on other networks, could not be redeployed as-is on a non-EVM chain.

01

Why Midnight needed an oracle layer before DeFi could ship

Midnight is a data-protection blockchain in the Cardano and Input Output (IOG) ecosystem, built to let applications handle sensitive data with cryptographic guarantees. Its developer ecosystem was growing, but it had no standardized oracle interface and no shared on-chain market-data layer.

Without one, each team building a DEX or a lending market would have to source, deploy, and operate its own price feeds, duplicating effort, spreading inconsistent data standards, and multiplying the security and maintenance surface. For a chain trying to attract financial applications, that gap was a direct constraint on adoption. The task was to stand up oracle infrastructure every team could use through one interface.

02

The barrier: DIA's oracle stack does not run on Midnight unchanged

DIA's oracle contracts and feeder infrastructure, proven on other networks, could not be redeployed as-is on a non-EVM chain. The contract logic had to be re-expressed in Compact, and the off-chain feeders that push prices on-chain rebuilt against the MidnightJS SDK rather than an EVM client.

An oracle also holds live production responsibility from day one: if a feeder stalls or a source diverges, downstream protocols price against stale data. So the work was not only a port, but one that had to be observable and operable in production.

03

How Protofire deployed DIA oracle infrastructure on Midnight

Protofire delivered the oracle as a full stack, not just contracts. The team re-expressed DIA's oracle contract logic in Compact and rebuilt the off-chain feeders on the MidnightJS SDK, pulling market data from multiple independent sources, including DIA and Lumina, so no single provider is a single point of failure.

The deployment was containerized so additional independent operators can run the same feeder image. Monitoring covers feeder health, update frequency, and price consistency across sources, so an operator sees a stalled or diverging feed before a downstream protocol does. Deployment scripts and documentation let operators and developers use the oracle through a standardized interface.

Protofire builds on and operates the DIA (diadata) platform across new chains. Its public forks in the Protofire GitHub org include chain-specific deployments the team built and runs, such as diadata-stacks (Stacks), diadata-alephium (Alephium), and diadata-hydration-bifrost. These are analogous prior deployments on other networks, not the Midnight work itself, but they show the repeatable pattern: take DIA's platform, build the chain-specific scrapers and feeders, and operate them. Midnight applies it in Compact and MidnightJS.

04

Results

On the DIA-based oracle Protofire built and operated on Midnight:

These figures describe what Protofire built and operated on Midnight. The architecture is designed to scale to 100+ assets without a redesign; that 100+ figure is a design target, not a delivered count. See the proof pack for the public artifacts behind Protofire's DIA oracle engineering.

MetricValue
Asset price feeds live25
Time to deploy end to end61 days
Oracle update cycle5-30 seconds
Data sources aggregatedMultiple independent sources (including DIA and Lumina)
05

Proof pack

Public forks in the Protofire GitHub org, where Protofire builds on and operates the DIA (diadata) platform:

These repositories evidence Protofire's oracle-porting and feeder engineering on the DIA platform and on other chains, the same pattern applied to Midnight. The Compact contracts and the Midnight feeders are not in a public repository; the Midnight feed count, the 61-day timeline, and the update cycles come from the oracle Protofire built and operated on Midnight.

github.com/protofire/diadata is Protofire's fork of the DIA (diadata) platform. It contains both DIA's oracle contracts (Solidity) and DIA's Go feeder/scraper platform, the base Protofire builds on and operates when porting the oracle to new chains.
github.com/protofire/diadata-stacks is an analogous prior DIA deployment Protofire built and operated on the Stacks chain (a different, non-Midnight network), with Protofire-built feeder and scraper integrations (for example the Bitflow and Velar source integrations). Cited as an example of the per-chain feeder pattern.

Technology stack

DIA (diadata) platformCompact smart contractsMidnightJS SDK feederscontainerized deploymentmonitoring

FAQ

Did Protofire build DIA or Midnight?
No. DIA builds the oracle protocol and Midnight Network builds the chain. Protofire re-expressed DIA's oracle contract logic in Compact, built the automated feeders on the MidnightJS SDK, and added the monitoring and deployment tooling. Our work is the deployment and operation of DIA's oracle on Midnight, not the underlying oracle protocol or the chain.
What did Protofire deliver on Midnight?
An operational oracle stack: DIA oracle contract logic in Compact, containerized automated feeders aggregating data from multiple independent sources, monitoring for feeder health and price consistency, and deployment scripts plus documentation. The initial deployment ran 25 asset price feeds with 5-30 second update cycles, delivered end to end in 61 days.
How many assets can the oracle support?
The initial deployment launched 25 feeds. The architecture is designed to scale to 100+ assets without a redesign. That 100+ figure is a design target, not a delivered count.

Book a call with Alejandro Losa

Schedule a call with our Web3 Solution Architect to receive practical recommendations and a prompt proposal for upgrading your solution.

Protofire 2026. All rights reserved

Message us on Telegram