This website uses cookies to ensure you get the best experience. By using the site, you agree to our privacy policy and Terms of use.
OK
 
This is the perfect tutorial on how to create a cryptocurrency (especially token)

How To Create A Cryptocurrency On Your Own

Published On: July 30, 2022
If you are wondering how to create a cryptocurrency coin or token, you have come to the right page. The popularity of cryptocurrencies has been growing, and it's quite clear that the crypto space will be here to stay despite the market's ups and downs. We all want a piece of the cake in this growing industry.

So, do you think you have the chance to become the next big crypto creator? Don't worry; this page will guide you on where to start.

Cryptocurrency Token vs. Cryptocurrency Coin

Before we start the guide, we need to fully understand the difference between token vs. coin. This is important because many people in the crypto community often use the two terms interchangeably even though they are not the same.

Coins are basically currencies that are native to their own blockchains, while tokens live on smart contracts. Good examples of cryptocurrency coins are Bitcoin (BTC) and Ether (ETH). Bitcoin is the native cryptocurrency of the Bitcoin blockchain and Ether is the native cryptocurrency of the Ethereum blockchain.

Meanwhile, examples of cryptocurrency tokens are Uniswap Token (UNI) and FTX Token (FTT). Unlike BTC and ETH, UNI and FTT were deployed using smart contracts, and they are not native cryptocurrencies of any blockchain.

Crypto coins usually have certain hard-coded privileges, such as being used as the currency to pay for gas fees in their own blockchains. Meanwhile, tokens have unique use cases in their own applications.

In the guide below, we will start with how to create a cryptocurrency token since most people who want to create their own crypto intend to create a token (and not a coin). But we will also give you a direction on how you can make your own crypto coin. Let's go!

How To Create A Cryptocurrency Token On Ethereum

For learning purposes, the obvious and most mainstream choice to start is Ethereum. Even if your intention is to create a cryptocurrency on other blockchains, you'd still want to start on Ethereum. Why? Because most other smart contract platforms are accommodating toward Ethereum developers, and many of them are compatible with EVM (Ethereum Virtual Machine).

Once you are able to deploy your own cryptocurrency token on Ethereum, you will be able to create tokens on Polygon, Binance Smart Chain (BSC), Avalanche, Optimism, Fantom, and many others. The processes are mostly the same.

By the way, Ethereum crypto tokens are almost always issued as ERC-20, which is the implemented standard for fungible tokens on the Ethereum blockchain. On alternative chains, they usually (although not always) follow the same numerical term, such as the BEP-20 token standard on Binance Smart Chain.

So, where to start? Well, there are multiple ways to start creating ERC-20 tokens. You can use tools like cointool.app where you don't need to know how to code. But since this is a guide on how to create a cryptocurrency on your own, we will need a bit of knowledge of Solidity, the programming language used to build smart contracts in Ethereum Virtual Machine.

But don't worry, even if you have zero knowledge of Solidity, you can just copy-paste the codes you are going to see below, and you will still be able to create a crypto token. However, it's important for you to have basic knowledge of Ethereum blockchain, Etherscan, and Metamask. Also, check out our Metamask guide article.

Let's Create Our First ERC-20 Crypto Token (ERC-20) On Remix

*Disclaimer: Below step-by-step tutorial is using Solidity compiler: 0.8.7+commit.e28d00a7. If you read this guide when this specific compiler version is already too old, some of the code might need to be modified, although you can always go back to using the older Solidity compiler version.

OK, first of all, you need to go to https://remix.ethereum.org/
remix is the easiest way to create a crypto token
You will be welcomed with the above user interface. Click on the folder “contracts”, and then click the icon inside the red circle. That icon is to create a new file. Just call it Token.sol or whatever you want to name it (.sol here refers to .solidity, which is the file type for Ethereum smart contracts).

Next, copy-paste the below code to the new Token.sol that you have just created and Save it (control+S)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract TokenExample is ERC20 {
    constructor() ERC20("TokenExample", "TOKEN45") {
        _mint(msg.sender, 1e24); 
    }
}
Again, if you have zero knowledge of Solidity, you might not understand what the above codes mean. I will try to explain the basics. The word constructor means function that is called only one time, at the time of smart contract deployment itself.

