Price Oracle
We use ChainLink's decentralized oracles for the primary price feed, and use dForce oracle as a backup in case of price from ChainLink has significant deviation from markets.
Check the price from a Chainlink aggregator.
If the price is below or equal to zero, call dForce backup price oracle, which is currently maintained by the dForce team.
For prices Chainlink not provided, price is posted by service maintained by dForce team, currently, only DF.
In the future, dForce governance will manage the selection of price sources.
Asset | Address |
DF | 0x1B7c5DA3D2DBc05B089053FA3318f26bdD8aB10A |
USDT | 0x3E7d1eAB13ad0104d2750B8863b489D65364e32D |
USDC | always equal to 1 dollar. |
ETH | 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 |
WBTC | 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c |
DAI | 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9 |
GOLDx | 0x8C5022C57dE46252CE1a49644c5ADf5C866e3E8D* |
UNI | 0x553303d460EE0afB37EdFf9bE42922D8FF63220e |
EUX | 0xb49f677943BC038e9857d61E7d053CaA2C1734C1 |
0x1ceDaaB50936881B3e449e47e40A2cDAF5576A4a | |
0x139C8512Cde1778e9b9a8e721ce1aEbd4dD43587 | |
0x8994115d287207144236c13Be5E2bDbf6357D9Fd | |
0xb10a047f8db80d781D006F1401BEB7d70Eb4da1a |
*GOLDx's price is calculated as the price of PAXG/30.1034768.
Method
getUnderlyingPrice()
Get the price of underlying token by iToken.
getUnderlyingPriceAndStatus()
Get underlying price and status if the price is available (for example, stock's price is unavailable when market close, here is "Nasdaq trading hours" for your reference).
Last updated