Megamoon - Audit

CertiKFiles named in the report

CertiK reviewed MegaMoon (Megamoon - Audit) on 13 Oct 2022: 19 findings, 2 critical; 14 marked fixed, 5 open.

2 open critical findings
Open the reportOpen MegaMoon’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings19

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

SeverityOpenAcknowledgedFixed
Critical200
High201
Medium001
Low1012
CriticalCentralization Risks in MegamoonLottery.solOpen

In the contract `MegamoonLottery` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and get DAO fee. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonLottery-MegamoonLottery-_owner.svg) In the contract `MegamoonLottery` the role `operatorAddress` has authority over the functions shown in the diagram below. Any compromise to the `operatorAddress` account may allow the hacker to take advantage of this authority and repeatedly call `closeLottery` in a contract to try the best `finalNumber` by reverting bad `finalNumber`. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonLottery-MegamoonLottery-operatorAddress.svg)

CriticalCentralization Risks in MegamoonPilot.solOpen

In the contract `MegaMoonPilot` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority, add & set the staking pool, update the reward multiplier, and emergency withdraws token. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonPilot-MegaMoonPilot-_owner.svg) In the contract `Ownable` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and transfer the ownership. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonPilot-Ownable-_owner.svg)

HighCentralization Risks in MegamoonDealer.solOpen

In the contract `MegamoonDealer` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority,set the lottery address,fee setting,and transfer the contract's ERC tokens. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonDealer-MegamoonDealer-_owner.svg) In the contract `MegamoonDealer` the role `lotteryAddress` has authority over the functions shown in the diagram below. Any compromise to the `lotteryAddress` account may allow the hacker to take advantage of this authority, inject the lottery and return fund from lottery. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_MegamoonDealer-MegamoonDealer-lotteryAddress.svg)

HighCentralization Risks in RandomNumberGenerator.solOpen

In the contract `RandomNumberGenerator` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and change `keyHash` to impact the random number and withdraw LINK tokens. ![](https://accelerator-tasks-prod.acc.corp.certik.com/dea8876e01e548a8b75b72fb0a15787a/diagrams/centralization_RandomNumberGenerator-RandomNumberGenerator-_owner.svg)

LowThird Party DependenciesOpen

The contract is serving as the underlying entity to interact with third party ChainLink Random Oracle protocols. The scope of the audit treats 3rd party entities as black boxes and assume their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to be attacted. In addition, upgrades of 3rd parties can possibly create severe impacts, such as increasing fees of 3rd parties, etc.

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

  • ReentrancyGuard.sol
  • Context.sol
  • Ownable.sol
  • ERC20.sol
  • Address.sol
  • IERC20.sol
  • IERC20Metadata.sol
  • SafeERC20.sol

Part of MegaMoon’s security record

MegaMoon
Audits1 audit by 1 firmLast audit Oct 2022, by CertiK.
Critical findings2 open critical findingsReported in “Megamoon - Audit” by CertiK, Oct 2022. Not marked fixed in that report.
Open MegaMoon’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