Coinsult

Request your audit at coinsult.net

Advanced Manual
Smart Contract Audit

May 21, 2022

Audit requested by

Cronex

Contract not deployed yet

Cronex / Security Audit

Table of Contents

1. Audit Summary

1.1 Audit scope

1.2 Tokenomics

1.3 Source Code

2. Disclaimer

3. Global Overview

3.1 Informational issues

3.2 Low-risk issues

3.3 Medium-risk issues

3.4 High-risk issues

4. Vulnerabilities Findings

5. Contract Privileges

5.1 Maximum Fee Limit Check

5.2 Contract Pausability Check

5.3 Max Transaction Amount Check

5.4 Exclude From Fees Check

5.5 Ability to Mint Check

5.6 Ability to Blacklist Check

5.7 Owner Privileges Check

6. Notes

6.1 Notes by Coinsult

6.2 Notes by Cronex

7. Contract Snapshot

8. Website Review

9. Certificate of Proof

Cronex / Security Audit

Audit Summary

Audit Scope

Project Name

Cronex

Blockchain

Binance Smart Chain

Smart Contract Language

Solidity

Contract Address

Contract not deployed yet

Audit Method

Static Analysis, Manual Review

Date of Audit

21 May 2022

This audit report has been prepared by Coinsult’s experts at the request of the client. In this audit, the results of the static analysis and the manual code review will be presented. The purpose of the audit is to see if the functions work as intended, and to identify potential security issues within the smart contract.

The information in this report should be used to understand the risks associated with the smart contract. This report can be used as a guide for the development team on how the contract could possibly be improved by remediating the issues that were identified.

Cronex / Security Audit

Tokenomics

Contract not deployed yet

Source Code

Coinsult was comissioned by Cronex to perform an audit based on the following code:
https://github.com/cronexfinance/cronex-token/blob/main/CRONEX.sol

Cronex / Security Audit

Disclaimer

This audit report has been prepared by Coinsult’s experts at the request of the client. In this audit, the results of the static analysis and the manual code review will be presented. The purpose of the audit is to see if the functions work as intended, and to identify potential security issues within the smart contract.

The information in this report should be used to understand the risks associated with the smart contract. This report can be used as a guide for the development team on how the contract could possibly be improved by remediating the issues that were identified.

Coinsult is not responsible if a project turns out to be a scam, rug-pull or honeypot. We only provide a detailed analysis for your own research.

Coinsult is not responsible for any financial losses. Nothing in this contract audit is financial advice, please do your own research.

The information provided in this audit is for informational purposes only and should not be considered investment advice. Coinsult does not endorse, recommend, support or suggest to invest in any project. 

Coinsult can not be held responsible for when a project turns out to be a rug-pull, honeypot or scam.

Cronex / Security Audit

Global Overview

Manual Code Review

In this audit report we will highlight the following issues:

Vulnerability Level

Total

Pending

Acknowledged

Resolved

0

0

0

0

2

0

0

0

0

0

0

0

0

0

0

0

Cronex / Security Audit

Avoid relying on block.timestamp

block.timestamp can be manipulated by miners.

				
					function swapAndSendToFee(uint256 amount) private {
        cronexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            amount,
            0,
            path,
            marketingWalletAddress,
            block.timestamp
        );
    }
				
			

Recommendation

Do not use block.timestampnow or blockhash as a source of randomness

Exploit scenario

				
					contract Game {

    uint reward_determining_number;

    function guessing() external{
      reward_determining_number = uint256(block.blockhash(10000)) % 10;
    }
}
				
			

Eve is a miner. Eve calls guessing and re-orders the block containing the transaction. As a result, Eve wins the game.

Cronex / Security Audit

No zero address validation for some functions

Detect missing zero address validation.

				
					function setMarketingAddress(address wallet) external onlyOwner {
        marketingWalletAddress = wallet;
    }
				
			

Recommendation

Check that the new address is not zero.

Exploit scenario

				
					contract C {

  modifier onlyAdmin {
    if (msg.sender != owner) throw;
    _;
  }

  function updateOwner(address newOwner) onlyAdmin external {
    owner = newOwner;
  }
}
				
			

Bob calls updateOwner without specifying the newOwner, soBob loses ownership of the contract.

Cronex / Security Audit

Missing events arithmetic

Detect missing events for critical arithmetic parameters.

				
					function setMaxBalanceAmount(uint256 maxBalanceAmount) public onlyOwner {
        require(maxBalanceAmount >=  totalSupply / 100, "CRONEX: Max Wallet cannot be below 1%"); // maxBalance can only be 1% or above. Cannot be set to 1%.
        maxBalance = maxBalanceAmount;
    }
				
			

Recommendation

Emit an event for critical parameter changes.

Exploit scenario

				
					contract C {

  modifier onlyAdmin {
    if (msg.sender != owner) throw;
    _;
  }

  function updateOwner(address newOwner) onlyAdmin external {
    owner = newOwner;
  }
}
				
			

updateOwner() has no event, so it is difficult to track off-chain changes in the buy price.

Cronex / Security Audit

Other Owner Privileges Check

Coinsult lists all important contract methods which the owner can interact with.

🟢 Owner cannot set buy and sell fee higher than 6%

🟢 Owner cannot set max balance amount lower than 1%

🟢 Owner cannot pause trading

🟡 Owner can exclude from fees

🟡 Owner can change max transaction amount (Max Transaction cannot be below 0.25%)

Cronex / Security Audit

Notes

Notes by Cronex

No notes provided by the team.

Notes by Coinsult

The usage of block.timestamp is only needed as a deadline to complete the transaction and not as a source of randomness.

Cronex / Security Audit

Contract Snapshot

This is how the constructor of the contract looked at the time of auditing the smart contract.

				
					contract CRONEXToken is ERC20, Ownable {
    string public constant override name = "CRONEX";
    string public constant override symbol = "CRONEX";
    uint8 public constant override decimals = 18;
    uint256 public override totalSupply = 100_000 * 1e18;
    mapping(address => mapping(address => uint256)) public override allowance;
				
			

Cronex / Security Audit

Website Review

Coinsult checks the website completely manually and looks for visual, technical and textual errors. We also look at the security, speed and accessibility of the website. In short, a complete check to see if the website meets the current standard of the web development industry. 

Type of check

Description

Mobile friendly?

Contains jQuery errors?

Is SSL secured?

Contains spelling errors?

Cronex / Security Audit

Certificate of Proof

Cronex

Audited by Coinsult.net

Date: 21 May 2022

Coinsult

coinsult.net

End of report
Smart Contract Audit

Request your smart contract audit / KYC

t.me/coinsult_tg