Part of CertiK’s retainer series
CertiK reviewed WEMIX (Wemix Retainer 43 (Staking Pool Mainnet)) on 3 Aug 2023: 9 findings, 0 critical; 3 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 | 1 | 0 | 0 |
| Low | 4 | 0 | 3 |
In the contract `Compounder` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPRevenue` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPSchedule` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPBase` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPMineSchedule` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPCoolTime` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPLimit` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPLockUp` the role `_owner` has authority over the functions shown in the diagram below.  In the contract `SPMultiPoint` the role `_owner` has authority over the functions shown in the diagram below.  Any compromise to the `_owner` role would allow the malicious user to drain all `st` and `rt` token from the contract or the respective vault, and change other critical parameters in the project such as changing fee amount.
In the `unstakeWithCompound()` function, the `_compound()` function could increase the user's staked balance from converting accumulated reward to `st` token, such that there is residual staked balance for the user, even if the input argument `amount` is the user's total staked balance before calling the function.
The `setBaseFeePercent()` and `_setFeePercent()` functions only require each fee to be no greater than 100%. In the extreme case, the fee could be as high as 100%, in which case all user funds would go to the fee address.
A sandwich attack may happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (executing before the target) a transaction to purchase one of the assets and make profits by backrunning (executing after the target) a transaction to sell the asset. The following function is called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large: - `PlaySwapRouter(psr).swapExactTokensForTokens(amountRT, 0, path, address(this), _deadline());`
The contract is serving as the underlying entity to interact with one or more third party protocols / addresses, such as `psr`, `ExecuteManager`, `rt`, `st`, `rtVault`, `stVault`, etc.. The scope of the audit treats third party entities as black boxes and assume 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 etc.
The `SPBase` contract contains no restriction on the `rt` and `st` token addresses. If they are the same address, and the `rtVault` and `stVault` are also the same address as is the default in the constructor, then user A's staked token might be paid out as reward to user B when user B claims reward. This is possible because the contract does not guarantee that there's always sufficient `rt` token balance for reward payout, and there's no clear separation of funds.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (2)
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