Wemix Retainer 125 WemixPayment Contract

CertiKFiles named in the report

Audit

Part of CertiK’s retainer series

CertiK reviewed WEMIX (Wemix Retainer 125 WemixPayment Contract) on 16 Oct 2024: 11 findings, 0 critical; 3 marked fixed, 8 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium100
Low503
LowIncorrect Code Comment for unexecutable Mapping iFixed

The code comments for the mapping `unexecutable` states true stands for support, false stands for unsupport. However, in the modifier `onlyServiceSupport`, in case unexecutable returns true, the modifier will revert a message `NotSupport`, which indicates the code comments is incorrect. The code comments associated with the `unexecutable` mapping indicate that a value of true means support, while a value of false indicates no support. However, this documentation is misleading in the context of the `onlyServiceSupport` modifier. The modifier is designed to revert with the message NotSupport if `unexecutable` returns true, which contradicts the provided comments.

LowMissing Sanity Check in `_initCore` for `_router`Fixed

In the contract, the `setRouter` function includes a check to ensure that the provided router parameter is a valid contract address before proceeding. This check is crucial for maintaining the integrity and security of the contract. However, in the `_initCore` function, the internal `_setRouter` function is called directly with the `_router` parameter without any sanity checks to confirm that it is a valid contract address. This oversight could potentially allow an invalid or malicious address to be set as the router, leading to unintended behavior or vulnerabilities within the contract.

LowMissing Validation for Token PathFixed

The `swapPay()` function is designed to swap a token from the provided path[0] to payInfo.token, indicating that the source token should not be the same as the destination token (payInfo.token). However, the function currently lacks validation to ensure that path[0] is not equal to payInfo.token. Without this check, if path[0] is accidentally set to payInfo.token, the swap operation could lead to an unintended outcome where no effective token swap occurs, or worse, introduce inefficiencies or unnecessary operations in the contract logic. This missing validation can also introduce security risks if not caught during execution.

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

  • contracts/WemixPayment/IWemixPayment.sol
  • contracts/storage/PaymentStorageV2.sol
  • contracts/WemixPayment/WemixPaymentLogic.sol
  • contracts/WemixPayment/WemixPayment.sol
  • contracts/core/IPaymentCoreV2.sol
  • contracts/core/PaymentCoreV2.sol

Part of WEMIX’s security record

WEMIX
Audits75 audits by 1 firmLast audit Feb 2025, by CertiK.
Critical findingsNo open critical findingsAcross the 75 reports, 17 critical findings were reported. Each is marked fixed by the firm that reported it.
Open WEMIX’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