> For the complete documentation index, see [llms.txt](https://docs.uniocean.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uniocean.io/transparency-and-security/pyth-oracle.md).

# Pyth Oracle

Learn how Pyth Network supports price accuracy and settlement transparency.

![Transparency & Security](https://2863428870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F80Mih2wy0x6vMgmpFKdI%2Fuploads%2Fgit-blob-be159fac5cff50f06ab109af2f6c8fdb55a7c89a%2Fdoc-card-08-transparency.png?alt=media)

Uniocean production markets use **Pyth Network** as their settlement oracle, ensuring independence and verifiability. Paper-trading events on the custom Uniocean Testnet use Uniocean's own on-chain oracle instead; see [Paper Trading](/account-and-wallet/paper-trading.md).

## What Is Pyth Network?

Pyth Network provides real-time financial market data to smart contract applications on 100+ blockchains. Data is sourced from 120+ first-party providers, including major exchanges and market makers.

{% hint style="warning" %}
**Pyth Network** is the production settlement oracle. The final value is the price accepted and recorded on-chain for the event's exact scheduled settlement time. Explore a feed-specific page such as [BTC/USD on Pyth Explorer](https://app.pyth.com/explore/Crypto.BTC%2FUSD); replace the feed path for another supported pair.
{% endhint %}

## Why Pyth?

| Property                  | Benefit for Uniocean                             |
| ------------------------- | ------------------------------------------------ |
| Decentralized             | No single source of failure                      |
| High frequency            | Sub-second price updates for accurate settlement |
| Cryptographic attestation | Prices come with verifiable proofs (VAAs)        |
| Broad coverage            | Supports crypto, forex, metals, and equities     |
| Independent               | Platform cannot influence or manipulate prices   |

## How It Works in Uniocean

### During Live Markets

Real-time price data from Pyth feeds directly into the rankings system, updating positions every second as prices move.

### At Settlement

When a market closes:

1. The settlement system requests a Verifiable Attestation (VAA) from Pyth Hermes for the precise close timestamp
2. The Pyth contract checks that the VAA publish time falls within the configured allowance
3. The contract parses the submitted VAA directly and the accepted price is recorded on-chain
4. Anyone can verify the price attestation and the recorded settlement event independently

## Oracle Independence

The platform has no ability to:

* Choose which price to use
* Adjust the settlement price
* Delay price reporting
* Select a favorable timestamp

The settlement price is determined by Pyth Network's aggregated feed and the on-chain timestamp-window validation at the market's predetermined close time.

## Hermes API and Pyth contract

Uniocean's production settlement flow uses Pyth's pull-update integration:

1. Fetch a signed update from [Hermes](https://hermes.pyth.network), using the latest or timestamp-based endpoint.
2. Submit the update bytes to the prediction contract.
3. The prediction contract calls Pyth's `parsePriceFeedUpdates` with the event close time and configured maximum publish time.
4. The accepted feed price is recorded for settlement; the global Pyth price cache is not used for this decision.

Useful references:

* [Hermes latest update API](https://hermes.pyth.network/v2/updates/price/latest)
* [Hermes timestamp update API](https://hermes.pyth.network/v2/updates/price/{publishTime})
* [Hermes feed metadata](https://hermes.pyth.network/v2/price_feeds)
* [Pyth EVM contract addresses](https://docs.pyth.network/price-feeds/core/contract-addresses/evm)

The Pyth contract addresses configured in the repository are:

| Network          | Pyth contract                                |
| ---------------- | -------------------------------------------- |
| Polygon PoS      | `0xff1a0f4744e8582DF1aE09D5611b887B6a12925C` |
| Polygon Amoy     | `0x2880aB155794e7179c9eE2e38200202908C17B43` |
| Arbitrum One     | `0xff1a0f4744e8582DF1aE09D5611b887B6a12925C` |
| Arbitrum Sepolia | `0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF` |

Pyth is not deployed on the custom Uniocean Testnet; paper trading uses Uniocean's own on-chain oracle there. See [Paper Trading](/account-and-wallet/paper-trading.md).

## Live Price Charts

The TradingView-powered charts on market pages display real-time Pyth price data. Users see the same price feed that will determine their final ranking, providing complete visibility during live markets.

## Verification

Users can independently verify any settlement price by:

1. Opening the feed-specific [Pyth Explorer](https://app.pyth.com/explore/Crypto.BTC%2FUSD?t=0) link from the event Rules section; production links append the settlement Unix timestamp as `?t=<unix>`
2. Comparing the feed value against the price recorded in the on-chain settlement event
3. Validating the VAA signature against Pyth's known public keys

***

## Related Pages

* [Oracle Price](/settlement/oracle-price.md)
* [Settlement Process](/settlement/settlement-process.md)
* [Blockchain Transparency](/transparency-and-security/blockchain-transparency.md)
* [Public Verification](/transparency-and-security/public-verification.md)
