The _swapUnderlyingToAsset
function currently lacks integration with a price oracle, relying only on a basic comparison of input and output amounts in the contracts of StrategyArb.sol
and src/StrategyOp.sol
. This omission introduces risks of inaccurate pricing, potential manipulation, and suboptimal execution.
src/StrategyArb.sol:_swapUnderlyingToAsset#L82-L83
src/StrategyOp.sol:_swapUnderlyingToAsset#L82-L83
The function does not validate minOut
against an oracle price, leaving it vulnerable to inaccurate or manipulated pricing. TODO comments indicate plans for oracle integration to ensure prices are better than 1:1.
The condition require(minOut > _amount)
ensures only a basic ratio check but lacks depth in price validation.
Users may suffer financial losses due to execution at unfavorable prices or manipulated swaps.
The absence of an oracle check exposes the function to price manipulation and potential exploits by malicious actors.
Failure to validate prices accurately undermines the protocol’s trustworthiness and reliability.
The lack of price protection can lead to suboptimal swaps, damaging user confidence.
Implement a price oracle to validate minOut
against a reference price:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.