Coresky-Audit

CertiKFiles named in the report

CertiK reviewed CoreSky (Coresky-Audit) on 28 Feb 2023: 11 findings, 0 critical; none marked fixed.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical000
High100
Medium000
Low1000
HighCentralization Related RisksOpen

## 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

LowLack of Input ValidationOpen

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.

LowMissing Emit EventsOpen

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

LowMissing Error MessagesOpen

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.

LowMissing Zero Address ValidationOpen

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.

LowNo Upper LimitOpen

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.

LowPotential Compiler ErrorOpen

In Solidity versions 0.4.13 to 0.4.21, compiling the aforementioned code gives the following error: - `ParserError: Expected identifier, got 'LParen'`.

LowPull-Over-Push PatternOpen

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.

LowState Variable Should Be Declared ConstantOpen

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`.

LowThird Party DependencyOpen

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.

Show 1 more
LowUsage of `transfer`/`send` for sending EtherOpen

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()`.

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 (7)

  • contracts/MarketRegistry.sol
  • contracts/Deposit.sol
  • contracts/NFTMarket.sol
  • contracts/NFTMarketWrap.sol
  • contracts/IDeposit.sol
  • contracts/MarketTokenTransferProxy.sol
  • contracts/MerkleDistributor.sol

Part of CoreSky’s security record

CoreSky
Audits2 audits by 1 firmLast audit Mar 2023, by CertiK.
Critical findingsNo open critical findingsAcross 2 reports.
Open CoreSky’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