CoreSky has 2 public audit reports from CertiK; the latest is CertiK, 22 Mar 2023; no critical findings reported.
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
Statuses are the security firms’ own
24 findings are still open or acknowledged in the firms’ reports: 1 high, 2 medium, 21 low (all open).
Centralization Related Risks
Coresky-Audit · CertiK · 28 Feb 2023 · Report ↗
Incompatibility with NFTs of `tokenID` 0
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Volatility when Updating `vault`
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Checks in `onlyNFT()`
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Declaration Naming Convention
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Inefficient Memory Parameter
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Missing Emit Events
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Missing Inheritance
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Missing Zero Address Validation
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Potential Reentrancy
Coresky Ⅱ-Audit · CertiK · 22 Mar 2023 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| Coresky Ⅱ-Audit | Security firm: CertiK | Date: | Scope: Files listed | None open | Findings: 2 medium · 16 low 5 fixed · 13 open | skynet.certik.com ↗ |
| Coresky-Audit | Security firm: CertiK | Date: | Scope: Files listed | None open | Findings: 1 high · 10 low 11 open | skynet.certik.com ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 1 | 0 | 0 |
| Medium | 2 | 0 | 0 |
| Low | 21 | 0 | 5 |
## 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
Open the reportThe `Escrow` contract is incompatible with `nft` contracts which allow for a `tokenID` of 0. This is because the `ledger` mapping uses the `uint256` of 0 as a default to identify that a user has not deposited a token into the contract. It is assumed that the `ERC721Template` contract may be used as the `nft` which interacts with the `Escrow` contract, and this contract allows for the possibility of minting a token with `tokenID` 0. If a user deposits a token with ID 0, then they will be unable to withdraw and the privileged `OPERATOR_ROLE` will be unable to intervene, since function `EmergencyWithdrawVault()` still requires that the check to `_onlyOwner` passes.
Open the reportThe `OPERATOR_ROLE` can update the address of `vault` at any time. This could cause unforeseen issues such as the following possibilities: - the `vault` is updated while users still currently have NFTs deposited in the formerly used `vault`. This will keep users from withdrawing their NFTs from the previously used `vault`, and will require an EOA address be granted role `WITHDRAW_ROLE` in `Vault` in order to get the users' tokens back. We note that it appears that `Escrow` contract is meant to have `WITHDRAW_ROLE`, and not an externally owned account; - if users' NFTs are withdrawn through the process listed above, they will still be listed as having deposited their NFTs in the `Escrow` contract, through mapping `ledger`, since there is no other way to update this mapping except through the withdrawal mechanics of `Escrow`. In such a case, this inaccuracy could cause many unforeseen issues. One consequence is that a user who undergoes this situation would no longer be able to participate in the `Escrow` contract.
Open the reportThe modifier `onlyNFT()` makes two checks, that the input address `token` is a contract and that the `token` address matches the address of `nft`. If the `nft` address is not a contract in the first place, the `Escrow` contract will not function as intended, so it should be enough to check in this modifier that the input address is the same as `address(nft)`. Instead, when the `nft` address is set in the constructor, it is more beneficial to ensure at that stage that the input address passes `isContract()`, since it is not updated after that stage.
Open the reportOne or more declarations do not conform to the [Solidity style guide](https://solidity.readthedocs.io/en/v0.7.3/style-guide.html#naming-conventions) with regards to its naming convention. Particularly: - `camelCase`: Should be applied to function names, argument names, local and state variable names, modifiers - `UPPER_CASE`: Should be applied to `constant` variables - `CapWords`: Should be applied to contract names, struct names, event names and enums ```solidity=2563 uint256[] calldata TokenID, ``` - Parameter `TokenID` is not in `camelCase`. --- ```solidity=1497 function EmergencyWithdrawVault ( ``` - Function `EmergencyWithdrawVault` is not in `camelCase`. --- ```solidity=1513 function EmergencyWithdraw ( ``` - Function `EmergencyWithdraw` is not in `camelCase`.
Open the reportOne or more parameters with `memory` data location are never modified in their functions and those functions are never called internally within the contract. Thus, their data location can be changed to `calldata` to avoid the gas consumption copying from calldata to memory. ```solidity=1485 function onERC721Received( ``` `onERC721Received` has memory location parameters.
Open the reportEvents should be emitted in sensitive functions controlled by centralization roles.
Open the report`Vault` implements the interface `IVault`, but does not inherit from it. ```solidity=1426 contract Vault is ``` ```solidity=1392 interface IVault { ```
Open the reportThe cited address inputs are missing a check that they are not `address(0)`.
Open the reportA reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. *This finding is considered minor because only the sequence of when the corresponding uris would are updated would be affected. So, the effect of out-of-order updates may be unobservable after transaction. However, the reentrancy vulnerability may still cause other issues in the middle of transaction.* ### External call(s) ```solidity=2531 _safeMint(to, tokenID); ``` * This function call executes the following external call(s). * In `ERC721._checkOnERC721Received`, * `(retval) = IERC721Receiver(to).onERC721Received(_msgSender(),from,tokenId,data)` ### State variables written after the call(s) ```solidity=2532 _setTokenURI(tokenID, uri); ``` * This function call executes the following assignment(s). * In `ERC721URIStorage._setTokenURI`, * `_tokenURIs[tokenId] = _tokenURI` --- ### External call(s) ```solidity=2545 _safeMint(msg.sender, tokenID); ``` * This function call executes the following external call(s). * In `ERC721._checkOnERC721Received`, * `(retval) = IERC721Receiver(to).onERC721Received(_msgSender(),from,tokenId,data)` ### State variables written after the call(s) ```solidity=2546 _setTokenURI(tokenID, uri); ``` * This function call executes the following assignment(s). * In `ERC721URIStorage._setTokenURI`, * `_tokenURIs[tokenId] = _tokenURI` --- ### External call(s) ```solidity=2556 _safeMint(to, tokenID); ``` * This function call executes the following external call(s). * In `ERC721._checkOnERC721Received`, * `(retval) = IERC721Receiver(to).onERC721Received(_msgSender(),from,tokenId,data)` ### State variables written after the call(s) ```solidity=2557 _setTokenURI(tokenID, uri); ``` * This function call executes the following assignment(s). * In `ERC721URIStorage._setTokenURI`, * `_tokenURIs[tokenId] = _tokenURI` --- ### External call(s) ```solidity=2569 _safeMint(to, TokenID[i]); ``` * This function call executes the following external call(s). * In `ERC721._checkOnERC721Received`, * `(retval) = IERC721Receiver(to).onERC721Received(_msgSender(),from,tokenId,data)` ### State variables written after the call(s) ```solidity=2570 _setTokenURI(TokenID[i], uri[i]); ``` * This function call executes the following assignment(s). * In `ERC721URIStorage._setTokenURI`, * `_tokenURIs[tokenId] = _tokenURI`
Open the reportA reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. *This finding is considered minor because the reentrancy only causes out-of-order events.* ### External call(s) ```solidity=1471 IERC721(nft).safeTransferFrom(msg.sender, address(vault), tokenID); ``` ### Events emitted after the call(s) ```solidity=1472 emit Deposit(msg.sender, msg.sender, tokenID); ``` We note here that the reentrancy cited in the call above can only be performed in the case where the centralized authority has been hacked and the hacker updates the `vault` contract to be a malicious contract. --- ### External call(s) ```solidity=1477 IVault(vault).withdrawERC721(address(nft), msg.sender, tokenID); ``` ### Events emitted after the call(s) ```solidity=1478 emit Withdraw(msg.sender, msg.sender, tokenID); ``` We note here that the reentrancy cited in the call above can be performed by any `msg.sender` that is a malicious contract, when receiving the corresponding NFT, through the `onERC721Received` logic. --- ### External call(s) ```solidity=1488 IERC721(nft).safeTransferFrom(address(this), address(vault), tokenID); ``` ### Events emitted after the call(s) ```solidity=1489 emit Deposit(sender, from, tokenID); ``` We note here that the reentrancy cited in the call above can only be performed in the case where the centralized authority has been hacked and the hacker updates the `vault` contract to be a malicious contract.
Open the reportA local variable is shadowing another component defined elsewhere. ```solidity=2462 string memory name, ``` - Local variable `name` in `ERC721Template.constructor` shadows: - Function `name` in `ERC721` - Function `name` in `IERC721Metadata` --- ```solidity=2463 string memory symbol, ``` - Local variable `symbol` in `ERC721Template.constructor` shadows: - Function `symbol` in `ERC721` - Function `symbol` in `IERC721Metadata`
Open the reportThe state variables `nft` and `vault` are already of type `IERC721` and `IVault` respectively. As such, they do not need to be wrapped in their respective interfaces again before use.
Open the reportVariables assigned in the constructor can be declared as `Immutable`. Immutable state variables can be assigned during contract creation, but will remain constant throughout the lifetime of a deployed contract. An advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they are not located in storage. ### ERC721Template - Variable `merkleReservedMinTokenID` can be declared as immutable; - Variable `merkleReservedMaxTokenID` can be declared as immutable; ### Escrow - Variable `nft` can be declared as immutable.
Open the reportMerkleDistributor.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.
Open the reportThere should always be events emitted in the sensitive functions that are controlled by centralization roles.
Open the reportThe **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.
Open the reportAddresses 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.
Open the reportThere 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.
Open the reportIn Solidity versions 0.4.13 to 0.4.21, compiling the aforementioned code gives the following error: - `ParserError: Expected identifier, got 'LParen'`.
Open the reportThe 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.
Open the reportState 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`.
Open the reportThe 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.
Open the reportIt 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()`.
Open the reportThe reports name a repository or files. Open a report to see its scope.
Trustblock holds 2 public audit reports for CoreSky, dated 28 Feb 2023 to 22 Mar 2023. The latest is by CertiK (“Coresky Ⅱ-Audit”).
CertiK wrote the 2 reports Trustblock holds for CoreSky.
24 findings are still open or acknowledged in the firms’ reports: 1 high, 2 medium, 21 low (all open). No critical finding is reported. Statuses are the security firms’ own.
Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.
Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-tb-project-slug="coresky"></div></body>
Paste the code where the label should appear. It uses no API credit and updates by itself.
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