[Chainlink] Introducing the Chainlink Feed Registry: A Universal Gateway to Chainlink Price Feeds

As a framework for connecting smart contracts on any blockchain to external data resources, the Chainlink Network is continually improving the developer experience through the addition of new features and capabilities. As a continuation of this goal, we are proud to introduce the Chainlink Feed Registry, an on-chain registry that maps existing token contract addresses to Chainlink Price Feeds. As a result, smart contracts can fetch data from any Chainlink Price Feed through a single universal registry contract, drastically reducing the integration effort of creating hybrid smart contract applications.

As a highly requested feature from smart contract developers, the Chainlink Feed Registry enables developers to query the latest value from Price Feeds by only providing a pair of asset and denomination addresses, without needing to know each Feed’s individual contract address. By removing the need to manually discover and individually connect to Price Feed contracts for each required asset, developers can create smart contract applications that retrieve the latest price of any supported asset in a single call to a single registry contract on-demand. 

This new registry provides a more intuitive and simpler experience in connecting to Chainlink Price Feeds over pre-existing methods which require querying each feed contract directly including filtering Price Feed addresses on the Chainlink Developer Documentation or using the Ethereum Name Service by providing string values. Importantly, as a blockchain-agnostic oracle network, a Chainlink Feed Registry contract will be first deployed onto the Ethereum blockchain and then be expanded to support additional on-chain environments into the future.

In addition to simplifying the development of Chainlinked applications, developers can seamlessly track any and all assets supported by Price Feeds by only needing to feed a token contract address to a single smart contract. This process can be done on-chain from inside of a smart contract or directly by developers by calling a blockchain full node including a self-operated node, blockchain node-as-a-service providers, or trusted block explorers such as Etherscan. Additionally, developers can track when Price Feed contracts are updated using on-chain events, creating more transparency and simplifying the process of indexing Chainlink events across different aggregator contracts common for front-end UIs.

Chainlink Feed Registry
The Chainlink Feed Registry provides a universal gateway to Chainlink Price Feeds

Supporting the Rapid Development and Deployment of Chainlinked Smart Contracts

The Chainlink Feed Registry aims to provide developers the most frictionless and intuitive way to connect their smart contract applications to Chainlink Price Feeds through a single universal gateway. As a result, the rate at which increasingly advanced hybrid smart contract applications can be created can be dramatically increased. In particular, the Chainlink Feed Registry provides developers a number of key features. 

Reduce Integration Effort

Smart contract developers are no longer required to create their own registry mapping contract as they can now leverage the Chainlink Feed Registry to discover and validate the correct Price Feed addresses. This reduces the workload of developers who want to fetch price data as they are not required to discover and connect with each Price Feed contract individually, but can simply feed a pair of asset and denomination addresses to a single on-chain registry contract.

latestRoundData(address base, address quote)

For example, to query the latest value from the LINK/USD Price Feed on the Ethereum mainnet, the only information required by the developer is the LINK token contract address and the USD constant address value.

// Defining the token contract addresses used
address LINK = 0x514910771af9ca656af840dff83e8264ecf986ca;

// Fetch the latest value from the LINK/USD Price Feed
(
  uint80 roundID, 
  int price,
  uint startedAt,
  uint timeStamp,
  uint80 answeredInRound
) = FeedRegistry.latestRoundData(LINK, Denominations.USD);

This enables developers to query Chainlink Price Feeds without requiring prerequisite knowledge of the exact feed contract addresses. The only interactions that are performed are a single method call to a single smart contract with a small amount of data, which can be replicated when fetching data from any Chainlink Price Feed. In addition to reducing integration friction, there are also a number of other key benefits for developers. 

Track Supported Assets

As a global index for Price Feed addresses, the Chainlink Feed Registry can be used by developers to discover a Price Feed for a specific asset pair on a specific blockchain network that their application is operating upon. When a query is performed, either a Chainlink Price Feed contract address or a zero value is returned, providing immediate transparency into the selection of feeds available on that particular blockchain network. Additionally, the registry simplifies the process of creating a subgraph with Chainlink data as registry events can be dynamically indexed into an HTTP API to visualize supported assets in front-end user interfaces. 

Because the Chainlink Feed Registry exists entirely on-chain, it is a censorship-resistant solution that developers can leverage to verify the existence of a specific Price Feed and its corresponding official on-chain address. This provides greater security guarantees as the data stored on blockchain networks (such as the registry) cannot be tampered by any external parties or be changed without notice. 

Track Price Feed Updates

Because the Chainlink Feed Registry contract emits a FeedChanged() event every time an underlying aggregator contract is updated, users can be alerted to any Price Feed upgrades, including changes in the underlying aggregation contract to the latest version such as OCR. Along with new round inspection helpers provided by the Feed Registry, this simplifies the process of indexing Chainlink events across different aggregator contract versions.

By supporting the developer community with features to continuously improve the developer experience, the Chainlink Network becomes easier to integrate than ever, providing a multitude of methods through which developers can create Chainlinked smart contract applications. From reducing integration effort required to consume data from Chainlink Price Feeds to helping protocols find the correct feed for an asset by token address, the Chainlink Feed Registry aims to make the Chainlink ecosystem more flexible and user-friendly for all participants. 

Start building with Chainlink today by visiting the developer documentation, joining the technical discussion on Discord, or connecting with an expert. Get access to ready-made solutions for reliable price feeds and provable randomness

The post Introducing the Chainlink Feed Registry: A Universal Gateway to Chainlink Price Feeds appeared first on Chainlink Blog.

>> View on Chainlink

Join us on Telegram

Follow us on Twitter

Follow us on Facebook

You might also like

LATEST NEWS

LASTEST NEWS