Difference between revisions of "How the 30-Day Moving Average Is Calculated"
From Internet Computer Wiki
Katie.peters (talk | contribs) (Created the page) |
(No difference)
|
Revision as of 21:19, 22 January 2024
The cycles minting canister (CMC, part of the NNS) fetches the ICP/XDR rate every 5 minutes from the exchange rate canister, which is our price oracle. The cycles canister also stores the start-of-day rates (UTC).
The 30-day-moving average uses the start-of-day rates for the past 30 days. Auditors look at the CMC's source code, which is publicly available here: https://github.com/dfinity/ic/blob/4344a924bcb12bc3d1510805dbb37391179df887/rs/nns/cmc/src/main.rs#L930
...and the function right below that as well: https://github.com/dfinity/ic/blob/4344a924bcb12bc3d1510805dbb37391179df887/rs/nns/cmc/src/main.rs#L964
These values are shown on the dashboard under "Conversion Rate."