Smart contracts on blockchains need to know the prices of assets, like the price of Bitcoin or Ethereum, to work properly. But since blockchains can’t directly access information from the outside world, they use something called oracles to get this data.
Oracles are like messengers that bring real-world data, such as asset prices, into the blockchain. For example, if a smart contract needs the current price of Ethereum, the oracle gets this information from sources like exchanges.
Imagine you want to borrow some money using your Ethereum as collateral. The smart contract needs to know the current value of your Ethereum to decide how much money it can lend you. It asks the oracle for the price, gets the data, and then uses that information to make the loan decision.