I put the string TokenExample as the token name. The second string TOKEN45 is the token ticker for our TokenExample token.

The text msg.sender above means the metamask wallet that deployed the smart contract will be the one to mint the token (and thus, will be the first wallet to receive all the tokens as well).

1e24 means you will mint 1 million tokens since Ethereum tokens are divisible up to 18 decimals, and thus writing 1e24 equal to 1 million tokens (just like 1e18 equal to 1 token).

Above we use import openzeppelin line because openzeppelin is considered the community standard to make ERC-20 tokens on Ethereum blockchain. We inherit the functions that our TokenExample token will have from ERC20.sol in openzeppelin (as pointed out by the import line).

Next, you need to go to the fourth tab on the left sidebar (Deploy & Run Transactions). Check the icon inside red circle below:
check the fourth tab in remix
For our learning procedure, you need to make sure the environment is Remix VM (London), check the green circle above. This is usually already like this by default. For your information, Remix VM (London) means you are being connected to a sandbox blockchain in the browser.

Later we will change this setting to the main Ethereum blockchain, but for now, let’s use Remix VM (London).

Also, make sure you select TokenExample inside the Contract section, check the yellow circle above. After you double check everything, click Deploy button.

Once the token is deployed, you can scroll down, and you will see a lot of different functions.
play around with all the different functions that you can see here on remix
If you are wondering why there are so many different functions, although we didn’t write them before, it’s because we use the import openzeppelin line. These functions actually come from openzeppelin ERC20 implementation. They are pretty standard and widely used by other crypto token developers.

Let’s start testing our newly deployed token by clicking on the name button. You will see it is correctly displayed as TokenExample. You can also click the symbol button. You will see TOKEN45. totalSupply is 1 million with the following 18 decimals behind them.

You can play around with all the other functions by transferring the tokens from one account to another. Scroll up and you will see the dropdown option under Account. The account that you previously used to deploy the token is the address where you receive all the TokenExample tokens.

For example, let’s say this is the first wallet address that I used for my token deployment (the wallet address that you see in your Remix interface will be different): 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4.

Meanwhile, the second account in the dropdown in my Remix interface is this:
0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2.

Now, go back to 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4 (first account in the dropdown) and scroll down and put 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2 (second account) inside Transfer. Just try with 555000000000000000000 (equal to 555 TokenExample tokens, followed by 18 decimals).
try to send your token using the transfer function in remix
Click transact

You will be able to see that the second account now has 555 tokens while the first account now has less tokens. How to verify? Easy. just copy-paste the wallet address to balanceOf and you will see the numbers there. Every time you make a transfer, you can always re-verify via balanceOf function.

Congratulations! Now you have learned the basics of token creation on Remix. Time to implement it on Ethereum testnet before we actually create it on the mainnet.

Next Step - Deploy The Cryptocurrency Token On Ethereum Testnet

It’s very important to understand that you must always deploy your smart contracts to testnet before you move on to the mainnet. There’s a reason why it’s called “testnet”, it’s because it’s used for testing purposes. Testnets have the same user experience as mainnet but you don’t have to waste real money since you won’t need to use real Ether (ETH) to pay for the smart contract deployments.

So, how to get to testnet? As mentioned before, this guide assumes you have a basic understanding of Metamask. I assume you already know how to switch Metamask network settings from Ethereum mainnet to Goerli or Sepolia testnet. 

So, let’s just use Goerli testnet. Go back to Deploy & Run Transactions tab and change the Environment to Injected Provider - Metamask, like below screenshot:
change the environment inside the 4th tab in remix
Once you change the environment from Remix VM to Injected Provider - Metamask, you will see a pop-up from Metamask itself, asking to connect to Remix. Just accept it.

Next, you will see the Environment setting will automatically detect Goerli since your Metamask is currently connecting to Goerli. You will also see your wallet address correctly displayed inside the Account field, and you will see your GoerliETH balance as well.

This is pretty much the only difference. The rest of the steps are more or less the same. Just click the Deploy button and another Metamask pop-up will show up, asking for your confirmation and gas fee settings (as if you are trying to make a transaction).

