Part of CertiK’s retainer series
CertiK reviewed WEMIX (Wemix Retainer 117 SupportProjectTreasuryV2) on 28 May 2024: 12 findings, 0 critical; 5 marked fixed, 7 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 | 2 |
| Low | 5 | 0 | 3 |
In the contract `SupportProjectTreasuryV2` the role `SUPPORT_PROJECT_ROLE` has authority to sign a signature to call `support()` to support projects. Any compromise to the `SUPPORT_PROJECT_ROLE` account may allow the hacker to take advantage of this authority. In the contract `SupportProjectTreasuryV2` the role `SUPPORT_PROJECT_TREASURY_DEPLOYER_ROLE` has authority to sign a signature to call `setMaxRefunderNumber()`. Any compromise to the `SUPPORT_PROJECT_TREASURY_DEPLOYER_ROLE` account may allow the hacker to take advantage of this authority. In the contract `SupportProjectTreasuryV2` the role `SETTLE_SUPPORT_PROJECT_ROLE` has authority to sign a signature and grant authority to the role `projectOwner` to call `settleProject()`. Any compromise to the `SETTLE_SUPPORT_PROJECT_ROLE` and `projectOwner` accounts may allow the hacker to take advantage of this authority. In the contract `SupportProjectTreasuryV2` the role `CANCEL_SUPPORT_PROJECT_ROLE` has authority to sign a signature and grant authority to the role `projectOwner` to call `cancelProject()`. Any compromise to the `CANCEL_SUPPORT_PROJECT_ROLE` and `projectOwner` accounts may allow the hacker to take advantage of this authority. In the contract `SupportProjectTreasuryV2` the role `CANCEL_SUPPORT_PROJECT_ROLE` has authority to sign a signature to call `deactivateProject()`. Any compromise to the `CANCEL_SUPPORT_PROJECT_ROLE` account may allow the hacker to take advantage of this authority.
The SupportProjectTreasuryV2 contract inherits upgradeable contracts, indicating that it is part of an upgradeable system. Upgradeable contracts often pair with a proxy contract that is responsible for managing contract upgrades. The `privileged roles` of the proxy often have the authority to update the implementation contract. Any compromise to the privileged account may allow a hacker to take advantage of this authority and change the implementation contract which is pointed by proxy and therefore execute potential malicious functionality in the implementation contract.
The signature computed at the pointed lines does not include any information regarding the chain the contract is deployed to. In the case in which the `SupportProjectTreasuryV2` contract is deployed on multiple blockchains, then the signatures used on one chain for a certain account, can be reused as-is on each chain where the contract is present.
The implementation of the function `isContract()` check can not cover all scenarios. The check can be bypassed if the call is from the constructor of a smart contract or when the contract is destroyed. Because, in that case, the codesize will also be zero. The "isContract" function in the OpenZeppelin "Address" library uses the same implementation, but comments mention that "it's unsafe to rely on the check and it can be bypassed". Reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
Supporters have the option to donate either WEMIX or WepublicPoint to the `SupportProjectTreasuryV2` contract to support projects. However, if supporters choose to support a project with WepublicPoint, the actual transfer of WepublicPoint does not occur.
The `cancelProject()` function allows the `projectOwner` to cancel a project and refund assets to supporters after inputs are signed by a signer with the `CANCEL_SUPPORT_PROJECT_ROLE` role. However, the input `supporters` list is not included in the signed data. This omission allows the `projectOwner` to alter the list of supporters using the same signature.
In the `deactivateProject()` and `cancelProject()` functions, the `timestamp` is included in the `packedData` that is used to verify the provided `signature`. However, there is no explicit check within the function to validate the `timestamp` against any other time-related constraint. This raises concerns that the `timestamp` may not be serving its intended purpose, as there is no validation to ensure it falls within an acceptable range.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
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