> For the complete documentation index, see [llms.txt](https://cll-devrel.gitbook.io/bootcamp-2024/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cll-devrel.gitbook.io/bootcamp-2024/3.-oracles-erc20-and-chainlink-data-feeds/oracles.md).

# Oracles

{% embed url="<https://www.youtube.com/live/uULPXQBMBpc?si=iQQROG-vwruGILRW>" %}
Oracles, ERC20 Tokens, and Chainlink Data Feeds
{% endembed %}

{% embed url="<https://chain.link/education-hub/oracle-problem>" %}
Link to blog.chain.link
{% endembed %}

The <mark style="color:blue;">**blockchain oracle problem**</mark> is a significant issue that stems from the inherent design of blockchains which, much like a <mark style="color:red;">computer without an internet connection</mark>, <mark style="color:orange;">cannot access external data.</mark> This <mark style="color:red;">limitation</mark> poses a major hurdle for the wide-scale adoption of smart contracts on platforms like Ethereum. These contracts, which hold the potential to redefine contractual engagements and value exchange across numerous industries, require a bridge to the broader digital economy—an ever-expanding reservoir of data and APIs from the internet-connected world.

## **What is the Oracle Problem?**

<mark style="color:blue;">Blockchains are secure and reliable due to their isolated nature</mark>, which restricts them to internal data only, avoiding external uncertainties. However, this <mark style="color:orange;">isolation limits the functionality of smart contracts</mark> significantly, as many applications, from finance to insurance, depend on real-time data from external sources like market information or IoT devices. Bridging this gap requires an external infrastructure component known as an oracle.

## **The Role of a Blockchain Oracle**

Oracles act as middleware, facilitating communication between on-chain and off-chain environments. They perform several critical functions:

* <mark style="color:blue;">**Listening**</mark>**:** Detecting when the blockchain needs external data.
* <mark style="color:blue;">**Extracting**</mark>**:** Fetching this data from off-chain sources.
* <mark style="color:blue;">**Formatting**</mark>**:** Converting the data into a blockchain-compatible format.
* <mark style="color:blue;">**Validating**</mark>**:** Ensuring the data's integrity through cryptographic proofs.
* <mark style="color:blue;">**Computing**</mark>**:** Carrying out necessary computations off-chain to maintain scalability and security.
* <mark style="color:blue;">**Broadcasting**</mark>**:** Sending the verified data back to the blockchain.
* <mark style="color:blue;">**Outputting**</mark>**:** Delivering outcomes based on smart contract executions to external systems.

## **Challenges and Security Concerns**

The integration of oracles into blockchain architecture introduces various challenges:

* <mark style="color:blue;">**Security and Reliability**</mark>**:** Blockchains avoid external data to maintain security and consensus integrity, but smart contracts need this data to function effectively. Thus, oracles must provide robust security measures to prevent data manipulation or loss.
* <mark style="color:blue;">**Decentralization and Quality Control**</mark>**:** Relying on external data sources requires high-quality, reliable inputs, which is challenging to ensure across decentralized networks. Centralized oracles present single points of failure and are prone to attacks and downtime, compromising the reliability of smart contracts.

## **Chainlink's Solution**

Chainlink addresses these challenges with its decentralized oracle networks (DONs). It employs a combination of:

* <mark style="color:blue;">**Open-source technology**</mark> for transparency and community engagement.
* <mark style="color:blue;">**Decentralization**</mark> at both node and data levels to avoid single points of failure.
* <mark style="color:blue;">**Data signing**</mark> and **service agreements** to verify data integrity and enforce quality.
* <mark style="color:blue;">**Reputation systems**</mark> and **certification services** to assess and enhance node reliability.
* <mark style="color:blue;">**Advanced cryptography**</mark>**&#x20;and hardware** to secure data transmission and verify its origins.

By leveraging these techniques, Chainlink enables smart contracts to securely and reliably interact with external data, fostering a more robust environment for the future of blockchain-based automation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cll-devrel.gitbook.io/bootcamp-2024/3.-oracles-erc20-and-chainlink-data-feeds/oracles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
