Assay
$ASSAYSoon

Concepts

Observations

How signed Pyth updates reach a pool, and why one honest poster is enough.

What an observation is

An observation is one Solana transaction that carries one signed Pyth Pro message. The message holds the prices of the stock, both wrappers and the xStocks ratio, each with its confidence and update time, and the stock’s market session.

  1. 1. Compute budgetSets the compute limit.
  2. 2. Ed25519 signature checkSolana’s native program checks Pyth’s signature over the message in the next instruction.
  3. 3. observe(message)Assay verifies the signer through Pyth Lazer, reads the four feeds, computes d and moves the streak.
One observe transaction. The message is 272 bytes and serves every pool.

The program checks, in order, that:

  1. Pyth’s signature is valid, through the Pyth Lazer program on Solana.
  2. The message is fresh: its timestamp is within the pool’s update-age limit of the chain clock, and every feed in it is equally fresh. A ratio feed may be up to a day old, since it only moves on corporate actions.
  3. The message is newer than the last observation the pool accepted.
  4. The stock’s session is one the pool admits.
  5. Every price carries a confidence value, so the conservative edges cannot be erased.

Then it computes d at the three edges, classifies the reading and moves the streak.

Anyone can post

observe is permissionless. The Assay service posts observations on its own, but it does not have to be trusted:

  • A failing observation from anyone extends a streak. A buyer does not need the service to post it.
  • A clear pass from anyone resets a streak. An underwriter does not need the service either.

The honest side needs only one poster. Posting costs about 0.000005 SOL, plus 1 lamport to Pyth.

Only steady update channels

Pyth publishes signed updates every 200 milliseconds. Only the fixed-rate channels of 200 ms and 1 second are accepted, so no one can shop through a faster stream for a convenient snapshot.