Community Approval Request #001: Moving Average Methodology
Date: Fri, 10 December 2021
Author: DIA Core Team
Status: Successfully passed - 99% yes
In this first Community Approval Request (CAR), the DIA DAO community will discuss, improve and approve the Moving Average (MA) methodology, a very commonly used filter by DIA for its oracle price determination.
How does the Moving Average methodology work?
To calculate a price feed for an asset, DIA collects data at a trade level directly from centralised exchange APIs (e.g Coinbase) and decentralised exchange smart contracts (e.g UniSwap).
All trades happening in a source exchange during a queried time range are organised by timestamp. For each second in this time range, a “slot” is created where trades are put into. As soon as all trades saved in the “slot” have been processed, the simple average of these prices is calculated. This is done by accumulating prices and then dividing by the number of involved trades in this calculation.
Suggest your ideas and improvements proposals by replying to this entry below.
→ Head over to Snapshot to vote
Timeline:
- Discussion: 10 December - 17 Dec
- Vote: 17 Dec - 24 Dec
- Approval: 24 Dec