CertiK reviewed zkRace (Derace) on 12 May 2022: 5 findings, 0 critical; all acknowledged, none fixed.
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 | 0 | 1 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 4 | 0 |
In the contract `DeRaceBridge`, the following roles maintain privilege on different functions: - the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - `grantRole()` will assign a privileged role to an address. - `revokeRole()` will revoke a privileged role from an address. - the role `SUPER_VALIDATOR_ROLE` has authority over the following functions: - `pause` will pause the contract. - `unpause` will restart the contract. - `skipNonce` will increase the `nonces` for one address and emit an event. - `setVersion` will update the `version`. - `migrateErc20` will transfer tokens to anyone. - `migrateErc721` will transfer NFT to anyone. - `migrateErc721Any` will transfer NFT to anyone. - the role `APPROVER_ROLE` has authority over the following functions: - `completeErc20Transfer` will transfer tokens to `msg.sender`. - `completeErc721Transfer` will transfer NFT to `msg.sender`. - `completeErc721AnyTransfer` will transfer NFT to `msg.sender`. Since the aforementioned privileged roles are working with token flow and asset transfer, Any compromise to these accounts may allow a hacker to move the funds and even drain the assets.
When transferring standard ERC20 deflationary tokens, the deposited amount may not be equal to the received amount due to the charged transaction fee. As a result, an inconsistency in the amount will occur.
Functions that affect the status of sensitive variables should be able to emit events as notifications to customers: - `setVersion()`
According to the above logic, the signature is based on the version. ```solidity=37 bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( TRANSFER_TYPEHASH, msg.sender, version, nonces[msg.sender], method, token, data ))); address signer = ECDSA.recover(digest, signature); ``` If the `SUPER_VALIDATOR_ROLE` account calls the `setVersion` function to set a new version, all the transfers based on the old version suffer fail because the signature will be invalid now. Since the `DeRaceBridge` may depend on third-party cross-chain protocol/network or off-chain scripts, transfer failure may cause unpredictable effects.
Although not explicitly declared, the contract `DeRaceBridge` serves as a tool to help users perform cross-chain token transfer. The cross-chain token transfer may depend on third party cross-chain protocol or off-chain scripts. The scope of the audit treats these 3rd party entities as black boxes and assume their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of 3rd parties can possibly create severe impacts, such as increasing fees of 3rd parties, etc.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
1,044 projects reviewed · 1,375 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