SmartVaultV3::executeERC20SwapAndFee() and LiquidationPoolManager::runLiquidation() will revert if USDT token will have allowance != 0
USDT will revert if the change allowance from a non-zero value. For this token, it's a requirement to first reset the allowance to zero before setting a new value. Failing to do so can result in transaction reverts, disrupting protocol functionality.
VSCode
Consider using the forceApprove method from OpenZeppelin's SafeERC20 library. This method ensures the contract's allowance towards a spender is set to the specified value. If the token doesn't return a value, the non-reverting calls are assumed successful, offering a seamless solution for tokens like USDT.
Since safeIncreaseAllowance calls forceApprove internally, it's also a viable alternative.
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.