CertiK reviewed Monster Galaxy on 20 Apr 2023: 15 findings, 0 critical; 8 marked fixed, 7 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 2 | 0 | 1 |
| Medium | 1 | 0 | 2 |
| Low | 4 | 0 | 5 |
In the contract `World`, the function `trustWorldBatch()` gets the first address in the `MetaverseStorage.authAddress[id]` and uses the address as the sender argument to pass to the function `WorldCore.trustWorld_()`. This logic is a little confusing because it is different from the logic in the functions `trustWorld()` and `trustWorldBWO()` where the sender is `_msgSender()`. This also increments nonces for the wrong sender. In addition, the function `trustWorld_()` in the contract `WorldCore` is expecting the `_msgSender` as the first parameter.
The function `createAccountBatch()` calls the function `core().createAccount_()` with wrong arguments. The first parameter should be `_msgSender()` instead of `addrs[i]`. This will cause the `require` condition in the second code snippet in the function `MetaverseCore._createAccount()` to always be met. It also increments nonces for the wrong sender. ```solidity=9 function createAccountBatch(address[] calldata addrs, bool[] calldata isTrustAdmins) public onlyOwner { require(addrs.length == isTrustAdmins.length, "Metaverse: length is not match"); require(addrs.length > 0, "Metaverse: length is zero"); for (uint256 i = 0; i < addrs.length; i++) { core().createAccount_(addrs[i], addrs[i], isTrustAdmins[i]); } } ``` ```solidity=129 if (_isTrustAdmin) { require(_address == _sender, "Metaverse: Only AuthAddress can set trustAdmin to true"); } ```
In the new version of contract `MetaverseCore`([commit `d1e5fb67db901378b5c13c662419bc17eb6906a3`](https://github.com/AcertChain/Acert-Contract-V2/blob/d1e5fb67db901378b5c13c662419bc17eb6906a3/contracts/metaverse/MetaverseCore.sol)), the newly added function `unfreezeAccount()` uses the same signature as the functions that add auth accounts, like `addAccountAuthAddress()`, `addAuthAddress_()`, `addAuthAddressBWO_()`. This can cause confusion in the operation of the signatures. The admin can use the `AddAuth` signature for adding auth addresses to unfreeze the account.
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. ```solidity=28 modifier onlyWorld() { require(world == msg.sender); _; } ```
The linked functions `createAccountBatch()`, `removeAllAuthAddress()`, and `trustWorldBatch()` are performing costly operations like accessing storage variables in a loop. EVM may revert this call and return the OUT_OF_GAS exception if the length of the processing list is too large.
The contracts in the protocol have an unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to ambiguity when debugging, as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.
The linked functions are equivalent to the compiler-generated getter functions for the respective variables.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (7)
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething 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