How to Create Bitcoin Like
Alternative Cryptocurrency
Abdullah Khan Zehady @ Purdue University
You need to read..
● Bitcoin wiki
● What is altcoin?
o https://www.cryptocoinsnews.com/altcoin/
● How To Clone Scrypt Based Altcoins for Fun and Profit
o http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide
● *** Complete Guide on How to Create a New Alt Coin
o https://bitcointalk.org/index.php?topic=225690.0
● http://bitcoin.stackexchange.com/
You need...
● Patience and Determination.
● Source Code for an Alt-Coin (Scrypt: Dogecoin)
● Knowledge about Linux / Mac command line interface.
● 2 or More computers
● IDE (Eclipse etc.) or Text Editing Software (TextWrangler)
Planning - Coin Design
● Design your coin
1. Name of your coin
2. Block Time
 Average target time between blocks.
 Bitcoin (10 minute).
 Usually between 15 sec and 2 minute.
Planning - Coin Design
3. Difficulty retarget time
4. Total Amount of Coin - Bitcoin (21 Million)
5. Initial Coin Per Block
● Bitcoin (50 BTC per block, now 25 BTC)
● Your coin (100 Coin or ?)
Planning - Coin Design
6. Coin halving configuration
● How long you want coin per block to be halved?
● Bitcoin - 4 years
● Your coin - What kind of cryptonomics you want!!
7. Other Configurations
● Port: Connection / RPC
● *coin.conf
o https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File
Example Alt Coin
● Scrypt Based Alt Coin
o CollegeCoin
● Altcoin from Dogecoin Source
o https://github.com/dogecoin
o Easiest
File Configuration 1
● Coin Parameters
o src/chainparams.cpp
 Important Variables to be changed
 Genesis Block Creation
● const char* pszTimestamp
 Block Average Time + Others
● genesis.nTime <- Block Time
● genesis.nBits
● genesis.nNonce
File Configuration 2
● Port Configuration
o src/chainparams.cpp
 Variables to be changed
● nDefaultPort
● nRPCPort
● Total Amount of Coin
o src/core.h
 int64_t MAX_MONEY
File Configuration 3
● Average Block Time
o src/main.cpp
 Variables to be changed
● nTargetSpacing <- Average Block Generation Time
o 1 ~ 10 minute
● nTargetTimespan <- Difficulty readjustment
o Bitcoin <- 2 Weeks
o 4 days ??
File Configuration 4
● Coin Per Block
o src/main.cpp
 100 coin per block
● int64_t nSubsidy = 100 * COIN;
● Estimated Number of Blocks per day
o src/main.h
 return dPriority > 100 * COIN * 1440 / 250
 Need Calculation: 1 Coin per minute * 60 min * 24 hours = 1440 Coin per day
● Changing Coin address
o PUBKEY_ADDRESS
Data Directory
● https://en.bitcoin.it/wiki/Data_directory
● BlockChain Location inside file systems
o Mac:
o ~/Library/Application Support/Bitcoin/
o Linux:
o ~/.bitcoin/
o Windows:
o (XP) : C:Documents and SettingsYourUserNameApplication dataYourCoin
o (Vista + Windows 7) : C:UsersYourUserNameAppdataRoamingYourCoin
Data Directory
● Configuration file (Bitcoin.conf / Collegecoin.conf) needs to be inside data
directory.
● Degugging
o Debug.log file inside data directory
o Program output can be viewed from debug.log
o Will need Debug.log for genesis block.
Steps to get your Alt Coin
1. Design your coin
2. Clone Dogecoin source into your two computers
3. Compile the program successfully in both computers
4. Create a git repository and push initial code
5. Convert “dogcoin” substrings to “yourcoin” inside all files (mainly under /src
directory)
a. Be careful not to change any “bitcoin” string
i. Will require changing filenames
b. Only “dogecoin” strings to be changed to “yourcoin”
6. Change coin parameters as described
Steps to get your Alt Coin 2
7. Create genesis block in 1 of your computer
a. hashgenesisblock assertion failure
i. Read http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide again.
b. Will require adding extra piece of code (currently deleted to prevent alt
coin creation)
i. http://goo.gl/5PiaDk
ii. Changing genesis.nTime and genesis.nNonce for regular
coin, testnet, regtestnet
c. Re-compilation of the code
d. Genesis Hash creation (Find from debug.log)
e. Change Geneis hash inside src/Chainparams.cpp
Steps to get your Alt Coin 3
8. Do the same in other computer
● Use git repository (push/pull) efficiently to bring changes
9. Find external IP address of two computers
● Connect two computers and mine fresh coins
10. Learn how transaction works
● src/rpcrawtransaction.cpp
● Important Classes (main.h)
o CBlock
o CTransaction
Some Thing to Say
● Bitcoin is successful
● There are so many altcoins (> 500)
o http://coinmarketcap.com/
● Create altcoin if you want to learn how
Bitcoin/Alt Coin works
● Don’t just create Alt Coin
o Rather use your brain to invent ideas
o Why you need another coin?
Some Thing to Say
● Place for invention
o Cryptographic Proof of work systems
 Look at Prime coin
 Look at Peer Coin
