The strategies use OpenZeppelin's deprecated safeApprove
function for token approvals. This function has been deprecated in favor of safeIncreaseAllowance
and safeDecreaseAllowance
.
safeApprove
is deprecated because it can fail when setting an approval to a non-zero value if a previous non-zero approval exists. This can happen if the contract needs to update existing allowances, leading to potential failures in token approval operations.
While the function is deprecated, in this implementation the risk is minimal because:
Approvals are only set during initialization or router updates
Approvals are always set to the maximum value
No repeated approval updates in normal operation
manuel code review
Replace safeApprove
with safeIncreaseAllowance
:
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.