Giter Club home page Giter Club logo

bi-dashboard's People

Contributors

devexpert127 avatar tomjohn1028 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bi-dashboard's Issues

Volume sorted by source - Psy UI vs Friktion vs Katana

Sort the total volume by the source of the volume.

Completed Issue

  • return total volume metric
  • determine how much volume is from the UI compared to Friktion and Katana
  • pie chart, bar chart, or whatever best represents the data
  • auto-updates?

Other

  • add other structured products including tap finance, chest finance, solfire

Display TVL

Chart Type: Number

Why it's needed

  • Shows the "Total Value Locked" within the protocol
  • Great for measuring protocol growth and success
  • The perfect marketing tool

How to get the data

  1. Load all OptionMarkets from PsyAmerican protocol see docs
// THIS IS DETAILED PSEUDO CODE AND WILL NOT WORK COPY PASTA

import { Keypair, PublicKey } from '@solana/web3.js';
import { PsyAmericanIdl } from "@mithraic-labs/psy-american";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const anchorProvider = new Provider(connection, new Keypair(), {});
const program = new Program(PsyAmericanIdl, new PublicKey('R2y9ip6mxmWUj4pt54jP2hz2dgvMozy9VTSwMWE7evs'), anchorProvider);
// Load all the PsyOptions option markets
const optionMarkets = await getAllOptionAccounts(program);
  1. Group the _underlyingAssetPool_s and _quoteAssetPool_s by their mint addresses. Then sum the total amount in all of the pools for each asset type. (E.g. in all pools across all markets there is 115 BTC, 234 ETH, and 5,000,000 USDC)

  2. Use Aleph's API to query the current price of the asset by the mint address (E.g. current price of BTC on Serum). Using the mint address rather than hard coding these values makes this scaleable as OptionMarkets are permissionless and may have random assets added.

  3. Multiply the amounts of assets in the pools with the price of the assets and sum all.

Unique Daily Traders

Chart Type: Line Graph

Number of unique daily traders spanning the last 30 days

Primary Data Source

  • Aleph
    Example Query where "au" stands for Active User
{
  dailyStats(markets: ARRAY_OF_MARKETS
)
    {
    au {
      au
      interval
    }
  }
}

Example chart

Note: The chart below contains the volume (as a bar chart) as well, which is not required at the moment.

Screen Shot 2021-12-06 at 11 39 11 AM

Total Volume: 7 days

Chart Type: Pie

Total Volume over last 7 days partitioned by underlying / quote asset pair

Breaks down the volume of each asset for clear visibility ie BTC, ETH, SOL, SAMO etc

Primary Data Source

  • Aleph

Total Volume: 24hr

Chart Type: Pie

Total Volume over last 24 hours partitioned by underlying / quote asset pair

Example chart

Screen Shot 2021-12-06 at 11 41 32 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.