o Better Hashing algorithm
 Hash Collision resistance etc.
o Economic Ideas
 Economic equailty
 Coin fluidity
 Preventing Hoarding
Some Thing to Say
● Smart Contracts
o Look
 Ethereum Project: http://ethereum.org/
 Counterparty Project: http://counterparty.io/
Thank you
● If you like the information… then..Tip me..
● Bitcoin Address:
o 1Gq13n24ToMcZgHyXnjrD18FpszLhBd1vH
● Litecoin Address:
o LVL4yMCuFFbkLGhFfwXes4GrsZBo4vEjWZ
● Dogecoin Address:
o DBUjcDFHzqJSjKuB7MpLZJAqHHZbbRpvEC

How to Create AltCoin(Alternative Cryptocurrency)?

  • 1.
    How to CreateBitcoin Like Alternative Cryptocurrency Abdullah Khan Zehady @ Purdue University
  • 2.
    You need toread.. ● Bitcoin wiki ● What is altcoin? o https://www.cryptocoinsnews.com/altcoin/ ● How To Clone Scrypt Based Altcoins for Fun and Profit o http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide ● *** Complete Guide on How to Create a New Alt Coin o https://bitcointalk.org/index.php?topic=225690.0 ● http://bitcoin.stackexchange.com/
  • 3.
    You need... ● Patienceand Determination. ● Source Code for an Alt-Coin (Scrypt: Dogecoin) ● Knowledge about Linux / Mac command line interface. ● 2 or More computers ● IDE (Eclipse etc.) or Text Editing Software (TextWrangler)
  • 4.
    Planning - CoinDesign ● Design your coin 1. Name of your coin 2. Block Time  Average target time between blocks.  Bitcoin (10 minute).  Usually between 15 sec and 2 minute.
  • 5.
    Planning - CoinDesign 3. Difficulty retarget time 4. Total Amount of Coin - Bitcoin (21 Million) 5. Initial Coin Per Block ● Bitcoin (50 BTC per block, now 25 BTC) ● Your coin (100 Coin or ?)
  • 6.
    Planning - CoinDesign 6. Coin halving configuration ● How long you want coin per block to be halved? ● Bitcoin - 4 years ● Your coin - What kind of cryptonomics you want!! 7. Other Configurations ● Port: Connection / RPC ● *coin.conf o https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File
  • 7.
    Example Alt Coin ●Scrypt Based Alt Coin o CollegeCoin ● Altcoin from Dogecoin Source o https://github.com/dogecoin o Easiest
  • 8.
    File Configuration 1 ●Coin Parameters o src/chainparams.cpp  Important Variables to be changed  Genesis Block Creation ● const char* pszTimestamp  Block Average Time + Others ● genesis.nTime <- Block Time ● genesis.nBits ● genesis.nNonce
  • 9.
    File Configuration 2 ●Port Configuration o src/chainparams.cpp  Variables to be changed ● nDefaultPort ● nRPCPort ● Total Amount of Coin o src/core.h  int64_t MAX_MONEY
  • 10.
    File Configuration 3 ●Average Block Time o src/main.cpp  Variables to be changed ● nTargetSpacing <- Average Block Generation Time o 1 ~ 10 minute ● nTargetTimespan <- Difficulty readjustment o Bitcoin <- 2 Weeks o 4 days ??
  • 11.
    File Configuration 4 ●Coin Per Block o src/main.cpp  100 coin per block ● int64_t nSubsidy = 100 * COIN; ● Estimated Number of Blocks per day o src/main.h  return dPriority > 100 * COIN * 1440 / 250  Need Calculation: 1 Coin per minute * 60 min * 24 hours = 1440 Coin per day ● Changing Coin address o PUBKEY_ADDRESS
  • 12.
    Data Directory ● https://en.bitcoin.it/wiki/Data_directory ●BlockChain Location inside file systems o Mac: o ~/Library/Application Support/Bitcoin/ o Linux: o ~/.bitcoin/ o Windows: o (XP) : C:Documents and SettingsYourUserNameApplication dataYourCoin o (Vista + Windows 7) : C:UsersYourUserNameAppdataRoamingYourCoin
  • 13.
    Data Directory ● Configurationfile (Bitcoin.conf / Collegecoin.conf) needs to be inside data directory. ● Degugging o Debug.log file inside data directory o Program output can be viewed from debug.log o Will need Debug.log for genesis block.
  • 14.
    Steps to getyour Alt Coin 1. Design your coin 2. Clone Dogecoin source into your two computers 3. Compile the program successfully in both computers 4. Create a git repository and push initial code 5. Convert “dogcoin” substrings to “yourcoin” inside all files (mainly under /src directory) a. Be careful not to change any “bitcoin” string i. Will require changing filenames b. Only “dogecoin” strings to be changed to “yourcoin” 6. Change coin parameters as described
  • 15.
    Steps to getyour Alt Coin 2 7. Create genesis block in 1 of your computer a. hashgenesisblock assertion failure i. Read http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide again. b. Will require adding extra piece of code (currently deleted to prevent alt coin creation) i. http://goo.gl/5PiaDk ii. Changing genesis.nTime and genesis.nNonce for regular coin, testnet, regtestnet c. Re-compilation of the code d. Genesis Hash creation (Find from debug.log) e. Change Geneis hash inside src/Chainparams.cpp
  • 16.
    Steps to getyour Alt Coin 3 8. Do the same in other computer ● Use git repository (push/pull) efficiently to bring changes 9. Find external IP address of two computers ● Connect two computers and mine fresh coins 10. Learn how transaction works ● src/rpcrawtransaction.cpp ● Important Classes (main.h) o CBlock o CTransaction
  • 17.
    Some Thing toSay ● Bitcoin is successful ● There are so many altcoins (> 500) o http://coinmarketcap.com/ ● Create altcoin if you want to learn how Bitcoin/Alt Coin works ● Don’t just create Alt Coin o Rather use your brain to invent ideas o Why you need another coin?
  • 18.
    Some Thing toSay ● Place for invention o Cryptographic Proof of work systems  Look at Prime coin  Look at Peer Coin o Better Hashing algorithm  Hash Collision resistance etc. o Economic Ideas  Economic equailty  Coin fluidity  Preventing Hoarding
  • 19.
    Some Thing toSay ● Smart Contracts o Look  Ethereum Project: http://ethereum.org/  Counterparty Project: http://counterparty.io/
  • 20.
    Thank you ● Ifyou like the information… then..Tip me.. ● Bitcoin Address: o 1Gq13n24ToMcZgHyXnjrD18FpszLhBd1vH ● Litecoin Address: o LVL4yMCuFFbkLGhFfwXes4GrsZBo4vEjWZ ● Dogecoin Address: o DBUjcDFHzqJSjKuB7MpLZJAqHHZbbRpvEC