Create Crowdsale-ICO with Whitelist and Bonus Features on Coinex Smart Chain – Part 1

Crowdsale is an ICO or fundraising method that is quite easy and fast, crowdsale generally runs on smart contract platforms such as the coinex smart chain blockchain. By using the crowdsale, startups can raise funds or a wider ico, anyone and anywhere can participate in the crowdsale. crowdsale has its advantages, which makes it widely used by crypto developers, one of which is “cheap”, because to make a crowdsale you only need to create a smart contract on the blockchain such as coinex smart chain, ethereum or others. In contrast to launchpad , ieo , or ido which requires very high costs.

Fundraising using the crowdsale system, can be an alternative for crypto developers to minimize project fund spending and token sale transparency. All token purchase transactions in the crowdsale will be recorded on the blockchain, not only that, you can even see the number of tokens allocated for the ICO, see the number of investors and the number of their purchases, all of which you can know through the blockchain explorer.

We will provide a tutorial on how to create a crowdsale or ico with whitelist and bonus features on the coinex smart chain blockchain. Why we choose the coinex smart chain blockchain? the reason is

  • Permissionless, just like the blockchain, you can create smart contracts in CSC without permission
  • Support EVM, you can use the same programming language, which is used in ethereum, for example solidity
  • Very Fast, CSC has a high transaction speed, it only takes 3 seconds, your transaction will be fully validated
  • Cheap, in contrast to ethereum, the coinex smart chain only requires around $0.001 (in CET coins) to pay for transactions on the network.
  • There are many other features and advantages, you can check and learn on the official coinex smart chain site :


What is needed ?

1# Coin CET

It is a native coin of the coinex smart chain blockchain, when you send a token or transaction on the network, you need this coin. To get CET coins, you can buy them on the coinex exchange.


2# Wallet

You can use the metamask wallet (chrome/firefox), don’t forget to connect to the CSC network, you need to set the metamask rpc wallet, here is the rpc for the coinex smart chain blockchain:

Network Name : Coinex Smart Chain
ChainID : 52
Symbol : CET
Block Explorer :


3# CRC20 Token

You need crc20 tokens to run the crowdsale, because this token is what you will sell in the crowdsale. To make a crc20 token very easy, you can use open source solidity from openzepplin and deploy it on the csc blockchain using the remix ethereum IDE. here is a smart contract that you can use to create a crc20

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

contract MyToken9 is ERC20, ERC20Burnable {
constructor() ERC20("MyToken 9", "MT9") {
_mint(msg.sender, 125000000 * 10 ** decimals());

4# Crowdsale-ICO Smart Contract

This smart contract is used to make a crowdsale on the csc blockchain, you need to set the price or rate, wallet, whitelist, bonus and several other settings. Download crowdsale smart contracts


How to Create a Crowdsale (ICO) with Whitelist and Bonus Features on Coinex Smart Chain

1# Deploy Smart Contract CRC20

Use the smart contract above, please fill in the details “token name“, “symbol” and “supply token“. Next deploy on the ethereum ide remix, before deploying make sure the smart contract is fully compiled without errors, you will see a green tick on the left.


2# Deploy Smart Contract Crowdsale Whitelist

Because this is a crowdsale with a whitelist feature, you must deploy a whitelist crowdsale smart contract first and enter a list of investor addresses. Only investors who are included in the whitelist can buy tokens, otherwise they cannot buy. You can use dapps to whitelist smart contracts, or input them manually.

After the deployment process is complete, you need to verify the smart contract in the explorer coinex smart chain.

  • Seacrh for the smart contract whitelist in explorer, click contract info, click verify & publish
  • Enter all the required details during verification

  • Enter the investor’s wallet address (whitelist) into the smart contract, only the address entered into the whitelist can buy tokens. You can add manually or use dapps (bulk import), in this article we use the manual method. Go to the smart contract, click Contract Info, click Write Contract . Connect to your wallet, then enter the address. enter “true”.


3# Deploy Crowdsale ICO Smart Contract

After you have downloaded the crowdsale smart contract above, you need to deploy the smart contract using the ide ethereum remix. Make sure it compiles completely without errors. In the smart contract there are several things that you need to set/edit

  • uint256 public minContribution = 0.5 ether; this is the minimum amount to buy tokens in the crowdsale, you can set it according to your wishes, in this article I set 0.5, meaning investors can buy ico tokens with a minimum of 0.5 cet. even though the smart contract says ether, its use is to use the native csc coin (i.e. CET)
  • uint256 public maxContribution = 1500 ether; this is the maximum number of limits to buy ico tokens, you can limit each investor so that it is divided evenly
  • bonus, this is an option to make io look attractive, because investors will be happier when they get a bonus, please set it as you wish
function bonusPercentForWeiAmount(uint256 weiAmount) public pure returns(uint256) {
if (weiAmount >= 500 ether) return 1000; // 10%
if (weiAmount >= 250 ether) return 750; // 7.5%
if (weiAmount >= 100 ether) return 500; // 5%
if (weiA
ount >= 50 ether) return 375; // 3.75%
if (weiAmount >= 15 ether) return 250; // 2.5%
if (weiAmount >= 5 ether) return 125; // 1.25%
return 0; // 0% bonus if lower than 5 eth
  • contract MyTokenCrowdsale this is the name of the smart contract, write it according to your project, for example “CryptovirCrowdsale”
  • uint256 public rate = 80000; rate or token price per 1 CET coin, determine according to the price of your token, please calculate carefully
  • _STARTTIME = When the crowdsale starts, please convert on this site
  • _ENDTIME = When the crowdsale ends, please convert on this site
  • _TOKEN = smart contract token crc20
  • _WALLET = When the crowdsale ends, please convert on this site
  • _WHITELIST = Input smart contract whitelist
Continue to Part 2

Alif Fahmi

hi , I'm Alif, I'm a blockchain & cryptocurrency lover, I love writing & learning, my job is web developer & crypto trader