Skip to content
Request an audit

‹ All findings

IERC20Base Noncompliant With ERC20 Standard

Low/InfoVertex·by the Three Sigma team·Hybrid orderbook DEX·3rd April 20243S-Vertex-N01

Description

The interface declares increaseAllowance and decreaseAllowance functions, which aren't part of the official ERC20 standard.

Calls to such functions may revert with some tokens. However, these functions are part of the OpenZeppelin's ERC20 implementation designed to mitigate well-known issues around setting allowances. It's important to note that these functions do not entirely fix these issues.

An example is USDT and its "approval race protection," which causes other issues.

Additionally, the decimals() function is optional, and contracts mustn't rely on it.

Recommendation

It's advisable to use OpenZeppelin's SafeERC20 lib, not only for dealing with allowances but also with transfers, without reinventing the wheel, as seen in ERC20Helper.sol.

Status

Acknowledged