Assessment reports>Cove>Threat Model>_getQuote

Function: _getQuote(uint256 inAmount, address base, address quote)

This function retrieves pricing quotes from both primary and anchor oracles.

Inputs

  • inAmount

    • Control: Controlled by the calling function.

    • Constraints: None at this level.

    • Impact: The amount of base tokens to be converted.

  • base

    • Control: Controlled by the calling function.

    • Constraints: None at this level.

    • Impact: The token for which the price is being determined.

  • quote

    • Control: Controlled by the calling function.

    • Constraints: None at this level.

    • Impact: The token against which the price is measured.

Branches and code coverage

Intended branches

  • Calculate the lowerBound and upperBound for the price quote from the primaryOracle.

  • Check if the anchorOracle price is within the lowerBound and upperBound.

Negative behavior

  • Should not allow an anchor price outside the lowerBound and upperBound.

Zellic © 2025Back to top ↑