Assessment reports>Benqi Oracle>Threat Model>validateFeedPriceDeviation

Function: validateFeedPriceDeviation(address asset, uint256 manualPrice)

This function validates a manual price against oracle feed prices to prevent large deviations.

Inputs

  • asset

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: An asset to validate the feed price of.

  • manualPrice

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: A manual price to validate the feed price of.

Branches and code coverage

Intended branches

  • Check if the Edge feed is available.

  • Check if the Chainlink feed is available.

  • Check if the manual price is greater than the Edge feed price times 10.

  • Check if the manual price is greater than the Chainlink feed price times 10.

Negative behavior

  • Revert if the Edge feed is not available.

  • Revert if the Chainlink feed is not available.

  • Revert if the manual price is greater than the Edge feed price times 10.

  • Revert if the manual price is greater than the Chainlink feed price times 10.

Zellic © 2025Back to top ↑