17 January, 2024
USDLR is a fiat-backed stablecoin issued by Stable. Stable has been in touch with the DIA team to create a collateral ratio driven asset price feed for USDLR that can be used by protocols like Sperax on the Arbitrum network.
Integration Overview: Collateral ratio driven asset price feed for USDLR
Following assets will be included in the Oracle:
|Cash and T-bill reserves
|USDLR collateral ratio = (BaseValueEndBalance of cash and T-bill reserves (NAV API) + USDC price * BaseValueEndBalance of USDC (NAV API)) / USDLR_totalSupply
USDLR price methodology:
- Moving Average Price with Interquartile Range (MAIR) will be used to calculate the price for the USDC. Learn more about it here
- 0.5% deviation threshold 24h heartbeat for updates trigger will be applied for USDC
- 120sec time threshold will be applied for NAV API calls
- Each NAV API call will request for balance update on yesterday’s (T-1) date
- As soon as new balance becomes available on NAV, it will be pushed to the oracle
|Oracle on Arbitrum network
|Is testnet deploy required?
Thank you for requesting a data feed via DIA CDR. We confirm the CDR specifications were requested correctly. Find the oracle information below:
The oracle is deployed and can be accessed here.
You can query for assets by calling the read function getValue() with parameters such as “USDLR/USD”. It will return two values:
- The price of the asset queried with 6 decimals
- The unix timestamp of the last update
You can see Solidity and Vyper code integration examples here or use a dedicated DIA oracles integration library described in detail here.
Each deployed oracle contract has a separate gas wallet which is the only entity allowed to update oracle values based on selected parameters. To find out more information on how it works, visit the following link.
Please make sure to top up the gas wallet, as we only put in some gas to deploy and start the oracle.
Gas Wallet address: 0xda277f9f59baf6fb649952b20e9737ac43aebce5
The oracle contains two queriable key/value pairs:
- USDLR/USD - Cash and T-bill reserves according to the formula posted above
- TS-USDLR_USD - The timestamp of the last API update in the NAV API.