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
andupperBound
for the price quote from theprimaryOracle
.Check if the
anchorOracle
price is within thelowerBound
andupperBound
.
Negative behavior
Should not allow an anchor price outside the
lowerBound
andupperBound
.