Skip to main content
Mezo provides market data through two oracle systems: Skip Connect for BTC/USD and Pyth Network for additional price feeds.

Overview

Skip Oracle

The Skip oracle provides native BTC/USD price feeds on Mezo through a Chainlink-compatible aggregator interface.
string
BTC/USD only
string
Every block

Pyth Oracle

The Pyth oracle provides multiple price feeds beyond BTC/USD. Update frequency: Depends on the tokens pair.
Price is being updated when price_deviation deviates more than a set threshold (in percentage points) or every time_difference seconds, whichever is first.

Best Practices

When building dApps that consume oracle data, follow these guidelines:
  • Validate freshness: Always check timestamps and block numbers to detect stale data. Set appropriate staleness thresholds for your use case.
  • Set price bounds: Implement sanity checks on price values to detect anomalies or manipulation attempts.
  • Monitor market conditions: Be aware of volatility, liquidity, and potential manipulation events that may require pausing your application.
  • Security audits: Ensure your contracts and dependencies meet security standards. Audit code that handles oracle data to prevent exploits.

Reading Price Feeds

Using Skip Oracle (BTC/USD)

The Skip oracle implements a Chainlink-compatible interface. Call latestRoundData() to retrieve the latest price: Contract: 0x7b7c000000000000000000000000000000000015 Return values:
uint256
The round ID when the price was updated
int256
The BTC/USD price (use decimals() to get the decimal precision)
uint256
Unix timestamp when the round started
uint256
Unix timestamp when the round was last updated

Using Pyth Oracle (Multiple Feeds)

Pyth provides multiple price feeds through its EVM contracts. Use getPriceNoOlderThan(pair_id, maxAgeSeconds) to fetch prices with built-in staleness checks.

Contract Addresses

Contract Mezo Mainnet: 0x2880aB155794e7179c9eE2e38200202908C17B43 Contract Mezo Testnet: 0x2880aB155794e7179c9eE2e38200202908C17B43 Contract Ethereum Mainnet: 0x4305FB66699C3B2702D4d05CF36551390A4c69C6 Contract Ethereum Sepolia: 0xDd24F84d36BF92C65F92307595335bdFab5Bbd21

Example Implementation

Example to fetch the price for a given price id:
Reference: getPriceNoOlderThan API documentation

Offchain Price Data

You can query price feeds and metadata directly from the Pyth Network without interacting with the blockchain:

Available Price Feeds

Skip Oracle Feeds

Available on both Mezo mainnet and testnet:

Pyth Oracle Feeds

Available on:
  • Mezo Mainnet at 0x2880aB155794e7179c9eE2e38200202908C17B43
  • Mezo Testnet at 0x2880aB155794e7179c9eE2e38200202908C17B43
  • Ethereum Mainnet at 0x4305FB66699C3B2702D4d05CF36551390A4c69C6
  • Ethereum Sepolia at 0xDd24F84d36BF92C65F92307595335bdFab5Bbd21

Supported Price Feed IDs (Mezo)

Supported Price Feed IDs (Ethereum)

Requesting additional price feeds: To enable additional Pyth price feeds, browse the complete list of available price feed IDs and contact the Mezo team to request onchain activation.