MELD - ERC20 Audit

CertiKFiles named in the report

CertiK reviewed MELD (MELD - ERC20 Audit) on 15 May 2023: 5 findings, 0 critical; 4 marked fixed, 1 acknowledged.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings5

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium011
Low003
Medium`_trustedForwarder` Can Bypass The Role ChecksFixed

The contract `BaseToken` adopts the eip-2771 standard which overrides the function `_msgSender()` and uses the last 20 bytes of the call data instead of `msg.sender` if the `msg.sender` is the forwarder. Meanwhile, the function `_checkRole()` in the OpenZeppelin contract `AccessControl` is using the function `_msgSender()` for the role checks. Thus, the forwarder can forge the value of _msgSender() and effectively send transactions from privileged addresses.

LowLogic Related To Minting PeriodFixed

According to the following code snippet in the function `mint()`, each new minter will start a new minting period in the first mint, and any further mint operation from this minter within the period cannot exceed the threshold limit. The first mint operation after the period will clear the minted amount(`currentMintingAmount[minter]`) and start a new period, so the minter can mint more tokens below the threshold. If the `mintingPeriodLength[minter]` is set to 0, this logic is like a maximum mint limit for a single mint transaction. ```solidity=113 if (block.timestamp > lastMintingPeriod[minter] + mintingPeriodLength[minter]) { currentMintingAmount[minter] = 0; lastMintingPeriod[minter] = block.timestamp; } require( currentMintingAmount[minter] + _amount <= mintingAmountThreshold[minter], "BaseToken: Minting amount exceeds threshold" ); currentMintingAmount[minter] += _amount; ```

LowMissing Zero Address ValidationFixed

The cited addresses input are missing a check that it is not `address(0)`. For example: - `_token` in the `RescueTokens._rescueERC20()`, `RescueTokens._rescueERC721()`, `RescueTokens._rescueERC1155()`. - `_defaultAdmin` in the `BaseToken.constructor()`. - `_account` in the `BaseToken.setMintingAccount()`. - `_forwarder` in the `BaseToken.setTrustedForwarder()`.

LowVariables That Could Be Declared as ImmutableFixed

The linked variable `__decimals` assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

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 (3)

  • contracts/utils/RescueTokens.sol
  • contracts/MeldToken.sol
  • contracts/BaseToken.sol

Part of MELD’s security record

MELD
Audits2 audits by 1 firmLast audit Jun 2023, by CertiK.
Critical findingsNo open critical findingsAcross 2 reports.
Open MELD’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