DIA builds price oracles by computing trade data from Camelot for both DeFi exchanges and NFT collections, but the process varies depending on the type of exchange.
For DeFi exchanges, DIA follows a two-step process. First, there is data cleaning and outlier detection to ensure the quality of the trade data. This involves removing trades with prices that deviate significantly from the market price to avoid irregularities caused by market manipulation, errors, or flash crashes. DIA applies an Interquartile Range (IR) filter to identify and exclude outliers. The remaining trades move forward for further processing.
Next, DIA applies price determination methodologies to calculate the final price. One example is the Volume Weighted Average Price (VWAP), which considers the different volumes of trades. Trades are weighted by their volume, and the volume-price-products are accumulated and divided by the sum of all volumes. Another methodology is the Moving Average with Interquartile Range Filter (MAIR), where trades are ordered by timestamp and weighted against the volume for each data point.
For NFT collections, the process for building price oracles is different. The trade data retrieved from the blockchain is first processed through cleansing filters to exclude market outliers and manipulation techniques. Then, a pricing methodology is applied to determine the final price point.
The simplest methodology is the Floor Price, which provides the lowest sale price of an NFT collection recorded on the blockchain within a given time window. However, this methodology can be manipulated by malicious actors using techniques like wash trading and sweeping the floor. To address this, DIA offers advanced methodologies such as the Moving Average of Floor Price, which calculates the moving average of a collection's floor price and applies an interquartile range outlier detection filter.
DIA is also open to discussing custom filters and methodologies for specific use cases beyond the implemented techniques.
Please note that this information is based on the general process followed by DIA to build price oracles and does not include specific details about DIA's technology or services.