Closed c4-bot-2 closed 5 months ago
0xleastwood marked the issue as primary issue
0xleastwood marked issue #38 as primary and marked this issue as a duplicate of 38
0xleastwood marked the issue as satisfactory
0xleastwood marked the issue as not a duplicate
0xleastwood marked the issue as duplicate of #38
0xleastwood changed the severity to 3 (High Risk)
Lines of code
https://github.com/code-423n4/2024-05-bakerfi/blob/59b1f70cbf170871f9604e73e7fe70b70981ab43/contracts/core/strategies/StrategyLeverage.sol#L546
Vulnerability details
Vulnerability details
in
_payDebt()
We need to calculateamountIn
first.In the above method,
QuoteExactOutputSingleParams.fee
is hardcoded to a fixed value of500
whereas it should correctly use_swapFeeTier
.Impact
Using the incorrect
FeeTier
could lead to inaccuracies inamountIn
, resulting in a failed swap.Recommended Mitigation
Assessed type
Context