Title | SquidGain |
---|---|
Hackathon | amsterDOT Hack |
Bounty Name | SubSquid: Karura Defi Dashboard |
FE Repo | Karura Dashboard |
Summary | DeFi Dashboard for Karura DEX |
Website | Live Dashboard |
Video | youtube |
ℹ️ NPM 8+ required for this repo. Consider using
nvm
to manage multiple versions if you require legacy support.
- Clone repo and run:
npm i
- Bring up DB docker container:
make up
- Define DB:
make codegen && make build && make migrate
- Run the Squid:
bash scripts/docker-run.sh
- Run the GraphQL server:
make serve
ℹ️ A longer list of queries can be found here: SquidGain Queries
query MyQuery {
overviewHistories(orderBy: timestamp_DESC) {
totalVolumeDay
totalLiquidity
timestamp
}
}
This is day aggregated stats for all all Native Asset pairs.
query MyQuery {
currPrices(where: {currency: {currencyName_containsInsensitive: "KSM", currencyName_not_contains: "LKSM"}}) {
usdPrice
timestamp
currency {
currencyName
decimals
}
}
}
This will return on-chain prices of a particular token based on the pool depths at the timestamp. Updated hourly.
query MyQuery {
poolLiquidities(orderBy: timestamp_DESC) {
usdTotalLiquidity
token1Liquidity
token0Liquidity
timestamp
pool {
currency0
currency1
}
}
}
This will return the liquidities for a pool and the associated USD value for that time.
- Limited currency support, will support ForeignAssets and StableAssets soon