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.
Asset Prices
  1. 1.
    Check the price from a Chainlink aggregator.
  2. 2.
    If the price is below or equal to zero, call dForce backup price oracle, which is currently maintained by the dForce team.
  3. 3.
    For prices Chainlink not provided, price is posted by service maintained by dForce team, currently, only DF.
  4. 4.
    In the future, dForce governance will manage the selection of price sources.
Ethereum Mainnet
Binance Smart Chain Mainnet
Asset
Address
DF
0x1B7c5DA3D2DBc05B089053FA3318f26bdD8aB10A
USDT
0x3E7d1eAB13ad0104d2750B8863b489D65364e32D
USDC
always equal to 1 dollar.
ETH
0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
WBTC
0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c
DAI
0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9
GOLDx
0x8C5022C57dE46252CE1a49644c5ADf5C866e3E8D*
UNI
0x553303d460EE0afB37EdFf9bE42922D8FF63220e
EUX
0xb49f677943BC038e9857d61E7d053CaA2C1734C1
TSLA
0x1ceDaaB50936881B3e449e47e40A2cDAF5576A4a
AAPL
0x139C8512Cde1778e9b9a8e721ce1aEbd4dD43587
AMZN
0x8994115d287207144236c13Be5E2bDbf6357D9Fd
COIN
0xb10a047f8db80d781D006F1401BEB7d70Eb4da1a
Asset
Address
DF
0x8fC12c875BE2f443F23fF8F0262E06F4696Aa5d1
USDT
0xB97Ad0E74fa7d920791E90258A6E2085088b4320
USDC
always equal to 1 dollar.
BNB
0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE
BUSD
0xcBb98864Ef56E9042e7d2efef76141f15731B82f
BTCB
0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf
DAI
0x132d3C0B1D2cEa0BC552588063bdBb210FDeecfA
ADA
0xa767f745331D267c7751297D982b050c93985627
ATOM
0xb056B7C804297279A9a673289264c17E6Dc6055d
FIL
0xE5dbFD9003bFf9dF5feB2f4F445Ca00fb121fb83
ETH
0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e
GOLDx
0x7F8caD4690A38aC28BDA3D132eF83DB1C17557Df*
UNI
0xb57f259E7C24e56a1dA00F66b55A5640d9f9E7e4
EUX
0x0bf79F617988C472DcA68ff41eFe1338955b9A80
TSLA
0xEEA2ae9c074E87596A85ABE698B2Afebc9B57893
AAPL
0xb7Ed5bE7977d61E83534230f3256C021e0fae0B6
AMZN
0x51d08ca89d3e8c12535BA8AEd33cDf2557ab5b2a
COIN
0x2d1AB79D059e21aE519d88F978cAF39d74E31AEB
*GOLDx's price is calculated as the price of PAXG/30.1034768.
Prices for stocks
are only considered valid during market trading hours in Nasdaq. When asset price considered invalid during market close period, the protocol will disable operations (such as redeem collaterals, continue borrowing/minting, liquidateborrow, etc) until market opens again. For more comprehansive explanations, please refer to the action rules in Stock Pool.

Method

getUnderlyingPrice()

Get the price of underlying token by iToken.
1
/**
2
* @notice Get the underlying price of a iToken asset
3
* @param _iToken The iToken to get the underlying price of
4
* @return The underlying asset price mantissa (scaled by 1e18).
5
* Zero means the price is unavailable.
6
*/
7
function getUnderlyingPrice(address _iToken)
8
external
9
view
10
returns (uint256);
Copied!

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).
1
/**
2
* @notice Get the price and status of an underlying asset
3
* @param _iToken The iToken to get the underlying price of
4
* @return The underlying asset price mantissa (scaled by 1e18).
5
* @return If the price is available, true is available, vice versa.
6
*/
7
function getUnderlyingPriceAndStatus(address _iToken)
8
external
9
view
10
returns (uint256, bool);
Copied!