Now, let's suppose you're building a DeFi dapp, and want to give your users the ability to withdraw ETH worth a certain amount of USD. To fulfill this request, your smart contract (for simplicity's sake we'll call it the "caller contract" from here onwards) must know how much one Ether is worth.
And here's the thing: a JavaScript application can easily fetch this kind of information, making requests to the Binance public API (or any other service that publicly provides a price feed). But, a smart contract can't directly access data from the outside world.
Now we could build a JavaScript application ourselves, but then we are introducing a centralized point of failure! We also couldn't just pull from the Binance API, because that would be a centralized point of failure!
So what we want to do, is get our data from both a decentralized oracle network (DON) and decentralized data sources.
Chainlink is a framework for decentralized oracle networks (DONs), and is a way to get data in from multiple sources across multiple oracles. This DON aggregates data in a decentralized manner and places it on the blockchain in a smart contract (often referred to as a "price reference feed" or "data feed") for us to read from. So all we have to do, is read from a contract that the Chainlink network is constantly updating for us!
Using Chainlink Data Feeds is a way to cheaply, more accurately, and with more security gather data from the real world in this decentralized context. Since the data is coming from multiple sources, multiple people can partake in the ecosystem and it becomes even cheaper than running even a centralized oracle. The Chainlink network uses a system called Off-Chain Reporting to reach a consensus on data off-chain, and report the data in a cryptographically proven single transaction back on-chain for users to digest.
You can then make protocols like Synthetix, Aave, and Compound with this!

You can see visualizations of some of these DONs here.
We'll go into exactly how these networks tick in later lessons.
So, let's learn how to read from one of these data feeds!
The first thing we want to do, is start our contract and import the Chainlink code.
Now to have our contract pull the price from another contract, we need its interface / ABI. Although... where we currently are, we aren't sure what the interface of a Chainlink Data Feed contract is? How do we get that?
Did you know, you can actually import code from outside your contracts? I know it's amazing right! Often times you don't have to have every piece of code directly in your project, you can borrow it from other applications!
We want to import the AggregatorV3Interface from the Chainlink GitHub repository. This interface will include all the functions that we need to interact with a Chainlink Data Feed contract, including functions like latestRoundData() which will return all the information we need.
Here is what the full interface looks like: