MUD

CertiKFiles named in the report

CertiK reviewed Metaverse User DAO (MUD) on 16 Dec 2022: 32 findings, 2 critical; 18 marked fixed, 14 open.

2 critical findings, fixed
Open the reportOpen Metaverse User DAO’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings32

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

SeverityOpenAcknowledgedFixed
Critical002
High600
Medium101
Low7015
HighCentralization Risks in icoReleaseAngelRound.solOpen

In the contract `MudAngelRoundReleaseBank` the role `admin` has authority over the functions shown below. - function icoDeposit() Any compromise to the `admin` account may allow the hacker to take advantage of this authority.

HighCentralization Risks in icoReleaseRoundAB.solOpen

In the contract `MudABRoundReleaseBank` the role `admin` has authority over the functions shown below. - function icoDeposit() Any compromise to the `admin` account may allow the hacker to take advantage of this authority.

HighCentralization Risks in miningPool.solOpen

In the contract `MudMiningPool` the role `admin` has authority over the functions shown in the diagram below. Any compromise to the `admin` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/3a818d8615fd4017b39d4b7a7e9b5656/diagrams/centralization_miningPool-MudMiningPool-admin.svg) In the contract `MudMiningPool` the role `miningDappAddress` has authority over the functions shown in the diagram below. Any compromise to the `miningDappAddress` account may allow the hacker to take advantage of this authority. ![](https://accelerator-tasks-prod.acc.corp.certik.com/3a818d8615fd4017b39d4b7a7e9b5656/diagrams/centralization_miningPool-MudMiningPool-miningDappAddress.svg)

HighCentralization Risks in teamRelease.solOpen

In the contract `MudABRoundReleaseBank` the role `admin` has authority over the functions shown below. - function teamMemberDeposit() Any compromise to the `admin` account may allow the hacker to take advantage of this authority.

HighCentralization Risks in Token.solOpen

In the contract `MudTestToken` the role `creator` has authority over the functions shown below. - function icoFinalised() - function icoTransferFrom() Any compromise to the `creator` account may allow the hacker to take advantage of this authority.

HighInitial Token DistributionOpen

All of the 1000000000 `MUD` tokens are sent to the contract deployer when deploying the contract. This could be a centralization risk as the deployer can distribute these tokens without obtaining the consensus of the community.

MediumIncompatibility 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 For example: ```solidity=61 token.transferFrom(msg.sender, contractorAddr, amount); ``` - Transferring tokens by `amount`. ```solidity=53 require(amount + token.balanceOf(contractorAddr) <= teamMemberBalance, "amount overflow!"); ``` - The `amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.

LowDivide Before MultiplyOpen

Performing integer division before multiplication truncates the low bits, losing the precision of calculation. ```solidity=86 uint256 freeAmount = (now - bank[addressToCheck].lastTime) / secPerDay * bank[addressToCheck].dailyReleaseAmount; ``` --- ```solidity=106 uint256 freeAmount = (now - bank[msg.sender].lastTime) / secPerDay * bank[msg.sender].dailyReleaseAmount; ``` --- ```solidity=86 uint256 freeAmount = (now - bank[addressToCheck].lastTime) / secPerDay * bank[addressToCheck].dailyReleaseAmount; ``` --- ```solidity=105 uint256 freeAmount = (now - bank[msg.sender].lastTime) / secPerDay * bank[msg.sender].dailyReleaseAmount; ``` --- ```solidity=96 uint256 freeAmount = SafeMath.div(now - bank[addressToCheck].lastTime, secPerDay).mul(bank[addressToCheck].dailyReleaseAmount); ``` --- ```solidity=115 uint256 freeAmount = SafeMath.div(now - bank[msg.sender].lastTime, secPerDay).mul(bank[msg.sender].dailyReleaseAmount); ```

LowFinancial Model for `MUD`Open

While transferring MUD tokens, it requires the frozen flag is disabled, otherwise, it's not allowed to transfer. Once the frozen flag is enabled, there is no way to disable it. So no transfer could success then.

LowFunction Should Be Declared ExternalOpen

The functions which are never called internally within the contract should have external visibility for gas optimization. ```solidity=43 function totalSupply() public view returns (uint256) { ``` --- ```solidity=50 function balanceOf(address account) public view returns (uint256) { ``` --- ```solidity=62 function transfer(address recipient, uint256 amount) public returns (bool) { ``` --- ```solidity=70 function allowance(address owner, address spender) public view returns (uint256) { ``` --- ```solidity=81 function approve(address spender, uint256 value) public returns (bool) { ``` --- ```solidity=118 function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { ``` --- ```solidity=137 function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { ``` --- ```solidity=148 function burnFrom(address account, uint256 amount) public { ``` --- ```solidity=27 function name() public view returns (string memory) { ``` --- ```solidity=35 function symbol() public view returns (string memory) { ``` --- ```solidity=33 function mainNetMappingFreeze() public { ``` --- ```solidity=41 function icoFinalised() public returns (bool) { ``` --- ```solidity=63 function icoTransferFrom(address sender, address recipient, uint256 amount) public returns (bool) { ``` --- ```solidity=48 function icoDeposit(address investorAddress, uint256 amount) onlyAdmin public returns (uint256) { ``` --- ```solidity=71 function checkBalance(address addressIn) public view returns (uint256 , uint256 ) { ``` --- ```solidity=100 function releaseToken() public returns (uint256, uint256) { ``` --- ```solidity=49 function icoDeposit(address investorAddress, uint256 amount) onlyAdmin public returns (uint256) { ``` --- ```solidity=71 function checkBalance(address addressIn) public view returns (uint256 , uint256 ) { ``` --- ```solidity=99 function releaseToken() public returns (uint256, uint256) { ``` --- ```solidity=38 function deposit(uint256 amount, uint8 duration) public returns (uint256) { ``` --- ```solidity=62 function breakContract(uint256 contractId) public returns(uint256, uint256) { ``` --- ```solidity=87 function checkBalance(address addressIn) public view returns (uint256, uint256) { ``` --- ```solidity=120 function Withdraw() public returns (uint256, uint256) { ``` --- ```solidity=50 function miningStart() public returns (uint) { ``` --- ```solidity=94 function checkBalance() public view returns (uint256) { ``` --- ```solidity=101 function withdraw() public returns (uint256) { ``` --- ```solidity=50 function teamMemberDeposit(address teamMemberAddress, uint256 amount) onlyAdmin public returns (uint256) { ``` --- ```solidity=71 function checkBalance(address addressIn) public view returns (uint256 , uint256 ) { ``` --- ```solidity=106 function releaseToken() public returns (uint256, uint256) { ```

Show 4 more
LowHard Code AddressOpen

There are some hard code addresses in the project code.

LowMeaningless ComparsionOpen

File: teamRelease.sol According to #L56, the last time of team lock is set to `teamLockingStart + secPerYear + 1` which is definitely greater than `teamLockingStart + secPerYear`. ```solidity=56 bank[teamMemberAddress].lastTime = teamLockingStart + secPerYear + 1; ``` Since last time of lock can only be set when the deposit or release occurred. So it is meaningless to check if last time is greater than `teamLockingStart + secPerYear`. ```solidity=120 bank[msg.sender].lastTime = now; ``` Condition in #L89 can not be met because of the check on #L80. #L110 is redundant as it can be covered by Line #111 and #112. ```solidity=110 require(now > teamLockingStart + secPerYear, "in locking period!"); require(bank[msg.sender].lastTime > teamLockingStart + secPerYear, "locking time incorrect!"); require(now > bank[msg.sender].lastTime + secPerDay, "now < lastTime + secPerDay"); ``` Based on above analysis, comparisons in #L89, #L93, #L110, #L111 are meaningless. --- File: miningEscrow.sol The first Line #98, `_cursors[addressToCheck].start > _cursors[addressToCheck].end` is always true as it has been validated in Line #96. ```solidity=96 require(_cursors[addressToCheck].start <= _cursors[addressToCheck].end, "start > end"); if (_cursors[addressToCheck].start > _cursors[addressToCheck].end || _cursors[addressToCheck].start == 0) { return (0, 0); } ```

LowMissing Error MessagesOpen

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.

LowToo Many DigitsOpen

Literals with many digits are difficult to read and review. ```solidity=18 uint256 private icoLeftoverAmount = 300000000000000; ``` --- ```solidity=29 _mint(msg.sender, 1000000000 * (10 ** uint256(decimals()))); ``` --- ```solidity=15 uint256 constant angelRoundLimit = 50000000000000; //angel round total limit 50000000 MUD ``` --- ```solidity=57 bank[investorAddress].dailyReleaseAmount = amount.mul(dailyRate).div(100000000); //amount * dailyRate / 100000000; ``` --- ```solidity=15 uint256 constant angelRoundLimit = 250000000000000;//rouna A and B total limit 250000000 MUD ``` --- ```solidity=58 bank[investorAddress].dailyReleaseAmount = amount.mul(dailyRate).div(10000000); //amount * dailyRate / 100000000; ``` --- ```solidity=42 require(amount == 450000000000000); //should be 45% of total coins, 450000000 MUD ``` --- ```solidity=15 uint256 constant teamMemberBalance = 160000000000000; //160000000 MUD ``` --- ```solidity=58 bank[teamMemberAddress].dailyReleaseAmount = amount.mul(dailyRate).div(10000000); //amount * dailyRate / 10000; ```

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

  • miningPool.sol
  • Token.sol
  • SafeMath.sol
  • miningEscrow.sol
  • TRC20Detailed.sol
  • TRC20.sol
  • icoReleaseAngelRound.sol
  • UtilityFunctions.sol
  • ITRC20.sol
  • icoReleaseRoundAB.sol
  • teamRelease.sol

Part of Metaverse User DAO’s security record

Metaverse User DAO
Audits4 audits by 1 firmLast audit Sep 2023, by CertiK.
Critical findingsNo open critical findingsAcross the 4 reports, 2 critical findings were reported. Each is marked fixed by the firm that reported it.
Open Metaverse User DAO’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