Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 3.61 KB

Backend.md

File metadata and controls

54 lines (38 loc) · 3.61 KB

Avalytics Logo Avalytics Logo

Backend: Data under Moralis

Token Selection

The data for Avalytics is stored in a Moralis Avalanche server. Older data of finer resolution is archived under AWS. Data at the Staging Layer is processed with Python under AWS and saved to the Consumption Stage, again under Moralis.

The tokens to be included in the dashboard were selected based on a procedure with multiple criteria. Firstly, a database of all major Avalanche tokens was constructed, to include top tokens as suggested by SnowTrace and Avalanche Tokens under CoinMarketCap, as follows:

Token Selection Sheet

The tokens were shortlisted according to several criteria, including SnowTrace rank, CoinMarketCap rank, availability in Moralis, and whether the token's issuer is a sponsor of the Morali+Avalanche hackathon or not. Only some stable coins were selected as representative. Some tokens, such as SushiSwap (SUSHI.e) and SnowBall Finance (SNOB), even though being significant, were later removed due to gaps in / problems with data collection.

Data Tables Under the Moralis Server

The following data tables were constructed under the Moralis server, as shown on the left-hand side of the following screenshot:

Moralis List Of Data Tables

The data tables and the data in them can be summarized as follows:

  • DexTokenPairControl: List of TraderJoe liquidity token pairs, for which data is collected
  • DexTokenPairDetails: Details of of TraderJoe liquidity token pairs
  • DexTokenPairLiquidity: Current data on TraderJoe liquidity token pairs, especially total value locked (TVL) and prices
  • SummaryControl: Database of what type of data is collected for which token.
  • Token15Min: Price, total supply, and market cap data for selected tokens, at a 15-minute time resolution. The formula used is (Market Cap) = (Price) x (Total Supply), where total supply excludes burned tokens.
  • Token1Day: Price, total supply, and market cap data for selected tokens, at a 1-day time resolution.
  • Token1Hour: Price, total supply, and market cap data for selected tokens, at a 1-hour time resolution.
  • Token4Hour: Price, total supply, and market cap data for selected tokens, at a 4-hour time resolution.
  • TokenDetails: Details of the selected tokens, for which data is collected.
  • TokenLogos: Logos of the selected tokens, for which data is collected.
  • TokenPriceCorrelation: Correlation between selected tokens, based on daily prices over the last 4 weeks.
  • TokenPrices: Token prices used in correlation calculations, for the last 4 weeks.

With the current data, due to fine-resolution data being moved to AWS, the Moralis server is far from being fully utilized, as shown in the following screenshot:

MoralisServerStatistics

Index

  1. Background
  2. Unique Value Offerings
  3. Design Principles
  4. System Architecture
  5. Backend: Data under Moralis
  6. Frontend: UI and Visual Analytics
  7. Technology/Tool Stack
  8. Related Projects
  9. Other Resources
  10. Future Plans for Avalytics

Back to Main GitHub Page | Back to Documentation Index Page