OP-PIP-82: Pythnet Upgrade to Enable Zero Value in Confidence Interval

Abstract

This proposal upgrades the Pyth oracle program to support aggregating a publisher prices with zero CI.

Rationale

There are some feeds that are being sourced from third-party APIs (ACRED/USD.NAV) or smart contracts (wstETH/stETH.rr) that have fixed values and because the value is fixed non-zero confidence has always been confusing. In addition to that, the oracle does not allow a publisher price update if price < 3*conf and that means the oracle can never publish price of zero.

Description

This proposal upgrades the Pyth oracle program with the following major change:

  • Add flag to allow zero CI - PR 429

For the list of all the changes, please see the release notes of the new oracle from here.

Implementation Plan

Proposal id: 8gaPwuv5XcxT3ozApiZBKDCLwqTBUtm2ZiX22exCwGbT

Verify the implementation following the guide below:

  1. Make sure you have git, Docker and sha256sum.

  2. git: install git from here

  3. Docker: install it from here

  4. sha256sum: if on Mac you can install it as a part of coreutils with brew install coreutils

  5. Clone the pyth-client repo (git clone)

  6. Go to the pyth-client directory and checkout to oracle v2.35.0 release by running git checkout oracle-v2.35.0-2 command.

  7. run the following command: docker build -f docker/Dockerfile --platform=linux/x86_64 --progress=plain .

  8. Upon a successful build, you should see the following messages containing the hash digest of the program. Please note that you check the hash of pyth_oracle.so (and not other files)

    
    sha256sum ./target/deploy/pyth_oracle.so
    <hash-digest> ./target/deploy/pyth_oracle.so
    
    
    
  9. Check that the hash digest matches the hash digest of the buffer deployed on Pythnet. Get the buffer account from the proposal and fetch the digest of the program in the buffer account by running the following command:

    
    solana -u <https://api2.pythnet.pyth.network> program dump <BUFFER> temp_file
    sha256sum temp_file
    rm temp_file
    
    
    
  10. Make sure the hash from step 8 and from step 9 match

  11. Make sure the buffer authority is the oracle authority. You can verify the authority by going to the solana explorer with https://api2.pythnet.pyth.network as a custom RPC and check the upgrade authority of the oracle program (FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH ) and the buffer.

2 Likes