WeMix - Liquid Staking audit

CertiKFiles named in the report

CertiK reviewed WEMIX (WeMix - Liquid Staking audit) on 5 Dec 2022: 7 findings, 1 critical; 4 marked fixed, 3 open.

1 critical finding, fixed
Open the reportOpen WEMIX’s security record

Report hosted on skynet.certik.com.

Statuses are the security firm’s own, from this report. Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical001
High200
Medium001
Low102
Critical`WEMIX` is not transferred to the userFixed

In the function `deposit()`, the user deposits `WEMIX` into the contract, then the contract deposits them into the Staking address and mints share `stWEMIX` token to the user. But when the user calls the function `withdraw()`, the function burns the share `stWEMIX` token of the user and withdraws `WEMIX` token from the Staking address to the contract. No action was taken to transfer the `WEMIX` token to the user. So the user can not get the `WEMIX`. ```solidity=254 function _withdraw(uint256 amount_) internal returns (uint256 wemixAmount_) { address msgSender = _msgSender(); require(amount_ != 0, "StWEMIX::_withdraw:CANNOT_WITHDRAW"); require( amount_ <= balanceOf(msgSender), "StWEMIX::_withdraw:NOT_ENOUGH_BALANCE" ); // burn uint256 _fee = getSharesByPooledWEMIXWithFee(fee()); // in stWEMIX wemixAmount_ = getPooledWEMIXBySharesWithFee(amount_); _burn(msgSender, amount_); // unstaking staking.withdraw(pid, wemixAmount_, payable(address(this)), false); // compound _compound(); emit Withdrew(msgSender, wemixAmount_); // fee _mint(treasury, _fee); } ```

MediumNo Upper Limits for FeesFixed

The function `feeUpdate()` does not limit the percentage of fees applied. The fee of phase two rates could therefore be 100%. If the `feePhaseTwo` is set to `10000`, the reward will be 0 and all fees will be sent to the treasury address.

LowMissing Zero Address ValidationFixed

Addresses should be checked before assignment or external call to make sure they are not zero addresses. ```solidity=52 treasury = treasury_; ``` - `treasury_` is not zero-checked before being used.

LowRedundant Code ComponentsFixed

The linked statements do not affect the functionality of the codebase and appear to be either leftovers from test code or older functionality.

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/interfaces/IStWEMIX.sol
  • contracts/interfaces/IStaking.sol
  • contracts/StWEMIX.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,393 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