How to Create Your Own Cryptocurrency in Ethereum as Digital Tokens (And What Can You Do With It)

0
Shares
How to Create Your Own Cryptocurrency in Ethereum as Digital Tokens (And What Can You Do With It)
5 (100%) 1 vote

create your own cryptocurrency

How to create your own cryptocurrency? Can you do it on your own? The answer is YES!

This article will explain everything you need to know about cryptocurrencies, from basics to creating your own cryptocurrency and future possibilities with modifications. Once you read this article, you’ll know more about it than many other humans.

Nowadays, cryptocurrencies have become a global phenomenon known to the most people. The Blockchain technology has opened up a new era in finance. And the rise of cryptocurrencies has given birth to some new winners in the public blockchain, especially Ethereum. Because of this, many have shifted their focus on Blockchain for discovering new possibilities.

Now, if you take a look at cryptocurrencies available today, most of them have one thing in common: they’re, for most part, the cloned versions of Bitcoin.

But, how about creating a completely new cryptocurrency, rather than cloning bitcoin?

As it turns out, there is a way you can create a new cryptocurrency in ethereum as digital tokens and modify its rules around your product. These tokens can represent any exchangeable good such as coins, loyalty points, in-game items, and so on.

How to Create Your Own Cryptocurrency

To get started with creating your own cryptocurrency, first you’ll need to install following two things:

Geth – It is the client software used to download the blockchain and run Ethereum node on your local machine.

Ethereum platform – Ethereum development platform is used for creating ethereum decentralized applications as well as digital tokens for the new cryptocurrency.

After installing the above two things, install the Ethereum dapp framework called Truffle.

Now, you can directly copy paste the following code to create your own cryptocurrency.

The Code:

pragma solidity ^0.4.8;
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }

contract MyToken {
/* Public variables of the token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;

/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;

/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);

/* This notifies clients about the amount burnt */
event Burn(address indexed from, uint256 value);

/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
totalSupply = initialSupply; // Update total supply
name = tokenName; // Set the name for display purposes
symbol = tokenSymbol; // Set the symbol for display purposes
decimals = decimalUnits; // Amount of decimals for display purposes
}

/* Send coins */
function transfer(address _to, uint256 _value) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
}

/* Allow another contract to spend some tokens in your behalf */
function approve(address _spender, uint256 _value)
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}

/* Approve and then communicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}

/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
if (balanceOf[_from] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
if (_value > allowance[_from][msg.sender]) throw; // Check allowance
balanceOf[_from] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}

function burn(uint256 _value) returns (bool success) {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(msg.sender, _value);
return true;
}

function burnFrom(address _from, uint256 _value) returns (bool success) {
if (balanceOf[_from] < _value) throw; // Check if the sender has enough
if (_value > allowance[_from][msg.sender]) throw; // Check allowance
balanceOf[_from] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
Burn(_from, _value);
return true;
}
}

Congratulations, you’ve successfully created your own cryptocurrency.

Now, what are you going to do with it?

Any idea?

Well, here are few possible scenarios.

Possible Scenario #1: Crowdfunding

Many Entrepreneurs have chosen Ethereum as the main platform to kickstart their new projects. For this, we now have ICOs, which are similar to IPOs.

ICO stands for Initial Coin Offering, which is a fundraising mechanism that allows investors to receive a digital token in exchange for money or bitcoin.

Generally, startups sell tokens for the new cryptocurrency to raise money for technical development before the cryptocurrency is released. Startups set a predefined amount for funds. The investors interested in the product buy their desired number of tokens, but startup only receive the money after it has raised predefined funds.

For instance, if a startup is trying to raise $1000 by selling 10,000 tokens, and if a group of individual investors buy all of the 10,000 tokens, only then all investors will have to pay the real currency for their tokens, and this money is transferred to the startup.

However, in order to get your cryptocurrency listed in ICO, your digital token must meet the “ERC20 token standard”. A token standard allows for the ease of interoperability between dapps and the tokens created by the programmer.

Furthermore, It’s also possible to put your digital tokens for public trading, just like Bitcoin and Ether, in different cryptocurrency trading sites. For this, you need to write a cryptocurrency whitepaper for your digital token matching all the requirements, and get it registered for trading purpose.

While creating your cryptocurrency is easy, but you might need help for the whitepaper to get your cryptocurrency registered for trading. We can assist you in writing your cryptocurrency whitepaper matching all the criteria needed in order to get registered for the public trading. You can hire our blockchain developers according to your project requirement or contact our blockchain consultant to explore possible opportunities.

Possible Scenario #2: Loyalty Programs

Nowadays, loyalty programs are considered to be one of the effective ways to boost customer retention. As you might already know, loyal customers are one of the primary drivers for any type of for-profit business. Although, these loyalty programs are also expensive to develop, implement, and maintain.

But, with blockchain-powered loyalty programs, the cost could be reduced with smart contracts that are secure, traceable, and transparent, minimizing the errors and fraud.

With your own cryptocurrency, your users can collect tokens as they buy and redeem these tokens the next time they buy something from you. Simple as that.

Moreover, if you look from consumer’s perspective, the number one need or want is the desire for more redemption options within loyalty programs. This is why, unifying and decentralizing the customer experience with loyalty programs is one of the most important benefits of decentralized technology.

While these are just few possible scenario, you can create your own cryptocurrency and use it for many purposes, beyond the above two examples.

 
0
Shares
 

LET'S TALK VALIDATE YOUR IDEA!

Prudence-Fusion-100x100
Space-O was great to work with. The individual I liaised with (and his team) was always responsive and helpful; requests and issues were acted upon and dealt with efficiently. I would be happy to recommend Space-O and hope myself to have a long term working relationship with them.Prudence