What Is the Difference between an On-Chain and Off-Chain Data Source for an Oracle?
An off-chain data source is any data existing outside the blockchain, such as a price from a CEX or a weather API. An on-chain data source is information already present on the blockchain itself, like the token balance of a wallet or the transaction history of a DEX.
Oracles primarily focus on bridging the gap for off-chain data. However, an on-chain source can still be manipulated if it is a low-liquidity DEX pool, which is then incorrectly used as the single price feed.