Wemix Retainer 42 (play, cypress settler v2)

CertiKFiles named in the report

Audit

Part of CertiK’s retainer series

CertiK reviewed WEMIX (Wemix Retainer 42 (play, cypress settler v2)) on 18 Jul 2023: 7 findings, 0 critical; 1 marked fixed, 6 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium000
Low501
HighCentralization Related RisksOpen

In the contract `AccessContractRegistry` the role `_owner` has authority over the function shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the address of `contractRegistry`. ![](https://accelerator-tasks-prod.acc.corp.certik.com/1128bc526d584ae78f6ed00354e1c5c0/diagrams/centralization_ContractRegistry-AccessContractRegistry-_owner.svg) --- In the contract `CypressSettlerV2` the roles `_owner` and `_validator` have authority over the functions shown in the diagram below. Any compromise to the `_owner` or `_validator` account may allow the hacker to take advantage of this authority and settle the WEMIX Classic and transfer the WEMIX Classic to the Wemix vault (main net). ![](https://accelerator-tasks-prod.acc.corp.certik.com/906d1cb6f37e4f149591bdeaba8cb8a4/diagrams/centralization_CypressSettlerV2-CypressSettlerV2-_validator.svg) ----- In the contract `PlaySettlerV2` 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 `setMinVal`, call `setPeriod()` to set the swap deadline period and call `setCurrencyVault()` to set vaults of currency tokens (p.wemix and p.wemix$). ![](https://accelerator-tasks-prod.acc.corp.certik.com/906d1cb6f37e4f149591bdeaba8cb8a4/diagrams/centralization_PlaySettlerV2-PlaySettlerV2-_owner.svg) In the contract `PlaySettlerV2` the roles `owner` and `_validator` have authority over the functions shown in the diagram below. Any compromise to the `owner` or `_validator` account may allow the hacker to take advantage of this authority and settle tokens, `setMinVal()`, transfer `p.wemix` and `p.wemix$` to the Wemix vault (main net), call `changeSwapOption()` to change `swapOption`, call `setSettleDexInfo()` to initialize the balance and settled amount of vault, and call `insertSettleDexInfo()` to manually add swap settlement information. ![](https://accelerator-tasks-prod.acc.corp.certik.com/906d1cb6f37e4f149591bdeaba8cb8a4/diagrams/centralization_PlaySettlerV2-PlaySettlerV2-_validator.svg) ----- In the contract `SettlerBaseV2` 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 to withdraw tokens, call `setAcquirePercent()` to set close to 100% acquire rate, call `setTokenVault()` to set token vault, and call `setBurner()` to set burner address. ![](https://accelerator-tasks-prod.acc.corp.certik.com/906d1cb6f37e4f149591bdeaba8cb8a4/diagrams/centralization_SettlerBaseV2-SettlerBaseV2-_owner.svg) In the contract `SettlerBaseV2` the roles `owner` and `_validator` have authority over the functions shown in the diagram below. Any compromise to the `owner` or `_validator` account may allow the hacker to take advantage of this authority to call `setSettleInfo()` to initialize the balance and settled amount of vault, call `insertSettleInfo()` to manually add settlement information, and call `insertTransferInfo()` to manually add transfer history. ![](https://accelerator-tasks-prod.acc.corp.certik.com/906d1cb6f37e4f149591bdeaba8cb8a4/diagrams/centralization_SettlerBaseV2-SettlerBaseV2-_validator.svg)

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.

LowNo Upper Limits for Acquire RateOpen

There is no upper limit restricting the parameter of `setAcquirePercent()`, potentially enabling close to 100% of the acquire rate on transactions. If the `acquirePercent` is too high, swap settlement will remove a significant amount of liquidity, which could seriously affect the token price.

LowPotential Divide by ZeroOpen

Performing division by zero would raise an error and revert the transaction. ```solidity=352 uint balanceA = (amount.mul(reserveA)).div(lpSupply); uint balanceB = (amount.mul(reserveB)).div(lpSupply); ``` The expression `(amount.mul(reserveA)).div(lpSupply)` may be divided by zero. Its divisor has an estimated interval [0, 115792089237316195423570985008687907853269984665640564039457584007913129639935].

LowState Variable Should Be Declared ConstantOpen

State variables that never change should be declared as `constant` to save gas. ```solidity=42 uint public denominator = 1 ether; // denominator for calculate settle amount ``` - `denominator` should be declared `constant`.

LowThird-Party Dependency UsageOpen

The contract is serving as the underlying entity to interact with one or more third party protocols. The scope of the audit treats third party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. - The contract `PlaySettler` interacts with third party contract with `IPlaySwapRouter` interface via `psr`.

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)

  • contracts/System/Settler/v2/SettlerBaseV2.sol
  • contracts/System/Settler/v2/CypressSettlerV2.sol
  • contracts/System/Settler/v2/PlaySettlerV2.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,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