Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: guibescos <[email protected]>
  • Loading branch information
tejasbadadare and guibescos authored Dec 19, 2024
1 parent 4699780 commit 404c21a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target_chains/solana/sdk/js/pyth_solana_receiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ This method does sacrifice some security however -- please see the method docume

### Post a TWAP price update

TWAP prices updates are calculated using a pair of verifiable cumulative price updates per price feed (the "start" and "end" updates for the given time window), and then performing an averaging calculation on-chain to create the time-weighted average price.
TWAP price updates are calculated using a pair of verifiable cumulative price updates per price feed (the "start" and "end" updates for the given time window), and then performing an averaging calculation on-chain to create the time-weighted average price.

The flow of using, verifying, posting, and consuming these prices are the same as standard price updates. Get the binary update data from Hermes or Benchmarks, post and verify the VAAs via the Wormhole contract, and verify the updates against the VAAs via Pyth receiver contract. After this, you can consume the calculated TWAP posted to the TwapUpdate account. You can also optionally close these ephemeral accounts after the TWAP has been consumed to save on rent.
The flow of using, verifying, posting, and consuming these prices is the same as standard price updates. Get the binary update data from Hermes or Benchmarks, post and verify the VAAs via the Wormhole contract, and verify the updates against the VAAs via Pyth receiver contract. After this, you can consume the calculated TWAP posted to the TwapUpdate account. You can also optionally close these ephemeral accounts after the TWAP has been consumed to save on rent.

```typescript
// Fetch the binary TWAP data from hermes or benchmarks. See Preliminaries section above for more info.
Expand Down

0 comments on commit 404c21a

Please sign in to comment.