Wemix Retainer 137 HSPFE

CertiKFiles named in the report

Audit

Part of CertiK’s retainer series

CertiK reviewed WEMIX (Wemix Retainer 137 HSPFE) on 31 Oct 2024: 8 findings, 0 critical; 4 marked fixed, 4 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings8

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium100
Low204
HighCentralization RisksOpen

In the contract `SPBase`, 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 set vault addresses, set the base fee percentages, set the end block, and set the compounder address. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPBase-SPBase-_owner.svg) In the contract `SPMineSchedule`, 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 set pre-stake period information, set the reward schedule, toggle allow pre-stake status. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPMineSchedule-SPMineSchedule-_owner.svg) In the contract `SPBridgeClaim`, 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 set the bridge claim fee percent, set the destination chain, set the token bridge ID, and set the bridge address. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPBridgeClaim-SPBridgeClaim-_owner.svg) In the contract `SPCoolTime`, 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 set the cool time force fee percent, set the unstake cool time, set the claim cooldown time, and set the stake cool time. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPCoolTime-SPCoolTime-_owner.svg) In the contract `HSPFactory`, 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 end all processes at specified block, deploy HSPforGOD contract and handle outcomes, and set the end block for `HSPforGOD`, after which users can no longer stake/unstake/claim tokens. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPFactory-HSPFactory-_owner.svg) In the contract `HSPforGOD`, 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 pause the function with a specified id which prevents staking, unstaking, or claiming reward, shutdown and transfer token balances, or unpause a specified id. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPforGOD-HSPforGOD-_owner.svg) In the contract `HSPforGOD`, the role `_signer` has authority over the functions shown in the diagram below. Any compromise to the `_signer` account may allow the hacker to take advantage of this authority and set the end block. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SPforGOD-HSPforGOD-_signer.svg) In the contract `SignerRole`, 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 add or remove a signer account. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ef-92e1-41425da0-b466-67e67fb2f769/diagrams/centralization_SignerRole-SignerRole-_owner.svg) For protocol fees, the fee cap is < 100%, which means that theoretically protocol fees can constitute the vast majority of users' staked tokens or reward tokens.

MediumPotentially Insufficient `rt` Balance Could BlockOpen

In the `unstake()` function, the `_claim()` function is called. In order for the `_claim()` function to execute successfully, there needs to be sufficient `rt` token balance in the `rtVault` contract or `address(this)`, depending on the setup of the contract. There is no guarantee that there is always sufficient `rt` token balance, in which case users would be unable to withdraw their staked token balance. Note that while the `onlyMining` modifier used in the `stake()` function enforces that `totalMinedRT() < amountMax` which mitigates the situation in which users stake into the pool when reward has already run out, there's no enforcement that the `rt` token balance in the `rtVault` contract or `address(this)` is consistent with `amountMax` when the pool is set up initially, and as such insufficient reward token balance could still happen.

Low`approve` return value not checkedOpen

Not all `IERC20` implementations `revert` when there's a failure in `approve`. The function signature has a `boolean` return value and they indicate errors that way instead. By not checking the return value, operations that should have been marked as failed may potentially go through without actually approving anything.

LowOut of scope Dependency UsageOpen

The in-scope contracts interact with one or more out of scope contracts, such as `recipientRoleV6`, `WemixBridge`, `stVault`, `rtVault`, `rt` and `st` tokens etc. The scope of the audit treats those entities as black boxes and assumes their functional correctness. However, in the real world, those contracts can be compromised and this may lead to lost or stolen assets. In addition, `rt` and `st` tokens cannot be deflationary or fee-on-transfer tokens, and upgrades of any out-of-scope contract can potentially create severe impacts.

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 (4)

  • Mir4Global/Staking/SPFactory.sol
  • Common/staking/v2/option/SPBridgeClaim.sol
  • Mir4Global/Staking/SPforGOD.sol
  • Common/staking/v2/base/calculator/SPFeeCalculator.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,375 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