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.
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 | 1 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 5 | 0 | 1 |
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`.  --- 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).  ----- 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$).  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.  ----- 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.  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. 
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.
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.
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].
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`.
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`.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (3)
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