CertiK reviewed CoreSky (Coresky-Audit) on 28 Feb 2023: 11 findings, 0 critical; none marked 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 | 1 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 10 | 0 | 0 |
## Description In the contract `Deposit`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - grantWithdraw() - grantRole() - revokeRole() - renounceRole() Any compromise to the `DEFAULT_ADMIN_ROLE` may allow a hacker to take over the whole project by granting/revoking key roles. In the contract `Deposit`, the role `WITHDRAW_ROLE` has authority over the following functions: - multicall() - withdrawERC721() - batchWithdrawERC721() - withdrawERC1155() - batchWithdrawERC1155() - renounceRole() Any compromise to the `WITHDRAW_ROLE` may allow a hacker to withdraw any asset from `Deposit` contract. In the contract `Deposit`, the `DEFAULT_ADMIN_ROLE` role can grant any account the authority to withdraw a particular NFT, and the granted role can exercise the authority by the following functions: - withdrawERC721() - batchWithdrawERC721() - withdrawERC1155() - batchWithdrawERC1155() - renounceRole() Any compromise to this granted role may allow a hacker to withdraw the particular NFT from `Deposit` contract. --- In the contract `MerkleDistributor`, the role `DEFAULT_ADMIN_ROLE` has authority over the following functions: - grantRole() - revokeRole() - renounceRole() Any compromise to the `DEFAULT_ADMIN_ROLE` may allow a hacker to take over the whole project by granting/revoking key roles. In the contract `MerkleDistributor`, the role `CREATE_ROLE` has authority over the following function: - launchpad() - renounceRole() Any compromise to the `CREATE_ROLE` may allow a hacker to launch his own `MerkleDistributor`. --- In the contract `AuthenticatedProxy`, the role `user` has authority over the following functions: - setRevoke() - proxy() - proxyAssert() Any compromise to the role `user` may allow a hacker to take over that user’s proxy account. In the contract `AuthenticatedProxy`, the role `authenticated contracts` has authority over the following functions: - proxy() - proxyAssert() Any compromise to the `authenticated contracts` may allow a hacker to take over all users’ proxy accounts. --- In the contract `OwnableDelegateProxy`, the role `proxyOwner` has authority over the following functions: - transferProxyOwnership() - upgradeTo() - upgradeToAndCall() Any compromise to the `proxyOwner` may allow a hacker to update a new proxy owner and upgrade the current implementation of the proxy which can result in potential risk. --- In the contract `MarketRegistry`, the role `owner` has authority over the following functions: - grantInitialAuthentication() - startGrantAuthentication() - endGrantAuthentication() - revokeAuthentication() - transferOwnership() - renounceOwnership() Any compromise to the `owner` may allow a hacker to do the followings. - grant/revoke access for specified contract, which allows the hacker take over all users’ proxy by granting a malicious contract the authentication. - transfer/renounce ownership --- In the contract `MarketTokenTransferProxy`, the role `authenticated contracts` has authority over the following function: - transferFrom() Any compromise to the `authenticated contracts` may allow a hacker to transfer ERC20 tokens from the user’s account. --- In the contract `MarketExchange`, the role `owner` has authority over the following functions: - changeExchangeToken() - changeChainID() - changeExchangeWrap() - changeMinimumMakerProtocolFee() - changeMinimumTakerProtocolFee() - changeProtocolFeeRecipient() - transferOwnership() - renounceOwnership() Any compromise to the `owner` may allow a hacker to do the followings. - update the token used to pay exchange fees - update the chain id - update the Exchange wrap used to batch matching orders - update the minimum maker/taker protocol fee, which allows the hacker to set a high fees - update the protocol fee recipient, which allows the hacker to steal all the fees by setting his account as fee recipient - transfer/renounce ownership
MerkleDistributor.sol The function `launchpad()` lacks the verification of `_startTime`, If `_startTime` is greater than `_endTime`, users will not be able to call the `claim()` function. Furthermore, the `_startTime` should be greater then current time. NFTMarketWrap.sol The length of the parameters `buySigs` and `sellSigs` should be checked as well.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.
Addresses should be checked before assignment or external call to make sure they are not zero addresses. ```solidity=559 exchangeWrap = _exchangeWrap; ``` - `_exchangeWrap` is not zero-checked before being used. --- ```solidity=602 protocolFeeRecipient = newProtocolFeeRecipient; ``` - `newProtocolFeeRecipient` is not zero-checked before being used. --- ```solidity=1567 protocolFeeRecipient = protocolFeeAddress; ``` - `protocolFeeAddress` is not zero-checked before being used.
There are no upper boundaries for **changeMinimumMakerProtocolFee() && changeMinimumTakerProtocolFee()** which are used to set `minimumMakerProtocolFee` and `minimumTakerProtocolFee`. It is possible to set the total fee rate up to any arbitrary amount.
In Solidity versions 0.4.13 to 0.4.21, compiling the aforementioned code gives the following error: - `ParserError: Expected identifier, got 'LParen'`.
The change of `owner` by function `transferOwnership()` overrides the previously set `owner` with the new one without guaranteeing the new `owner` is able to actuate transactions on-chain.
State variables that never change should be declared as `constant` to save gas. ```solidity=117 uint public DELAY_PERIOD = 2 weeks; ``` - `DELAY_PERIOD` should be declared `constant`. --- ```solidity=117 uint public DELAY_PERIOD = 2 weeks; ``` - `DELAY_PERIOD` should be declared `constant`. --- ```solidity=1665 uint public DELAY_PERIOD = 2 weeks; ``` - `DELAY_PERIOD` should be declared `constant`.
The project is serving as the underlying entity to interact with one or more third party protocols(NFTs/ERC20s). The scope of the audit treats third party entities as black boxes and assume their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc.
It is not recommended to use Solidity's `transfer()` and `send()` functions for transferring Ether, since some contracts may not be able to receive the funds. Those functions forward only a fixed amount of gas (2300 specifically) and the receiving contracts may run out of gas before finishing the transfer. Also, EVM instructions' gas costs may increase in the future. Thus, some contracts that can receive now may stop working in the future due to the gas limitation. Here is some examples: ```solidity=93 if(refund > 0) payable(msg.sender).transfer(refund); project.receipt.transfer(total); ``` - `MerkleDistributor.claim` uses `transfer()`. --- ```solidity=1001 sell.feeRecipient.transfer(makerRelayerFee); ``` - `ExchangeCore.executeFundsTransfer` uses `transfer()`.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (7)
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