Oracles
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 and Switchboard, for price reporting. Both 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 and Switchboard 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.
Integration of Complementary Oracles
To further enhance the flexibility and responsiveness, Switchboard offers greater adaptability and quicker listing of new assets, thereby providing additional robustness and responsiveness to market changes. Switchboard integration offers more adaptability and quicker listing of new assets, thereby providing additional robustness and responsiveness to market changes. Apro Oracle has recently been integrated as a complementary oracle on Colend. With a growing focus on the BTCFi ecosystem, Apro brings a differentiated approach by also verifying the underlying asset. This methodology adds an extra layer of security, particularly suited to the unique risks of Bitcoin-native assets.
The Inception Oracle
In addition to integrating complementary oracles, Colend employs a multi-layered fallback mechanism that can incorporate up to 3 oracles. This system is designed to ensure continuity in price feed delivery. If the primary oracle fails due to downtime or incorrect data, the protocol automatically switches to a secondary oracle, and if needed, to a third one. This layered setup enhances resilience and ensures uninterrupted access to accurate pricing.
This design is crucial because it ensures that our protocol remains robust and continues to operate smoothly. In the unlikely event that both oracles encounter issues, we have a contingency plan in place: the ability to pause the protocol. This feature allows us to protect users and their assets until we can resolve any data discrepancies.
By not relying solely on a single data provider, we build a more resilient price feed system that enhances the security of our lending protocol named "Inception Oracle" which will allow to secure assets with 3 fallback oracles. With this strategy, we not only maintain data integrity but also foster trust and confidence among our users, knowing that their transactions are backed by reliable price information.
Last updated
Was this helpful?