Part of CertiK’s retainer series
CertiK reviewed WEMIX (Wemix Retainer 121 wepublicBank) on 2 Aug 2024: 7 findings, 0 critical; 3 marked fixed, 4 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 | 2 | 0 | 3 |
In the contract `FundingProjectTreasury` the role `FUNDING_PROJECT_TREASURY_DEPLOYER_ROLE` has authority over the functions - `addReward()` - `deactivateProject()` - `setMaxRefunderNumber()` - `setTokenAddress()` Any compromise to the `FUNDING_PROJECT_TREASURY_DEPLOYER_ROLE` account may allow the hacker to take advantage of this authority and - add reward items - set the project as `deactivated` for a refund when project is cancelled - set the number of the refunders - set the address of the NFT reward ------------------------------------------------------ In the contract `FundingProjectTreasury` the role `CANCEL_FUNDING_PROJECT_ROLE` has authority over the function `proxyCancelProject()`. Any compromise to the `CANCEL_FUNDING_PROJECT_ROLE` account may allow the hacker to take advantage of this authority and cancel the project. ------------------------------------------------------ In the contract `FundingProjectTreasury` the role `REWARD_DISTRIBUTOR_ROLE` has authority over the function `distributeReward()`. Any compromise to the `REWARD_DISTRIBUTOR_ROLE` account may allow the hacker to take advantage of this authority and distribute the NFT reward. ------------------------------------------------------ In the contract `FundingProjectTreasury` the role `projectOwner` has authority over the functions - `cancelFundByOwner()` - `cancelProject()` - `settleProject()` Any compromise to the `projectOwner` account may allow the hacker to take advantage of this authority and - cancel fund - cancel the project - settle the project ------------------------------------------------------ In the contract `WepublicPointV3Logic` the role `DEFAULT_ADMIN_ROLE` has authority over the function `setFundingProjectTreasuryBeacon()`. Any compromise to the `DEFAULT_ADMIN_ROLE` account may allow the hacker to take advantage of this authority and set funding project treasury beacon ------------------------------------------------------ In the contract `WepublicPointV3Logic` the role `FUNDING_PROJECT_TREASURY_DEPLOYER_ROLE` has authority over the function `deployFundingProjectTreasury()`. Any compromise to the `FUNDING_PROJECT_TREASURY_DEPLOYER_ROLE` account may allow the hacker to take advantage of this authority and deploy funding project treasury contract.
In the contract `FundingProjectTreasury`, the role `DEFAULT_ADMIN_ROLE` has the authority to update the implementation contract behind the Beacon proxy contract. Any compromise to the `DEFAULT_ADMIN_ROLE` 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 `abi.encodePacked()` function encodes the given arguments into bytes using tightly packed, contiguous encoding. However, the argument `rewardsToCancel`, `bulkCancelInfos` and `funders` are not included as part of the signature message. This omission leads to insufficient checks on these arguments, potentially allowing malicious actors to manipulate these values without proper signature validation. ```solidity=424 bytes memory packedData = abi.encodePacked( "CANCEL_FUND", msg.sender, timestamp, projectTreasury, cancelAmount //@audit: `rewardsToCancel` not encoded in message ); require( RbacSignatureValidator.isValidSignature( wepublicPoint, keccak256(packedData), signature, CANCEL_FUND_ROLE ), "FundingProjectTreasury: invalid signature" ); ``` ```solidity=553 bytes memory packedData = abi.encodePacked( "CANCEL_FUNDING_PROJECT", msg.sender, timestamp, projectTreasury //@audit: `funders` not encoded in message ); require( RbacSignatureValidator.isValidSignature( wepublicPoint, keccak256(packedData), signature, CANCEL_FUNDING_PROJECT_ROLE ), "FundingProjectTreasury: invalid signature" ); ```
In the function `fund()`, the `timestamp` parameter is intended to refer to the current time but lacks validation to ensure it matches `block.timestamp` and falls within the project's start and end timestamps. Additionally, there are no checks to ensure that the `rewardId` in the `rewards` array for the `fund()` function and the `rewardsToCancel` array for the `cancelFund()` function are within the valid range (Within the range of `rewardInfos.length`). This can lead to issues such as array index out-of-bounds errors.
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