Ledger
Every buy and every exit
Read from the program's own events in its transaction logs: buys with the Pyth floor they cleared, redeems with what was paid, and every weights change with the hash of its published inputs.
Reading the program's transactions…