This document outlines how rug pull index's algorithm is ranking data sets.
When ranking all data sets sold on Ethereum, the first step is acquiring meta data of all markets on Ocean Protocol and Big Data Protocol. Both projects host a version of the oceanprotocol/market. They take their market data from an off-chain meta data cache that's called Aquarius.
The following sources are used to collect all relevant data to generate a ranking:
We call the software that downloads all this meta data the "crawler". In the past, there have been nights where the crawler failed. This was when the main page wasn't showing any reasonable results. When the crawl fails an administrator can manually login to fix the problem by e.g. re-running the crawl.
Once the crawl has finished, we perform a number of calculations that flow into the final ranking.
The Ocean Protocol uses Automated Market Makers (or short: "pools") of Balancer's version 1. When staking e.g. QUICRA-0/OCEAN, the balancer pool returns a separate ERC20 token that represents a staker's liquidity in the pool.
As we want to rate a data set's factor of decentralization and hence the potential (or risk) it has of a single user "pulling the rug" - for each data set -, we calculate a gini coefficent from the pool's population of liquidity providers.
We define the gini coefficient to be the relative mean absolute difference over a population of liquidity providers in a balancer pool. If is the amount of absolute pool tokens a liquidity provider owns in a pool, for providers, we first find the mean absolute difference of all liquidity provider's stakes . To then get , we divide it by the arithmetic mean of all liquidity provider's stakes :
Since we've discovered an unfair advantage for pools with many small liquidity providers, for data sets with greater than 100 liquidity providers we only consider pool shares of more than 0.1% in the above calculation. For pools with less than 100 LPs, a stake counts towards the gini coefficient only when its share is more than 1% of the pool.
As outlined in the section "Data Acquisition", a data sets price in OCEAN or BDPToken is downloaded from Acquarius. The latest tickers for OCEAN/EUR and BDPToken/EUR are downloaded from coingecko. The EUR value of an OCEAN data asset which price is is then calculated by multiplying it by the price of an OCEAN :
rug pull index fetches and calculates - as previously mentioned - a set of meta data daily. Given an exemplary market of only two data sets and , over a timespan of two days, a fictional state of rug pull index's data base could look like this:
|name||liquidity (EUR)||gini coefficient||date|
To now calculate a daily ranking, considering the data of both days (June 22 and June 23), rug pull index does the following: In the "liquidity (EUR)" column, the overall highest value ("max value") is selected by searching the data base (it is "10" on June 22). Additionally the smallest gini coefficient ("min value") is determined ("0.24" on June 23 for). These "min" (gini coefficient) and "max" (liquidity (EUR)) values are then used as benchmark to evaluate the current day's data sets. Assuming the date to be June 23, 2021 we'd calculate the overall ranking of to be:
Hence, the main page's ranking would yield the following table for June 23, 2021:
|rank||name||ranking||liquidity (EUR)||gini coefficient|
Generally speaking, on a day the rating of a data set, can be calculated using the overall minimal gini coefficient , the overall maximal liquidity in EUR , the data set's current liquidity in EUR and the data set's current coefficient :
We pledge to update this specification with every update made to rug pull index's algorithm. This document was last updated on June 22, 2021.
If you have questions or feedback with regards to this document, please contact us.