Once metamask confirms your transaction, you can scroll down, and once again, you will see the newly-deployed TokenExample contract below Deployed Contracts.

The difference is that now you can actually interact with this new token contract address outside the Remix environment itself. How to do that? Pretty simple. Go to https://goerli.etherscan.io/ and copy paste the token contract address that you have deployed earlier on Goerli.
etherscan allows you to paste the token contract address that you previously deployed with remix
If you are able to see the token contract address on goerli.etherscan.io, that means you have successfully created your very first Ethereum cryptocurrency token on Goerli testnet! Congratulations!

Keep in mind you need to have a little bit of GoerliETH in order to deploy this token smart contract. You can find some faucets on Google to request a small number of GoerliETH.

Final Step - It’s Time To Deploy On Ethereum Mainnet

Now we have successfully deployed our first cryptocurrency on Ethereum Goerli testnet, it’s time to move on to the final stage of token creation, which is the Ethereum mainnet itself.

You probably would have guessed by now what to do. We have to go to our Metamask and change the network settings to Ethereum Mainnet. Then, we need to go back to Remix, go to Deploy & Run Transactions tab, and you will see the small text Goerli Network has changed automatically to the Main network:
make sure the environment field shows main network
From here, the steps are the same. Just click the Deploy button, wait until Ethereum blockchain confirms your transaction, and you will be able to copy-paste the token contract address to the main https://etherscan.io

And just like before, the wallet address that you use to deploy the token contract address will be the first to receive all those tokens that you just deployed.

That’s it! It’s super simple. You have successfully created a cryptocurrency on Ethereum blockchain!

If you ever need to change the settings, always remember to test it with any of the testnets before you move on to mainnet. The preferred testnets on Ethereum are Goerli and Sepolia.

How To Create A Cryptocurrency On Other Networks (BSC, Avalanche, Polygon, etc.)

Alright, now we have learned how to make a crypto token on Ethereum mainnet, time to try it with alternative smart contract platforms like BSC or Avalanche or Polygon. It’s actually fairly simple.

Let’s try with BSC. First of all, switch the network on your Metamask from Ethereum to BSC. Next, go back to Remix, and go to the Deploy & Run Transactions tab. Just like before, we connect it via Injected Provider - Metamask.

Afterward, just click the Deploy button. And that’s it, your metamask pop-up will ask for gas fee and transaction confirmation. And just like before, we can double-check the token contract address on https://bscscan.com

For other chains, the processes are all the same. The only thing you need to do is to change the chain network on your Metamask (to deploy on Polygon, switch network to Polygon, etc.)

What Next After Token Contract Deployment

The above tutorial is basically the basic tutorial for how to create a cryptocurrency on your own. If you want to create more advanced stuff, you should learn Solidity. This programming language will teach you how to write the code logic, and you will be able to easily modify the token contract or even create a complex DeFi application.

Once you learn the basics of Solidity, I recommend you to learn tools like Truffle Suite and Hardhat. They will make your developer life much easier.

There are also some other alternative smart contract programming languages like Vyper or Rust. However, if you come from a background like Javascript and React, Solidity is the correct next step for you. After all, most smart contracts are built on Ethereum and other EVM chains.

How If I Want To Make A Cryptocurrency Coin Instead Of A Token?

This will be much more advanced than the tutorial above. You will need to know how to create or fork a blockchain since crypto coins are native currencies of blockchains. Since the required steps are far more complex than creating a token, I highly suggest you start learning from some more advanced blockchain courses out there.

There are some ecosystems where you can just use their SDK to build a new blockchain, such as Cosmos SDK. However, once again, this requires some technical skills more than just at the basic level.

Final Thoughts

I hope the above tutorial is enough for a start. At the end of the day, most new cryptocurrency developers always start with Ethereum and other EVM chains. I advise you to do the same. Try to create an ERC-20 token on Ethereum or other EVM chains like BSC or Avalanche, or Polygon.

Once you are more familiar with the entire token creation process, you can try to learn more advanced stuff like DeFi applications or even your own blockchain network.
Did you like this article?