How to develop Altcoin? [1]

The blockchain technologies are becoming an essential part of our lives thanks to crypto-currencies. Nowadays, we hear many stories about crypto-currencies, and those stories are making blockchain technologies more adaptable to other business. If we want to set boundaries about blockchain technology, we can easily say that the blockchain technology is a kind of distributed database that has proof of work concept to assure the accuracy of information in the database. Anyway, I am not getting into the philosophy of the blockchain technology because this post will be about the development of crypto-currency from existing Bitcoin source code. Bitcoin is the oldest player in the crypto-currency market as well as dominating current market.  After Bitcoin, other coins have arisen in the market by inheriting source code from Bitcoin. To illustrate this circumstance, Litecoin is a forked project of Bitcoin. The developers of Litecoin forked Bitcoin project repository then they changed configuration parameters to accelerate transactions.

In this tutorial, we are going to fork Litecoin project repository, and we will change configuration parameters to make our altcoin.

Here are your steps to make your crypto-coins.

Step 1:

We need to fork Litecoin project to develop our coins with existing works. Since official Litecoin repository is on Github, we should use GIT client to obtain Litecoin’s codes. You should have GIT client to continue other steps. If you don’t have one or know how to get it, let me show you.

If you want to get GIT client that has a graphical user interface support, official GitHub Desktop application is right for you. You can download here.

Official GitHub Desktop application is useful for basic operations which can be enough for this tutorial; however, if you want more capabilities with GIT client, you can always install command line version of GIT client.

For OSX:

brew install git

For Ubuntu:

sudo apt-get install git-core

After installing GIT client, it’s time to fork Litecoin repository. When you go to Litecoin repository web page on GitHub, you will see “Clone or download” button.

When you click it, it appears small box that coins a repository link and two buttons as you can see below.

If you are using official GitHub Desktop application, you can quickly click “Open in Desktop” option to fork Litecoin.

 

Step 2:

Now you have project files of Litecoin on your local computer. Let’s know Litecoin’s project files. We should have similar files and folder like mine that is below picture.

 

Step 3:

  • We should go to “src” file to see the source code of Litecoin to make necessary changes about our next altcoin.

Litecoin total maximum supply is 84000000, so there must be a variable that is assigned with 84000000. You can make the root folder search in your favorite IDE or text editor to find the location of maximum supply. Of course, I am going to give the place of it. With saying how you can find the unknown variables, I am trying to give an idea of how to find the location of a specific variable in a source folder.

The location of total maximum supply is the 26th line of “amount.h” file.

  • Now it’s time to continue our the development of our alt-coin by assigning its name.

Since the Bitcoin-based alt-coins use the native Bitcoin wallet application that is built using Qt framework, you should change “Litecoin” text with your alt-coin name in the “src/qt” folder.

  • We should device how many blocks should pass before converting mined pre-mature coin to matured one.

This is highly related to consensus rule, and it locates in “src/consensus/consensus.h” file. You should change the value of “COINBASE_MATURITY” named variable.

  • The Litecoin core wallet application uses remote procedure call (RPC ) to communicate with the Litecoin blockchain and miner applications. Therefore, you need to define a username and a password

Let’s say you choose 5867 as your testnet RPC port and 6758 for mainnet RPC port. You need to go “src/chainparams.cpp” file then you should change “nDefaultPort” named variable value under ” CMainParams” class with 6758. For testnet “nDefaultPort” variable under “CTestNetParams” class.

To run your altcoin’s blockchain network, you need to specify a phrase and genesis block hash values.  These hash values are necessary for proof of work (Pow) mechanism.

In next blog post, I will explain a genesis block, Merkle trees, and other necessary steps to finish the development of your alt-coin.

 

Leave a Reply

Your email address will not be published. Required fields are marked *