Metadex

CertiKFiles named in the report

CertiK reviewed MetaDex on 7 Feb 2023: 23 findings, 0 critical; 17 marked fixed, 1 acknowledged, 5 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings23

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

SeverityOpenAcknowledgedFixed
Critical000
High010
Medium000
Low5017
LowContract Can Lock MetaDex IndefenitelyOpen

When calculating the amount that each ticket can claim or the amount that may be auto injected it is rounded down. This can cause the `amountToShareToWinners` to be larger than the amount that can actually be claimed/auto-injected. In this case the difference will be locked in the contract forever as there is no way to recover the tokens.

LowThird Party DependenciesOpen

The contract is serving as the underlying entity to interact with third party VRF. 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 lost or stolen assets. In addition, upgrades of 3rd parties can possibly create severe impacts, such as increasing fees of 3rd parties, migrating to new LP pools, etc.

LowToo Many DigitsOpen

Literals with many digits are difficult to read and review. ```solidity=168 require((thisTicketNumber >= 1000000) && (thisTicketNumber <= 1999999), "Outside range"); ``` --- ```solidity=170 _numberTicketsPerLotteryId[_lotteryId][1 + ((thisTicketNumber / 100000) % 10)]++; ``` --- ```solidity=174 _numberTicketsPerLotteryId[_lotteryId][11111 + ((thisTicketNumber / 10) % 100000)]++; ``` --- ```solidity=175 _numberTicketsPerLotteryId[_lotteryId][111111 + ((thisTicketNumber / 1) % 1000000)]++; ``` --- ```solidity=669 uint32 transformedWinningNumber = _bracketCalculator[_bracket] + ((winningTicketNumber / (100000 / (uint32(10)**_bracket)) ) % (uint32(10)**(_bracket + 1))); ``` --- ```solidity=672 uint32 transformedUserNumber = _bracketCalculator[_bracket] + ((userNumber / (100000 / (uint32(10)**_bracket)) ) % (uint32(10)**(_bracket + 1))); ``` --- ```solidity=16 constructor() ERC20("METADEX", "METADEX") ERC20Capped(1000000000 * (10**uint256(18))) { ```

LowUnnecessary `payable` Address TypeOpen

In `release()` function, the address `vestingSchedule.beneficiary` is casted to `address payable` type, but no base currency tokens are transferred in or out from that address. So it is an unnecessary casting operation.

LowUnnecessary Use of SafeMathOpen

The `SafeMath` library is used unnecessarily in `TokenVesting.sol`. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow.

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)

  • vesting/TokenVesting.sol
  • lottery/MetaDexLottery.sol
  • token/MetaDexToken.sol

Part of MetaDex’s security record

MetaDex
Audits1 audit by 1 firmLast audit Feb 2023, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open MetaDex’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