Mint Club - Audit

CertiKFiles named in the report

CertiK reviewed Mint Club (Mint Club - Audit) on 18 Jan 2024: 20 findings, 0 critical; 12 marked fixed, 8 open.

No open critical findings
Open the reportOpen Mint Club’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings20

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium202
Low5010
HighCentralization Related RisksOpen

In the contracts `MCV2_MultiToken` and `MCV2_Token`, the role `bond` has authority over the following functions: * `mintByBond()`: Can only be called by the `bond` to mint the token. * `burnByBond()`: Can only be called by the `bond` to burn the token. Any compromise to the `bond` contract may allow the hacker to mint/burn arbitrary tokens to/from any accounts. ----- In the contract `MCV2_Royalty` the role `_owner` has authority over the functions shown in the diagram and list below. * `updateProtocolBeneficiary()`: Can only be called by the contract owner to update the beneficiary address. * `updateCreationFee()`: Can only be called by the contract owner to update the creation fee. * `updateMaxRoyaltyRange()`: Can only be called by the contract owner to update the maximum royalty range. The `MCV2_Royalty` contract inherits `Ownable` contract from Openzeppelin, the role `_owner` also has authority over the functions from its parent contract list below. * `renounceOwnership()` - Renounce the ownership of contract to leave the contract without an owner. * `transferOwnership()` - Transfers ownership of the contract to a new account. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and change the beneficiary address, update creation fee, update the maximum royalty range and manage the ownership. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-aaad-599c1750-97eb-1b2fb3c6ae34/diagrams/centralization_MCV2_Royalty-MCV2_Royalty-_owner.svg) ----- In the contract `MCV2_ZapV1` the role `_owner` has authority over the functions shown in the diagram and list below. * `rescueETH()`: Can only be called by the contract owner to rescue any ETH sent to the contract. The `MCV2_ZapV1` contract inherits `Ownable` contract from Openzeppelin, the role `_owner` also has authority over the functions from its parent contract list below. * `renounceOwnership()` - Renounce the ownership of contract to leave the contract without an owner. * `transferOwnership()` - Transfers ownership of the contract to a new account. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and rescue any ETH sent to the contract and manage the ownership of contract. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-aaad-599c1750-97eb-1b2fb3c6ae34/diagrams/centralization_MCV2_ZapV1-MCV2_ZapV1-_owner.svg) ----- In the contract `MerkleDistributor`, the role `distributions[distributionId].owner` has the authority over the following function: * `refund()`: Can only be called by the distribution owner to get the refund. Any compromise to the privileged role may allow the hacker to receive the refunds that has been distributed into this contract.

MediumPotential Misuse of Airdrop and Lockup Features fOpen

