Oracle
What is a Price Oracle?
In lending protocols, determining the price of an asset is crucial, and this is where a price oracle comes into play. A price oracle fetches prices either on-chain or off-chain to provide the necessary data.
On-Chain vs. Off-Chain Oracles
On-chain oracles have encountered numerous issues, including susceptibility to price manipulation. To address this, our protocol relies on an off-chain oracle, Pyth, for price reporting. Pyth enhances security by aggregating prices from various trusted sources, including exchanges and financial institutions, to ensure accurate and reliable data.
Motivations for Using a Pull Oracle over a Push Oracle
Security Advantages
Data Integrity: With a pull model, the protocol actively requests the latest price data when needed, ensuring that it always uses up-to-date information. This reduces the risk of using stale or outdated data.
Reduced Attack Surface: In a push model, oracles continuously send data to the protocol, which can increase the attack surface. A pull model minimizes this risk as the data is only fetched when necessary, reducing the opportunities for attackers to manipulate the price feeds.
Control Over Data Retrieval: The pull model allows the protocol to control when and how often it queries the oracle, providing flexibility in managing data requests and reducing unnecessary network load.
Enhanced Validation: Pulling data on-demand allows for immediate validation and comparison with other sources, enhancing the accuracy and reliability of the price data used in the protocol.
By using Pyth Oracle with a pull approach, our protocol benefits from enhanced security, reliable data aggregation, and robust mechanisms to prevent price manipulation, ensuring a more secure and trustworthy lending platform.
Last updated