how to create altcoin(alternative cryptocurrency)?
TRANSCRIPT
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 Profito 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 coin2. 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/dogecoino 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 Coino 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 Timeo 1 ~ 10 minute
● nTargetTimespan <- Difficulty readjustmento Bitcoin <- 2 Weekso 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 dayo 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 addresso 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 Settings\YourUserName\Application data\YourCoin o (Vista + Windows 7) : C:\Users\YourUserName\Appdata\Roaming\YourCoin
Data Directory● Configuration file (Bitcoin.conf / Collegecoin.conf) needs to be inside data
directory.
● Deguggingo 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 Coin1. 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 27. 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
f. Recompiling and see successful block generation
Steps to get your Alt Coin 38. Do the same in other computer
● Use git repository (push/pull) efficiently to bring changes9. Find external IP address of two computers
● Connect two computers and mine fresh coins10. Learn how transaction works
● src/rpcrawtransaction.cpp● Important Classes (main.h)
o CBlocko 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 ideaso 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