Wemix Retainer 26 (NFT Refund)

CertiKFiles named in the report

Audit

Part of CertiK’s retainer series

CertiK reviewed WEMIX (Wemix Retainer 26 (NFT Refund)) on 5 Sep 2023: 7 findings, 0 critical; none marked fixed.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium000
Low600
HighCentralization Related RisksOpen

In the contract `NFTBurnByValidator` the roles `owner` and `validator` have authority over the functions shown in the diagram below. Any compromise to the `owner` or `validator` account may allow the hacker to take advantage of this authority and sign user signatures to burn NFT and refund tokens. ![](https://accelerator-tasks-prod.acc.corp.certik.com/c1d3bc1b4b17400fb404ff764567e04e/diagrams/centralization_NFTBurnByValidator-NFTBurnByValidator-_validatorsig.svg) In the contract `NFTTreasury` 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 `changeTreasury()` and `changeRefundAmount()`. ![](https://accelerator-tasks-prod.acc.corp.certik.com/c1d3bc1b4b17400fb404ff764567e04e/diagrams/centralization_NFTTreasury-NFTTreasury-_owner.svg) In the contract `NFTLockable` 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 to update the status of the `paused` and further pause/resume the token transfer status functionality of the `setTransferable()` function, and set the address of the fee token. ![](https://accelerator-tasks-prod.acc.corp.certik.com/c1d3bc1b4b17400fb404ff764567e04e/diagrams/centralization_NFTLockable-NFTLockable-_owner.svg) In the contract `NFTLockable` the roles `owner` and `validator` have authority over the functions shown in the diagram below. Any compromise to the `owner` or `validator` account may allow the hacker to take advantage of this authority and sign user signatures to mint NFT, and change the transfer status of tokens owned by the user. ![](https://accelerator-tasks-prod.acc.corp.certik.com/c1d3bc1b4b17400fb404ff764567e04e/diagrams/centralization_NFTLockable-NFTLockable-_validatorsig.svg)

LowCannot refund tokens if NFT is unlockedOpen

The `refundByValidator()` function unlocks the NFT before refunding tokens. Once the NFT has been unlocked, it cannot be burned to refund tokens.

LowMalleability of `abi.encodePacked`Open

Encoding through `abi.encodePacked()` is used with dynamically-sized inputs controlled by the user. This type of encoding is susceptible to malleability when used with strings, bytes, or other dynamically-sized types. As such, it is not a good choice for signature verification with the input used, since users can change the input and potentially get the same bytes output from `abi.encodePacked`. ```solidity=93 onlyValidatorSig(abi.encodePacked(tokenURI, userSig), validatorSig) ``` - `abi.encodePacked` is called with dynamically-sized arguments: `tokenURI`, `userSig` ```solidity=88 string calldata tokenURI, ``` - `tokenURI` is a dynamically-sized external parameter. ```solidity=89 bytes calldata userSig, ``` - `userSig` is a dynamically-sized external parameter.

LowPotential Cross-Chain Replay AttackOpen

Signed messages are not properly verified with the current chain ID, thus allowing attackers to perform replay attacks across chains. Hardcoded or cached chain ID values are also vulnerable since a hard fork may occur and change the chain ID in the future.

LowThe event triggered when burning and returning toOpen

Both `burnByValidator()` and `refundByValidator()` functions emit the same `NFTBurned` event, while the `refundByValidator()` function refunds tokens after the NFT has been burned.

LowTransfer all tokens to new treasury when changingOpen

The `changeTreasury()` function allows the owner to change the `treasury` address. If the new `treasury` address is that of the `NFTTreasury` contract, all tokens in the old `treasury` address will be migrated to the `newTreasury` address. However, if the old `treasury` address is an EOA address, no tokens will be transferred, and the `treasury` will need to migrate the tokens separately.

LowUsers can choose refund or not by themselfOpen

If the data signed by users is approved and signed by a validator, the signed data `userSig` and `validatorSig` can be used as input to call `burnByValidator()` or `refundByValidator()`. The `burnByValidator()` function will unlock and burn the NFT, while the `refundByValidator()` function will additionally refund the `account` wallet. The caller can choose whether to refund tokens or not by choosing which function to call. ```solidity=42 require(account == ECDSA.recover(keccak256(abi.encodePacked(address(this), tokenID, account, column)), userSig), "NFT: user recover error"); ```

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/Standard/NFT/NFTBurnByValidator.sol
  • contracts/Standard/NFT/NFTTreasury.sol
  • contracts/Standard/NFTLockable.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,045 projects reviewed · 1,376 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