Ask or search…
Comment on page


HopeOracle serves as the underlying infrastructure that provides prices for all assets.HopeLend utilizes a dual PriceOracle system to ensure the accuracy of prices. Chainlink is the primary PriceOracle responsible for providing the primary price source for HopeLend. In the event of an error in Chainlink's price, a backup PriceOracle is activated.
  • When RiskAdmin lists each asset, it is required to set the relevant HopeOracle parameter called "FailoverActive." When "FailoverActive" is false, the backup HopeOracle provides the default price. On the other hand, when "FailoverActive" is set to true, the default price is taken from the primary HopeOracle.
  • The backup HopeOracle as a fallback to provide the price when the primary HopeOracle is a failure in obtaining the price below:
    • If the primary HopeOracle returns the token price as 0.
    • If the data source address returned by the primary HopeOracle is 0.
The price of the $HOPE token is calculated independently and is not provided by HopeOracle.

$HOPE Price

BTC and ETH back the value reserve of the $HOPE token. The price of $HOPE is obtained by reading the value of the reserve pool addresses associated with BTC and ETH. To calculate the price of the $HOPE token based on the reserve pool of BTC and ETH, the following steps below:
  1. 1.
    Obtain the quantities of BTC and ETH in the reserve pool:
    • Multiply the total supply of $HOPE tokens by a constant value, K (0.00001080180484347501), to determine the quantity of BTC in the reserve.
    • Multiply the result by TokenConfig.factor to determine the quantity of ETH in the reserve.
  2. 2.
    Retrieve the prices of BTC and ETH through Chainlink oracles.
  3. 3.
    Calculate the total value of the reserve pool based on the quantities of BTC and ETH and their respective prices.
  4. 4.
    Divide the total value of the reserve pool by the total supply of $HOPE tokens to determine the price of $HOPE.
  5. 5.
    If the calculated price exceeds 1, it is fixed at 1.