Part of CertiK’s retainer series
CertiK reviewed WEMIX (Wemix Retainer 119 DIOSV3 (2)) on 8 Jul 2024: 5 findings, 0 critical; 2 marked fixed, 3 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 | 2 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 1 | 0 | 2 |
The comment in line 21 says "The fixed fee amount specific to WEMIX, set at 0.8 ether.". However the fee amount was hardcoded as 0.08 ether in line 22. ```solidity=21 // The fixed fee amount specific to WEMIX, set at 0.8 ether. uint256 public constant WEMIX_FEE_AMOUNT = 0.08 ether; ``` Besides, the smart contract has hardcoded the fee amount as 0.08 ether. This design choice lacks flexibility and does not allow for dynamic adjustments based on changing network conditions or economic factors.
The function `_distributeReward()` is unconditionally called even when rewardAmount is explicitly set to zero. The scenario under which this occurs is when `wemixDfeeAmount` is greater than the difference between `finalWemixDBalance` and `initialWemixDBalance`. In such a case, the variable rewardAmount is explicitly set to zero, but the function `_distributeReward(rewardAmount)` is still executed. Every unnecessary call to `_distributeReward()` consumes more gas than needed, leading to a financial cost for the callers. ```solidity=180 if(msg.sender.balance < WEMIX_FEE_AMOUNT){ address[] memory path = new address[](2); path[0] = WEMIXD; path[1] = WWEMIX; uint256 wemixDfeeAmount = weswapRouter.getAmountsIn( WEMIX_FEE_AMOUNT, path )[0]; if (wemixDfeeAmount > rewardAmount) { _transferFee(rewardAmount, path); rewardAmount = 0; } else { _transferFee(wemixDfeeAmount, path); rewardAmount = rewardAmount - wemixDfeeAmount; } } _distributeReward(rewardAmount); ```
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (4)
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