Data feeds
Smart contracts crucially need off-chain data to build real-world applications, such as DeFi applications. Data feeds are the main mechanisms that meet this need. A data feed is essentially a bridge between a chain and the real-world that actively serves the latest off-chain data.
Nodary uses the Beacon framework to build data feeds, which is a modular type of data feed that was developed by API3 to make data feed deployment efficient.
How does it work?
Beacons follow a set of update rules to update on-chain data with Airnode. Once an update rule is satisfied, on-chain data is updated as soon as possible with the latest data provided by the Nodary API.
Update rules
Beacons are updated based on 3
conditions. Heartbeat interval
, deviation threshold
, and amount in the corresponding sponsor wallet. With an adjustable period, the deviation between Beacon data and the corresponding off-chain data is calculated. If the deviation exceeds a predetermined threshold, which is 1%
, and the sponsor wallet has enough currency, the Beacon is updated. If there is no deviation between beacon data and off-chain data, every 86400
seconds (equals to 1 day
), the Beacon is updated, of course, if the corresponding sponsor wallet
is funded. See Sponsors
section for each data feed in here.
Optimized update rules provide,
- 📈 Less and meaningful updates
- 🚦 Less data traffic on network
- 👛 Decreased gas costs