Zeeshan Hanif
Zeeshan Hanif

Reputation: 48

Implementation of Chainlink Feed Aggregator

I'm trying to implement chainlink feed aggregator just like it is for ETH and other price feed provided by chainlink.

I have found this FluxAggregator in version 0.6 but currently chainlink has version 0.8 and there is no FluxAggregator in 0.8. https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.6/FluxAggregator.sol

Also I found this FeedRegistry Repo https://github.com/smartcontractkit/feed-registry This repo has FeedRegistry.sol contract which is implementing 'AggregatorV2V3Interface.sol' from version 0.7 of chainlink.

So its all mixed up and I'm not sure what is the right path to look for implementation of Aggregator

Upvotes: 0

Views: 972

Answers (1)

Zak Ayesh
Zak Ayesh

Reputation: 631

The current version of aggregation used is called "OCR" or "Off-Chain Reporting". FluxAggregator was the previous aggregation method. The code and contracts for OCR can be found in this repo:

https://github.com/smartcontractkit/libocr

Running your own feeds isn't officially supported yet (this is being worked on), so there isn't any documentation, but it is possible to run your own feed using that code if you really need to. You could also aggregate a couple of "Chainlink AnyAPI" requests in your contract to simulate a feed.

If this is for a hackathon (or just to demo your app) and there's no existing data feed for the data you need, I'd suggest using the "AnyAPI" feature and a single Chainlink node, so you can focus on your application and not on building an oracle network. Once it's time to go to production/mainnet, the Chainlink Labs team can assist you in making a decentralized oracle network. You can reach them here on the Chainlink website.

Reference: OCR Announcement Blog

Upvotes: 1

Related Questions