Here are how we calculate the price of each asset in our Genesis Pool relative to USD.
We retrieve the price UST/USD with Band Protocol with heartbeat rate 15s
We retrieve the LUNA/UST exchange rate from Terra chain's oracle module, hence calculating LUNA/USD by multiplying with the UST/USD exchange rate mentioned above.
We retrieve the aUST/UST exchange rate from Anchor Market contract, hence calculating aUST/USD by multiplying with the UST/USD exchange rate mentioned above.
We retrieve the LunaX/Luna exchange rate from LunaX Staking contract, hence calculating LunaX/USD by multiplying with the LUNA/USD exchange rate mentioned above.
We retrieve the price ANC/USD with Band Protocol with heartbeat rate of 15s
We retrieve the price MIR/USD with Band Protocol with heartbeat rate of 15s
We retrieve the bLUNA/LUNA exchange rate from HUB contract, hence calculating bLUNA/USD by multiplying with the LUNA/USD exchange rate mentioned above.
Note: Although we expect oracle to feed price every 15 seconds heartbeat, there may be a delay in feeding. We compromise only 1 min delay. If the delay exceeds this threshold, we decide that it's the old price and reject all interaction from the user.
We retrieve the stLUNA/LUNA exchange rate from Lido.
Custom's pLUNA TWAP from Prism's pLUNA/PRISM TWAP.