The `Mint Club` project is designed to offer airdrop and lockup features exclusively for ERC20 or ERC1155 tokens created on the Mint Club V2 platform according to the [**README**](https://github.com/Steemhunt/mint.club-v2-contract?tab=readme-ov-file#key-features). However, based on the codebase, the smart contracts `Locker` and `MerkleDistributor` do not enforce this restriction. The platform's features could be used in ways not intended by design, potentially leading to misuse or abuse. For example, someone could use these contracts to airdrop or lock tokens that have mechanisms or behaviors that disrupt the intended ecosystem.

MediumToken creator is able to sell tokens for future pOpen

The `createToken()` function allows any user to create tokens by specifying custom step parameters. In this process, the `stepRanges[0]` can be defined by the token creator. All tokens within these `stepRanges[0]` are issued directly to the creator's account, without the requirement of paying any `reserveToken`. This setup enables the token creator to potentially increase their profit by burning their tokens in exchange for `reserveToken`.

LowIncompatibility with Deflationary TokensOpen

When transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=60 IERC20(token).safeTransferFrom(msg.sender, address(this), amount); ``` ```solidity=63 IERC1155(token).safeTransferFrom(msg.sender, address(this), 0, amount, ""); ``` - Transferring tokens by `amount`. ```solidity=73 lockUp.amount = amount; ``` - The `amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. - Note: `safeTransferFrom` is an external function and its behavior wasn't evaluated. --- ```solidity=398 reserveToken.safeTransferFrom(user, address(this), reserveAmount); ``` - Transferring tokens by `reserveAmount`. ```solidity=401 bond.reserveBalance += reserveAmount - royalty; ``` - The `reserveAmount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. - Note: `safeTransferFrom` is an external function and its behavior wasn't evaluated. --- ```solidity=91 t.safeTransferFrom(_msgSender(), address(this), tokensToBurn); ``` - Transferring tokens by `tokensToBurn`. ```solidity=99 BOND.burn(token, tokensToBurn, refundAmount, address(this)); ``` - The `tokensToBurn` appears to be used for bookkeeping purposes without compensating the potential transfer fees. - Note: `burn` is an external function and its behavior wasn't evaluated.

LowNo Upper Limit for `creationFee`Open

There are no upper boundaries for `creationFee` which is a fee charged for the creation of tokens in the Mint Club platform. It is possible to set the fee up to any arbitrary amount. ```solidity constructor(address protocolBeneficiary_, uint256 creationFee_, address msgSender) Ownable(msgSender) { protocolBeneficiary = protocolBeneficiary_; creationFee = creationFee_; } ``` --- ```solidity function updateCreationFee(uint256 amount) external onlyOwner { creationFee = amount; emit CreationFeeUpdated(amount); } ```

LowPotential DOS AttackOpen

The issue lies within the `MCV2_Royalty` contract where users are required to pay creation fee while creating bond tokens. The creation fee is transferred to the `protocolBeneficiary` address, which can be altered by the contract owner. ```solidity=108 (bool success, ) = payable(protocolBeneficiary).call{value: amount}(""); if (!success) revert MCV2_Royalty__CreationFeeTransactionFailed(); ``` If the `protocolBeneficiary` is a malicious contract that either lacks a `receive()` or `fallback()` function, or explicitly rejects incoming native coins, this will lead to the entire transaction being reverted. This means that users will be unable to create tokens - a situation known as a denial of service (DoS) attack.

LowPotential Out-of-Gas ExceptionOpen

When a loop allows an arbitrary number of iterations or accesses state variables in its body, the function may run out of gas and revert the transaction. ```solidity=355 for (uint256 i = getCurrentStep(token, currentSupply); i < steps.length; ++i) { ``` Function `MCV2_Bond.getReserveForToken` contains a loop and its loop condition depends on state variables: `tokenBond`. --- ```solidity=439 while (i >= 0 && tokensLeft > 0) { ``` Function `MCV2_Bond.getRefundForTokens` contains a loop and its loop condition depends on external calls: `t.totalSupply`. In the `MCV2_Bond` contract, there is no limitation on `MAX_STEPS`. If there are a large number of steps in a bond, it may cause the above loops run out of gas.

LowSolidity version 0.8.20 won't work on all chainsOpen

The compiler for Solidity 0.8.20 switches the default target EVM version to [Shanghai](https://blog.soliditylang.org/2023/05/10/solidity-0.8.20-release-announcement/#important-note), which includes the new `PUSH0` op code. The compiler for Solidity [0.8.21](https://github.com/ethereum/solidity/releases) did not remove the `PUSH0` op code. This op code may not yet be implemented on all L2s, so deployment on these chains will fail. To work around this issue, use an earlier [EVM](https://docs.soliditylang.org/en/v0.8.20/using-the-compiler.html?ref=zaryabs.com#setting-the-evm-version-to-target) [version](https://book.getfoundry.sh/reference/config/solidity-compiler#evm_version)

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

  • contracts/MerkleDistributor.sol
  • contracts/MCV2_ZapV1.sol
  • contracts/MCV2_MultiToken.sol
  • contracts/lib/ERC1155Initializable.sol
  • contracts/MCV2_Royalty.sol
  • contracts/Locker.sol
  • contracts/MCV1_Wrapper.sol
  • contracts/MCV2_Bond.sol
  • contracts/MCV2_Token.sol
  • contracts/lib/ERC20Initializable.sol

Part of Mint Club’s security record

Mint Club
Audits1 audit by 1 firmLast audit Jan 2024, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Mint Club’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 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