The _swapUnderlyingToAsset
function uses block.timestamp
as the deadline for swaps, which introduces risks related to transaction delays, price inaccuracies, and potential exploitation in the contracts of StrategyArb.sol
and src/StrategyOp.sol
.
src/StrategyArb.sol:_swapUnderlyingToAsset#L87
src/StrategyOp.sol:_swapUnderlyingToAsset#L102
Using block.timestamp
as a swap deadline without additional buffer or user-defined parameters can lead to the following issues:
- Transaction Delay Failures: If the transaction is delayed (e.g., due to network congestion), the deadline may be missed, causing the swap to revert unnecessarily.
- Price Outdated Risks: Transactions processed later may execute at outdated and unfavorable prices.
Reverts due to strict timing can frustrate users and degrade the contract's reliability.
Users might incur losses from failed swaps or unintended price fluctuations.
Lack of flexibility in setting deadlines cause fund losses for the Alchemix.
Allow users to specify a custom buffer to account for network delays:
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.