pyth-evm

Fetch Hermes price updates and submit them to Pyth on-chain feeds atomically.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/labsaistudio/AABC-Labs --skill pyth-evm-labsaistudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyth-evm
Source: https://github.com/labsaistudio/AABC-Labs/tree/main/backend/agent/skills/catalog/pyth-evm
Command: npx skills add https://github.com/labsaistudio/AABC-Labs --skill pyth-evm-labsaistudio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables DeFi protocols and on-chain applications to obtain fresh price data by pulling updates from Hermes and submitting them on-chain in an atomic operation, eliminating stale price issues.

Core Features & Use Cases

  • Atomic update and read: submit price updates and read the resulting price in a single transaction to prevent front-running.
  • Hermes-driven feeds: fetch latest price updates for multiple feeds (ETH/USD, BTC/USD, etc.) and apply them on-chain.
  • Flexibility and safety: supports sponsored feeds on certain chains and validates price freshness, confidence, and exponent handling.

Quick Start

Fetch Hermes price updates for your feeds, submit them on-chain, and read the latest prices in one atomic transaction.

Frequently Asked Questions about pyth-evm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch Pyth price feeds and update them on-chain in a single EVM transaction?

You can prevent stale on-chain pricing by fetching Hermes updates and submitting them to Pyth's on-chain price feeds in a single atomic transaction, eliminating stale price issues.

Why does my on-chain DeFi protocol read stale Pyth price data?

On-chain DeFi protocols read stale Pyth price data when they lack fresh Hermes updates. Fetching and submitting these updates atomically eliminates stale price issues.

What is the difference between getPriceNoOlderThan and getPriceUnsafe when reading Pyth feeds?

getPriceNoOlderThan validates price freshness by enforcing a time threshold, while getPriceUnsafe reads the latest available price without freshness checks to balance safety and performance.

How do I calculate the gas fee for submitting Pyth Hermes updates on-chain?

Calculate the gas fee for submitting Pyth Hermes updates on-chain by calling the getUpdateFee function, which provides dynamic fee calculation for predictable gas usage during atomic transactions.

Can I update and read multiple Pyth feeds like ETH/USD and BTC/USD in one transaction?

You can update and read multiple Pyth feeds like ETH/USD and BTC/USD in one transaction by fetching Hermes updates and applying them on-chain atomically, preventing front-running in DeFi protocols.

What are the limitations of using getPriceUnsafe for on-chain price reads?

Using getPriceUnsafe for on-chain price reads carries the limitation of skipping freshness and confidence validation, exposing DeFi protocols to stale data if not paired with explicit time checks.