> For the complete documentation index, see [llms.txt](https://colend.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://colend.gitbook.io/home/resources/oracles.md).

# 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](https://pyth.network/developers/price-feed-ids). Both enhances security by [aggregating prices](https://pyth.network/benchmarks) 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**

1. **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.
2. **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.
3. **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.
4. **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](https://pyth.network/developers/price-feed-ids) and [Switchboard Oracle](https://switchboard.xyz/) 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](https://switchboard.xyz/) integration offers more adaptability and quicker listing of new assets, thereby providing additional robustness and responsiveness to market changes.\
\
[Apro Oracle](https://www.apro.com/) 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.

<figure><img src="https://906943598-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOZpYKo0VFE3Pj3XDTtL7%2Fuploads%2Fgit-blob-d182413d77d97bf04d3b029b00a4908fd240095b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

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.

{% tabs %}
{% tab title="Core Market" %}

<table><thead><tr><th width="136">Token</th><th width="177">Oracle 1</th><th>Oracle 2</th><th>Oracle 3</th></tr></thead><tbody><tr><td>ABTC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x75BA7d6A49cDc382401AD97348d56ed0f6D846e7</td><td></td></tr><tr><td>AUSD</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x396861A1a9190CA43E1046a31eff98CF8492a265</td><td></td></tr><tr><td>BTCB</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>CLND</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0xf08E62F2002Db9A21bF89011D69Bb7421e140F98</td><td></td></tr><tr><td>COREBTC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>SolvBTC.b</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>SolvBTC.m</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>stCORE</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x9aeff0c72d3c8e9C84941a85DA18D46d77E58635</td><td></td></tr><tr><td>USDC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x4aF9fAFbb7fEe76655F2D328c2f9b9a5BD49a4d9</td><td></td></tr><tr><td>USDT</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x992388eeEc9F2b0e44059113f2c84e5dA44293db</td><td></td></tr><tr><td>WBTC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0xd3728954aB2fDbDddDC4651E4Ce061A690c4Cb14</td><td></td></tr><tr><td>WCORE</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td>0x95CF37918d09006abA83e51b13F7B721D55cd300</td><td></td></tr><tr><td>WETH</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="BTC Market" %}

<table><thead><tr><th width="136">Token</th><th width="177">Oracle 1</th><th>Oracle 2</th><th>Oracle 3</th></tr></thead><tbody><tr><td>BTCB</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>COREBTC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>PUMPBTC</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>SolvBTC.B</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>SolvBTC.CORE</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr><tr><td>WCORE</td><td>0xA2aa501b19aff244D90cc15a4Cf739D2725B5729</td><td></td><td></td></tr></tbody></table>

{% endtab %}
{% endtabs %}
