51887 sc medium safeapprove will cause revert of usdt and similar erc20 token
Description
Vulnerability Details
depositAsset.safeApprove(address(vault), depositAmount);// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
require(!((_value != 0) && (allowed[msg.sender][_spender] != 0)));Affected locations (code references)
Recommendation
Proof of Concept
Previous50889 sc low arctokenpurchase withdrawunsoldarctokens fails to reduce totalamountforsale leaving availability counters wrongNext52393 sc low burns blocked by both sides whitelist with zero address exclusion when restrictions are enabled
Was this helpful?