Hermes Timestamps and VAA publish time

Hey guys,

Couple Qs for you as we use Pyth Core/Hermes endpoint:

  • we’re seeing two timestamp values, one on the VAA in the wormhole message, and the publish_time field in the pyth payload itself. wanted to know what (if there is one) is difference between them?
  • IIRC pyth messages are produced at solana block production latency, 400ms. the granularity of the timestamp is 1000ms. how do we establish ordering of pyth messages that have the same timestamp value? we’re consuming and verifying the vaa directly fwiw

Gm,

  1. You should use the publish_time field within the VAA payload, not the top-level timestamp of the VAA. The former is the publish time of the price in Pythnet, the latter is the timestamp at which the VAA itself was generated. publish_time is the field hat should be used and validated.
  2. Yep you are right that pyth prices are produced at solana block production frequency, 400ms. Thus there are multiple pyth prices within a 1s timestamp. We define the unique price at timestamp T to be the price where where prev_publish_time < t <= publish_time, which you can validate using the fields in the payload.

if two different pyth updates have identical publish_time values, is it possible to order them?

Yeah, we guarantee that there will be only 1 update such that prev_publish_time < t <= publish_time for any t, so you can order them based off that. That update is considered the unique update for timestamp t.