New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Polkadot Asset Hub adapter #7862
Conversation
Error while running adapter at projects/polkadot-asset-hub:
|
The adapter at projects/polkadot-asset-hub exports TVL:
|
I pushed the |
Yes, now with the update in |
Hi @Imod7, the code has no issues, but I am afraid this is not a defi project/has no tvl. I checked with the team as well and they felt the same. Sorry, we cant list this. |
Thank you very much for your prompt feedback! Based on this guide you provide, my goal was to add all the corresponding amounts with ❗From the current result, it is pending to exclude the funds from this pre-minted address so to subtract approximately 248M USDC. I mentioned it in the description of this PR in case you could suggest the best way to implement this. If this amount is substracted then the final tvl under
|
hi @Imod7 correct me if I am wrong, what you are tracking here is asset issuance/circulating supply, but that is not we track in tvl dashboard |
Hello @g1nt0ki
This is very close to the definition of Asset Hub as you mentioned it in your last reply :
Also, from your first comment
kindly challenging this statement by mentioning that Polkadot Asset Hub is a liquidity portal for the entire Polkadot network and holds and manages assets in a decentralized manner similar to DeFi platforms by utilising Multisig, Proxy and Utility Substrate pallets (link).
Thank you so much in advance for your patience, clarifications and answers that you provided until now in this PR 🙏 If you could answer these two last points so I can also share with my team, that would be awesome and I would greatly appreciate it! Soon after of course, I will also close this PR. Just to also point out that the goal of my arguments are just to get a better understanding and nothing more than that. Thank you again for your time! 🙏 |
hi @Imod7 The The only protocol listed now that has offers field: https://defillama.com/protocol/owna where we track loan offers. Just noticed that it is not visible in the UI anyway. Just to be clear, I do think Asset Hub is important piece of infra but we dont track value locked in things like multisigs. |
@g1nt0ki Thank you so much for all the feedback! Very much appreciated! I will inform the team and closing this PR! |
Name (to be shown on DefiLlama):
Polkadot Asset Hub
Twitter Link:
N/A
List of audit links if any:
N/A
Website Link:
https://parachains.info/details/statemint
https://metadata.parity.io/#/polkadot-statemint
Logo (High resolution, will be shown with rounded borders):
https://drive.google.com/file/d/1Un0J46IXWC1Jr4U8F80BWrHW9dbQbOXl/view?usp=drive_link
Current TVL:
--- polkadot_asset_hub-offers ---
USDC 250.27 M
USDT 18.00 M
DOT 62.38 k
Total: 268.33 M
To Exclude the pre-minted USDC address
Treasury Addresses (if the protocol has treasury)
13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx
Chain:
Polkadot Asset Hub
1000 (substrate/ parachain on polkadot)
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
N/A
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
N/A
Short Description (to be shown on DefiLlama):
The Asset Hub on both Polkadot and Kusama are the first system parachains.
The Asset Hub is an asset portal for the entire network. It helps asset creators (e.g. reserve backed stablecoin issuers) to track the total issuance of their asset in the Polkadot network, including amounts that have been transferred to other parachains. It is also the point where they can transact, mint and burn, and manage the on-chain asset.
Token address and ticker if any:
DOT (native)
Category (full list at https://defillama.com/categories) *Please choose only one:
Cross Chain (please check appropriateness here)
Oracle used (Chainlink/Band/API3/TWAP or any other that you are using):
-
forkedFrom (Does your project originate from another project):
-
methodology (what is being counted as tvl, how is tvl being calculated):
TVL is calculated as sum of all assets listed in AssetHub recalculated to their respective token prices. AssetHub by the nature/purpose of this system parachain should count all of its assets toward TVL, meaning, it should be categorized into this type "Offers - funds that are approved for spending on a non-custodial platform, but not actually deposited into the platform contracts" (source - DefiLlama-What to include as TVL?).
The tokens we included in the
Offers
section are the ones we consider that have "real" value in Polkadot Asset Hub.The tokens that we identified with real value are the following :
2.1 USDC (USD Coin)
2.2 USDt (Tether)
3.1 KSM (Kusama)
3.2 EQ (Equilibrium)
3.3. EQD (Equilibrium Dollar)
Github org/user (Optional, if your code is open source, we can track activity):
https://github.com/paritytech/polkadot-sdk
Aditional information
PR to add
Offers
adapter for Polkadot Asset Hub.Implementation
Based on the docs of Defi Llama to add a new project I added :
polkadot-asset-hub
inside the folderprojects
polkadot-asset-hub
in the chains.json file.Run
To run the Polkadot Asset Hub script and test the results you need to do the following :
git clone
current repogit checkout
in this branchnpm install
npm install @polkadot/api
node test.js projects/polkadot-asset-hub/index.js
Output
The output is :
Additional Requests from DefiLlama team
1. Exclude Address
From the above results, we think it is best to exclude this specific pre-minted USDC address:
so that the results are more accurate. Kindly asking the DefiLlama team if you can advice on how can we do this in the current implementation ?
2. Change in Label
In https://defillama.com/chains/Parachain --> Preferably this “Parachain” label should be renamed to “Polkadot” in the light of upcoming agile Polkadot changes.