# CDR #048: Y2K Finance | Asset Price Feed

**URL:** <https://forum.diadata.org/t/cdr-048-y2k-finance-asset-price-feed/683>\
**Category:** CDRs - Custom Delivery Requests\
**Tags:** options, arbitrum, defi, token-price-feed\
**Created:** [May 8, 2023, 3:29pm UTC](https://forum.diadata.org/t/cdr-048-y2k-finance-asset-price-feed/683 "2023-05-08T15:29:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carnation](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.diadata.org/carnation/32/344_2.png) [@carnation](https://forum.diadata.org/u/carnation)\
**Post date:** [May 8, 2023, 3:29pm UTC](https://forum.diadata.org/t/cdr-048-y2k-finance-asset-price-feed/683/1 "2023-05-08T15:29:01Z")

</div>

# INTRODUCTION

Protocol: Y2K

Integration: Y2K Finance is a suite of structured products designed for exotic peg derivatives, that will allow market participants the ability to robustly hedge or speculate on the risk of a particular pegged asset (or basket of pegged assets), deviating from their ‘fair implied market value’.

# REQUEST INFORMATION

## Assets

Following assets will be included in the Oracle:

| Asset Ticker | Asset Blockchain | Asset Address | Asset Markets Overview | Trades Aggregation Window Size | Comments |
| --- | --- | --- | --- | --- | --- |
| Y2K | Arbitrum | [0x65c9…977f](https://arbiscan.io/address/0x65c936f008bc34fe819bce9fa5afd9dc2d49977f) | [Y2K Markets](https://app.diadata.org/price/asset/Arbitrum/0x65c936f008BC34fE819bce9Fa5afD9dc2d49977f/?asset=Y2K) | 120 sec | Y2K/ USD based on BALANCER Y2K/ WETH pool |

## Methodology

- Moving Average Price with Interquartile Range (MAIR) will be used to calculate the price for the assets. Learn more about it [here](https://docs.diadata.org/documentation/methodology/exchangeprices/mair-moving-average-with-interquartile-range-filter)
- 0.5% deviation threshold for updates trigger will be applied for each asset
- 120 sec updates frequency check will be applied
- The feed will be updated every 24h period if there are no deviation based updates

---

<div class="post-metadata">

**Author:** ![Samuel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.diadata.org/samuel/32/119_2.png) [@Samuel](https://forum.diadata.org/u/Samuel)\
**Post date:** [May 11, 2023, 12:58pm UTC](https://forum.diadata.org/t/cdr-048-y2k-finance-asset-price-feed/683/2 "2023-05-11T12:58:19Z")

</div>

Thank you for requesting a DIA CDR. We confirm the CDR specifications were requested correctly. Find the oracle / API endpoint below:

**Markets**

By querying for blockchain and asset, the [API](https://docs.diadata.org/documentation/api-1/api-endpoints#asset-markets) provides the markets used for calculating this feed.

**API endpoint**

By querying for blockchain and asset, the [API](https://docs.diadata.org/documentation/api-1/api-endpoints#asset-quotation) provides the asset quotation for each asset in the feed.

**Oracle**

The oracle is deployed and can be accessed here.

> **[DIAOracleV2 | Address 0xebec75aabbb20401744c0bd72bf04f0d53d205bb | Arbiscan](https://arbiscan.io/address/0xebec75aabbb20401744c0bd72bf04f0d53d205bb)**
>
> The Contract Address 0xebec75aabbb20401744c0bd72bf04f0d53d205bb page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

You can query for assets by calling the read function getValue() with parameters such as “Y2K/USD”. It will return two values:

- The price of the asset queried with 8 decimals
- The timestamp of the last update

Please make sure to top up the gas wallets very soon, as we only put in some gas to deploy and start the oracle.  
Gas wallet: 0x061Db714440c8F9BD1c41A509eE423ffE5Ee471a

Also make sure it always has sufficient funding.

---

<div class="post-metadata">

**Author:** ![Samuel](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.diadata.org/samuel/32/119_2.png) [@Samuel](https://forum.diadata.org/u/Samuel)\
**Post date:** [July 4, 2023, 9:50am UTC](https://forum.diadata.org/t/cdr-048-y2k-finance-asset-price-feed/683/3 "2023-07-04T09:50:01Z")

</div>

The adapter for Y2K/ETH is here: [DIATwoAssetAdapter | Address 0xbf267b64256f50cb4de4bf00b106502a89edce3f | Arbiscan](https://arbiscan.io/address/0xbf267b64256f50cb4de4bf00b106502a89edce3f)

**How does it work?**  
Just query read function “getAPriceInB()” and you will get three return values:

1. Price of Asset A measured in Asset B with 8 decimals
2. Timestamp of last update of Asset A in the underlying oracle
3. Timestamp of last update of Asset B in the underlying oracle

A is “Y2K/USD” and B is “ETH/USD”. We are flexible to amend this in later times should that ever be needed.  
Please be aware that the underlying oracle contract needs to remain operational (i.e. funding needs to be provided for gas from time to time).  
We also strongly recommend implementing a timestamp check to ensure relative freshness whenever a value is used onchain.
