DIA Lumina employs a flexible and trustless system for processing data into final outputs. After Feeders collect and aggregate data, they’re stored in their assigned contract (Pods) on the Lasernet rollup. The final aggregation happens on the meta-contract which collects data from Pods using customizable rules and produces a final value to deliver cross-chain.
Data flow from sourcing to final aggregation on Lasernet
BTC/USD
. The data stored for each entry is the last price of the asset and the timestamp of that price.
uint256
when an update is written to the key-value store.
getValue()
that returns the latest price update stored for the requested asset.
getValue(pairName)
with pairName
being the full pair name such as BTC/USD. The quote asset is always in USD for any asset.
Read
function called getValue()
. It has one parameter pairKey
, which consists of the symbol of the queried asset and /USD
to denominate its price in US Dollars. For instance, the latest Bitcoin price is queried by calling getValue("BTC/USD")
.
The function then returns two values:
admin
address that can setup the meta-contract for its specific usage. The admin is able to add and remove feeders, set a threshold of required feeders, and set a timeout duration after which a feeder update is considered stale.
addOracle()
method. The required parameter of that method is the address of a Pod on Lasernet. After an oracle is added, its latest prices are immediately part of the price evaluation.
getValue()
from the removal block onwards will not include data from the removed feeder any more.