## Defi Llama PR
### PR Title
feat: add Polkadot Asset Hub `offers` adapter
### PR Description
Based on the required Defi Llama [template](https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/pull_request_template.md), here are the below information :
**NOTE**
> - If you would like to add a `volume` adapter please submit the PR [here](https://github.com/DefiLlama/adapters).
> - If you would like to add a `liquidations` adapter, please refer to [this readme document](https://github.com/DefiLlama/DefiLlama-Adapters/tree/main/liquidations) for details.
1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
2. Please enable "Allow edits by maintainers" while putting up the PR.
3. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
4. Please fill the form below **only if the PR is for listing a new protocol** else it can be ignored/replaced with reason/details about the PR
5. **For updating listing info** It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
6. Do not edit/push `package-lock.json` file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
7. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap
---
##### 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.02 M
USDT 18.00 M
DOT 63.87 k
Total: 268.08 M
To Exclude the [pre-minted USDC address](https://assethub-polkadot.subscan.io/account/15QjVp1rx6tjbBjmaWhhwUV7ESHMG6KjdDdhRuw5dQKWkqzB)
##### 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](https://defillama.com/categories))
##### 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 :
1. native in Polkadot Asset Hub -> DOT (Polkadot)
2. Registered Assets
2.1 USDC (USD Coin)
2.2 USDt (Tether)
3. Registered Foreign Assets as of now (24/10/2023) :
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 :
- a new folder `polkadot-asset-hub` inside the folder `projects`
- a new entry for `polkadot-asset-hub` in the [chains.json](https://github.com/DefiLlama/DefiLlama-Adapters/blob/fab3cb094364f178882d6fd92b2c5218a7464945/projects/helper/chains.json#L4) file.
#### Run
To run the Polkadot Asset Hub script and test the results you need to do the following :
- `git clone` current repo
- `git checkout` in this branch
- `npm install`
- `npm install @polkadot/api`
- `node test.js projects/polkadot-asset-hub/index.js`
- The object returned is
```
{
polkadot: 15014.3246426952,
tether: 17998747.607192,
'usd-coin': 250019990.612722
}
```
#### Output
The output is :
```
-------------------
Warning:
Token coingecko:usd-coin has more than 100M in value (250.27001099099996 M) , price data: {
price: 1.001,
symbol: 'USDC',
timestamp: 1698150597,
confidence: 0.99,
mcap: 25368955560.646847
}
-------------------
--- polkadot_asset_hub ---
Total: 0
--- polkadot_asset_hub-offers ---
USDC 250.27 M
USDT 18.00 M
DOT 64.86 k
Total: 268.33 M
--- tvl ---
Total: 0
--- offers ---
USDC 250.27 M
USDT 18.00 M
DOT 64.86 k
Total: 268.33 M
------ TVL ------
polkadot_asset_hub 0
polkadot_asset_hub-offers 268.33 M
offers 268.33 M
total 0
```
### 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](https://assethub-polkadot.subscan.io/account/15QjVp1rx6tjbBjmaWhhwUV7ESHMG6KjdDdhRuw5dQKWkqzB):
```
15QjVp1rx6tjbBjmaWhhwUV7ESHMG6KjdDdhRuw5dQKWkqzB
```
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.