# Chainlink & Datafeeds

## Overview

Celestium games that depend on real-world prices — the [Predict Game](/dexgames/games-guide/predict-game.md) is the headline example — read those prices from Chainlink datafeeds. A Chainlink datafeed aggregates pricing from many independent sources and publishes a tamper-resistant value that any smart contract can consume.

## Reliable Price Data

Each Chainlink price feed pulls from premium data providers and runs the inputs through a decentralized network of oracle nodes. The published value is an aggregate the contract can read in a single call. There is no intermediary that can substitute a different number; the feed is its own source of truth.

## How It Works

1. **Aggregation** — independent oracle nodes pull the latest price from multiple data sources.
2. **Consensus** — nodes submit values on-chain; the feed contract aggregates them into a single canonical price.
3. **Consumption** — the Celestium game contract reads the canonical price at round-close time and uses it to settle the round.

<figure><img src="/files/1JpWAUor7w93cXlVpwAK" alt=""><figcaption><p>BTC/USD datafeed — example of a Chainlink price feed Celestium reads to settle Predict rounds</p></figcaption></figure>

## References

* Chainlink datafeeds — full list and live prices: <https://data.chain.link/>
* BTC/USD on Polygon — the canonical feed used to settle Predict rounds.

## Benefits

* **Reliability** — the published price reflects the live market within tight tolerances.
* **Security** — decentralized verification by independent oracle nodes prevents any single party from manipulating the value Celestium contracts consume.


---

# Agent Instructions: 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:

```
GET https://docs.celestium.digital/dexgames/proof-of-fairness/chainlink-and-datafeeds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
