Index
This document outlines the logic behind Credora's Index, the service responsible for pricing assets to produce Credora calculation outputs.
General Logic
Currently the infrastructure supports several different price sources. They are assigned different tiers based on the venue's trading volume. The tier determines the relative weight given to the corresponding source. The higher the tier, the "heavier" the weight. Below are the venues distributed by their tiers and corresponding weights.
Tier 1: Weight = 2
Tier 2: Weight = 1
Tier 3: Weight = 0.5
From these venues, Credora pulls spot market prices for all tradeable assets. The mid price is used, calculated as (bid + ask) / 2. In the case of an absence of either bid or ask, the last trade's price is used.
As exchanges have unique instruments naming convention, Credora normalizes all symbol names to the same format, before applying any logic on them. For example:
ethusdt -> ETH/USDT
ETH-USDT -> ETH/USDT
Then, the following logic is applied for each symbol returned by an exchange:
If for any given asset (e.g. ETH) there is a price quoted in USD, take it and go to the next asset.
If for any given asset there is a price quoted in either (or both) USDT or USDC, store them. The logic of calculating the USD price in this case is the following:
Multiply each price by the 24hr trading volume (in base currency).
Sum the resultant values.
Divide the sum by the sum of individual trading volumes.
Example: ETH ETH/USDT: {'price': 3447.76, 'volume': 119090.42} ETH/USDC: {'price': 3447.79, 'volume': 114285.22} ETH/USD = (3447.76 * 119090.42 + 3447.79 * 114285.22) / (119090.42 + 114285.22) = 3447.77
If none of the above is true, ignore the asset.
Stablecoin prices (e.g. USDT/USD) are calculated as a simple average among all available pricing sources.
External Indexes
Credora also incorporates data sources which are "indexes" themselves. The majority of these aggregate multiple price sources internally, using a VWAP methodology.
In order to arrive at the final Index price for a specific asset, Credora takes a weighted average these sources and the index price calculated by Credora. The weights are as follows:
Credora: 25%
Coingecko: 25%
CoinMarketCap: 25%
DefiLlama: 25%
After all data is available, it is processed asset by asset and calculate the resultant USD-quotes. The steps are explained below:
Remove the outliers from the whole set of available sources (individual venues + external indexes). Outliers are any price which are more than 2x the standard deviation of the mean.
Multiply each non-index source by its weight (determined by its tier), sum all such multiples and then divide the sum by the sum of all participated weights (a.k.a. the "total weight"). This results in the "weighted venue" price.
Take a simple average among the "weighted venue" price and all available external indexes' prices. The result is the asset's Index price.
Last updated