Approving from non-zero to non-zero allowance will revert with OZ's safeApprove()
#275
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/b4532655071566b33c41eac46e75be29b4a381ed/contracts/contracts/core/connext/libraries/AssetLogic.sol#L347
Vulnerability details
Impact
Transaction reverting.
Proof of Concept
"SafeERC20: approve from non-zero to non-zero allowance"
): https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol#L53-L56Affected Code
Recommended Mitigation Steps
Set the allowance to zero immediately before the existing
safeApprove()
call.The text was updated successfully, but these errors were encountered: