Components of TVL - Measures the size of a DeFi protocol
- DEX TVL
- Value of each asset in each pool
- sum of tvlUSD from the xx function in the subscanr package for R.
You can also use the Karura-dex
project hosted on Subquery Network with this query:
{
dailyPools {
nodes {
timestamp token0 {id} token1 {id} feeRateUSD dailyTradeVolumeUSD totalTVL txCount updateAtBlock {id}
}
}
}
- LP Token Staking TVL
substrate.query(module='Rewards',storage_function='PoolInfos', block_hash = hash)
- Bridge TVL
- Value of non-native tokens bridged in (i.e DOT tokens bridged into
Acala)
- KSM (or DOT) obtained from the py-substrate-interface
using function
substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'KSM'}], block_hash = hash)
- LKSM (or LDOT) obtained from function
substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'Token': 'LKSM'}], block_hash = hash)
- Liquid Staking TVL
- Liquid staking is a form of staking where the derivative token can
also be used in DeFi, providing additional yield beyond the regular
staking yield.
- In the case of Acala, DOT obtained from the py-substrate-interface
using function
substrate.query(module='Homa',storage_function='TotalStakingBonded', block_hash = hash)
- Stablecoin TVL
- Value of stablecoin issued by a protocol (i.e. aUSD for Acala)
- sum of depositVolumeUSD from the
getLoansDailyCollateral_acala_loan function in the subscanr package for R.
You can also use the Karura-loan
project hosted on Subquery Network with this query:
{
dailyCollaterals {
nodes {
collateral {id} depositAmount debitAmount depositVolumeUSD debitVolumeUSD
depositChangedUSD debitChangedUSD debitExchangeRate timestamp txCount
}
}
}
- Crowdloan TVL
- Value of DOT (or KSM) locked via the crowdloan process
- In the case of Acala, LCDOT obtained from the py-substrate-interface
using function
substrate.query(module='Tokens',storage_function='TotalIssuance', params = [{'LiquidCrowdloan': 13}], block_hash = hash)
Alternative Measures of Size (What do we do for non-DeFi
protocols?)
- Market cap
- Total issuance of native token multiplied by price
- Fees in USD
- Transaction fees converted into USD