# CDR #026: Interlay | Asset Price

**URL:** <https://forum.diadata.org/t/cdr-026-interlay-asset-price/493>\
**Category:** CDRs - Custom Delivery Requests\
**Tags:** API, defi\
**Created:** [November 21, 2022, 2:58pm UTC](https://forum.diadata.org/t/cdr-026-interlay-asset-price/493 "2022-11-21T14:58:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Interlay](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.diadata.org/interlay/32/255_2.png) [@Interlay](https://forum.diadata.org/u/Interlay)\
**Post date:** [November 21, 2022, 2:58pm UTC](https://forum.diadata.org/t/cdr-026-interlay-asset-price/493/1 "2022-11-21T14:58:10Z")

</div>

# INTRODUCTION

Protocol: [Interlay](https://www.interlay.io/)

Website: [https://www.interlay.io/](https://www.interlay.io/)

Integration: Interlay is a decentralized layer-1 network, powered by and optimized for Bitcoin. As a Polkadot parachain, Interlay achieves best-in-class Proof-of-Stake security and interoperability with Ethereum, Cosmos, and many more. DIA is providing the collateral value information.

Use case: Collateral value

# REQUEST INFORMATION

## Assets

| Asset Ticker | Asset Blockchain | Asset Address | Asset Markets Overview | Comments |
| --- | --- | --- | --- | --- |
| iBTC | Interlay | N/A | [BTC asset information](https://app.diadata.org/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/?asset=BTC) | Collateral ratio driven price feed will be developed with BTC, DOT and other collaterals’ price as its core |

## Methodology

- Measuring total collateral value against BTC value minted:
  - if collateral value \< iBTC (pegged to BTC) → adjustment of price

- Volume Weighted Average Price with Interquartile Range (VWAPIR) will be used to calculate the price of the collateral. Learn more about it [here](https://docs.diadata.org/documentation/methodology/exchangeprices/vwapir-volume-weighted-average-price-with-interquartile-range-filter)
- 60sec time window for trades aggregation will be applied to collateral tokens at each price update
- 30sec price update frequency will be applied

Technical instructions:

- total\_backable = collateral\_currencies.map(|currency| vaultRegistry.totalUserVaultCollateral[currency] / oracle.aggregate[currency]).sum();  
total\_issued = tokens.totalIssuance[IBTC];  
assert!(total\_issued \< total\_backable);
- The collateral\_currencies will be taken by iterating over the keys used in vaultRegistry.systemCollateralCeiling

# DELIVERY INFORMATION

| Delivery Method | API feed |
| --- | --- |
| Is testnet deploy required? | No |

# NOTES

Additional relevant information: N/A
