Assessment reports>Benqi Oracle>Threat Model>getUnderlyingPrice

Function: getUnderlyingPrice(IQiToken qiToken)

This function gets the price of an underlying asset.

Inputs

  • qiToken

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: A qiToken to get the price of.

Branches and code coverage

Intended branches

  • Check if the asset is configured.

  • Check if the oracle mode is Edge only.

  • Check if the oracle mode is Chainlink only.

  • Get the price of the asset from the Edge oracle.

  • Get the price of the asset from the Chainlink oracle.

  • Return the price of the asset.

Negative behavior

  • Revert if the asset is not configured.

  • Revert if the both oracles are stale.

  • Revert if the price deviation is too high.

Zellic © 2025Back to top ↑