USDANT Stablecoin

CertiKFiles named in the report

CertiK reviewed USDAntsColony (USDANT Stablecoin) on 15 Feb 2023: 7 findings, 0 critical; 5 marked fixed, 2 acknowledged.

No open critical findings
Open the reportOpen USDAntsColony’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings7

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High022
Medium000
Low003
HighIncorrect Methods to Increase/Decrease AllowanceFixed

Both of the functions `increaseAllowance()` and `decreaseAllowance()` are incorrectly using `super.approve()`, which makes the two functions the same as the `approve()`. Currently, the `increaseAllowance()` may not increase allowance, and the `decreaseAllowance()` may not decrease allowance. In some cases, this may result in a loss of fund or a failed transaction. ```solidity=118 function increaseAllowance(address spender, uint256 addedValue) public override virtual returns (bool) { require(!blockedAccounts[spender]); require(!blockedAccounts[msg.sender]); if (deprecated) { // Forward user ERC20 methods to upgraded contract if this one is deprecated return UpgradedToken(upgradedAddress).increaseAllowanceByLegacy(spender, addedValue); } else { return super.approve(spender, addedValue); } } function decreaseAllowance(address spender, uint256 subtractedValue) public override virtual returns (bool) { require(!blockedAccounts[spender]); require(!blockedAccounts[msg.sender]); if (deprecated) { // Forward user ERC20 methods to upgraded contract if this one is deprecated return UpgradedToken(upgradedAddress).decreaseAllowanceByLegacy(spender, subtractedValue); } else { return super.approve(spender, subtractedValue); } } ```

HighOwner Is DroppedFixed

Generally, token owner would like to approve some amount allowance to other EOAs or contracts who will be spenders. Then the spenders can spend these tokens from the owner account. This means there are two roles - **owner&spender** that need to be specified. However, the owner was dropped when increasing/decreasing allowance of upgraded tokens to the spender. ```solidty=124 return UpgradedToken(upgradedAddress).increaseAllowanceByLegacy(spender, addedValue); ``` ```solidity=136 return UpgradedToken(upgradedAddress).decreaseAllowanceByLegacy(spender, subtractedValue); ```

LowMissing Error MessagesFixed

The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.

LowThird-Party DependenciesFixed

The contract is serving as the underlying entity to interact with third-party **UpgradedToken**. The scope of the audit treats third-party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets.

LowUnreasonable Variable NamingFixed

According to the usage of the arguments declared in the function **transferFromByLegacy()**, we infer that the first argument is `spender` and the third argument is `to`. The same issue also exists in the following functions:\ **approveByLegacy**\ `from` -> `owner`\ **decreaseAllowanceByLegacy**\ `addedValue` -> `subtractedValue`

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (1)

  • erc20.sol

Part of USDAntsColony’s security record

USDAntsColony
Audits1 audit by 1 firmLast audit Feb 2023, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open USDAntsColony’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us