Ethereum Blog

Ethereum in practice part 1: how to build your own cryptocurrency without touching a line of code

Introduction

user

Alex Van de Sande

Alex Van de Sande is an UX designer at the Ethereum Foundation and lead of the Mist team.


LATEST POSTS

How to build server less applications for Mist 12th July, 2016

Ethereum in practice part 3: how to build your own transparent bank on the blockchain 07th December, 2015

release

Ethereum in practice part 1: how to build your own cryptocurrency without touching a line of code

Posted on .

A lot of things have happened in the past few weeks in the Ethereum ecosystem, so many that it might be hard for a casual observer to understand where we are and what’s available out there. So I would like to use my first post here to give you an overview of the tools we’ve built and how you can use them to build interesting things right now.

But first a short introduction: I am Alex Van de Sande and I am the lead designer on the Ethereum foundation. At DevconOne I gave a talk entitled “The Blockchain Versus The Average User” where I went into more details on the challenges to bringing the Ethereum ecosystem to the aforementioned “Average User”, one of which is the difficulty of defining what that term even means. When personal computers were introduced they were advertised as being “to the rest of us”, but the “rest of us” public they targeted was actually a very narrow audience interested in word processing, spreadsheets and desktop publishing. Today, those would be considered among the top tier geeks, just below the kinds of people that still fight over the merits of Vim versus emacs. I truly believe that one day your Candy-crush-playing grandma/grandpa will use the blockchain, just like today he/she uses databases and https connections without realising it (maybe when they convert blue diamonds won on one game into cows in another game by some other publisher). But right now, what I’m working on is bringing it to that next tier of users, the ones that can download an office suite and figure out how to use a spreadsheet but don’t feel comfortable around command lines.

So if you consider yourself in that group, then welcome we’ll guide you to some basic activities you can do in a few minutes in ethereum: Build your own cryptocurrency, building your own democracy and creating a central bank in the blockchain. We skipped the “Hello World” tutorial this time, but you’ll do fine.

Download the Ethereum Wallet

Ethereum Wallet Screenshot

Download the latest version of the Wallet

But enough talking, let’s get our hands dirty with Ethereum! I might be biased but I’d say the best place to start is the Ethereum Wallet, a multi platform app that will enable you to send ether and ethereum based currencies, create and execute contracts.

The first thing you have to do on it is create an ethereum account. All you need for it is a strong password and you’ll get it. In order to do anything you’ll need to put in some ether: but don’t worry you don’t need much. Most of the contracts here will cost less than a tenth of a US penny. If you are just testing it, we recommend you switch to the testnet: go in the menu develop > network > testnet (morden) and then on develop > start mining. After a few minutes you’ll probably have enough ether to test anything, so you can turn it off and save your computer resources.

The wallet only allows basic mining on the testnet, but if you want to try your luck on the real net, then you need a more advanced tool. This used to be a cumbersome process but now there are better easier tools: and we have new tools that will make that process much easier.

Aleah One Miner Screenshot

The AlethOne miner is a straightforward tool with two buttons: press one to start mining in your GPU and press the other to deposit your rewards in a wallet. Download it from the Turbo Suite, a set of power tools created by the C++ team to develop ethereum applications.

If you want to create smart contracts on the live network and can’t mine you’ll need some ethers. You can have a friend sent to you or you can exchange it for bitcoins on a cryptoexchange. If you are a bitcoin fan we suggest you keep on eye on the btcrelay project, a fraud-proof sidechain that will launch soon and allow quick exchanges between ether and bitcoin without a third party.

Create a token

The first contract we are going to create is a token. Tokens in the ethereum ecosystem can represent any fungible tradable good: coins, loyalty points, gold certificates, IOUs, in game items, etc. Since all tokens implement some basic features in a standard way, this also means that your token will be instantly compatible with the ethereum wallet and any other client or contract that uses the same standards.

Go to the contracts page and then click “deploy new contract”.

 

Ethereum Wallet Screenshot 2015-12-03 at 3.50.36 PM 7

Now get the token code from here and paste it into the “Solidity source field”. If the code compiles without any error, you should see a “pick a contract” drop down on the left. Get it and select the “MyToken” contract. On the right column you’ll see all the parameters you need to personalize your own token. You can tweak them as you please, but for the purpose of this tutorial we recommend you to pick these parameters: 10,000 as the supply, any name you want, “%” for a symbol and 2 decimal places. Your app should be looking like this:

Ethereum Wallet Screenshot 2015-12-03 at 3.50.36 PM 10

Scroll to the end of the page and you’ll see an estimate of the computation cost of that contract and you can select a fee on how much ether you are willing to pay for it. Any excess ether you don’t spend will be returned to you so you can leave the default settings if you wish. Press “deploy”, type your account password and wait a few seconds for your transaction to be picked up.

Ethereum Wallet Screenshot 2015-12-03 at 3.50.36 PM 11

You’ll be redirected to the front page where you can see your transaction waiting for confirmations. Click the account named “Etherbase” (your main account) and after no more than a minute you should see that your account will show that you have 100% of the shares you just created.  To send some to a few friends: select “send”, and then choose which currency you want to send (ether or your newly created share), paste your friend’s address on the “to” field and press “send”.

Screen Shot 2015-12-03 at 9.48.15 AM

If you send it to a friend, they will not see anything in their wallet yet. This is because the wallet only tracks tokens it knows about, and you have to add these manually. Now go to the “Contracts” tab and you should see a link for your newly created contract. Click on it to go to it’s page. Since this is a very simple contract page there isn’t much to do here, just click “copy address” and paste the contract address on a text editor, you’ll need it shortly.

To add a token to watch, go to the contracts page and then click “Watch Token”. A popup will appear and you only need to paste the contract address. The token name, symbol and decimal number should be automatically filled but if it’s not you can put anything you want (it will only affect how it displays on your wallet). Once you do this, you’ll automatically be shown any balance you have of that token and you’ll be able to send it to anyone else.

Ethereum Wallet Beta 4 Screen Shot 2015-12-03 at 9.44.42 AM

And now you have your own crypto token! Tokens by themselves can be useful as value exchange on local communities, ways to keep track of worked hours or other loyalty programs. But can we make a currency have an intrinsic value by making it useful? Tomorrow we’ll show how tokens can be used as voting system in order to make collective decisions on the use of funds by creating a Democratic Autonomous Organization.

profile

Alex Van de Sande

Alex Van de Sande is an UX designer at the Ethereum Foundation and lead of the Mist team.

Comments
user

Author Thiago Martins

Posted at 1:02 am December 4, 2015.

This is just freaking awesome!!

Reply
user

Author Michael Kilday

Posted at 3:07 am December 4, 2015.

Really cool stuff, this is great to finally be able to play around with some Ethereum front-end programming…very nice job! :o)

Reply
user

Author C. Y.

Posted at 5:13 am December 4, 2015.

After download wallet and click Ethereum-Wallet.exe, it said “no ethereum node binary found! please start one manually.” i download wallet win32, use win7 32 bit. And i know nothing about programming so waiting long time for this type of lesson

Reply
    user

    Author Alexandre Van de Sande

    Posted at 1:34 pm December 4, 2015.

    Hi CY, unfortunately geth is only included in Windows 64 bits versions.

    Reply
      user

      Author Tyler Smith

      Posted at 6:06 pm December 8, 2015.

      @alexandrevandesande:disqus This simple token contract works great…but a couple of us are struggling with the DAO contract in the next blog post. Could you take a look at our comments and respond?

      Reply
      user

      Author pool closed

      Posted at 9:19 pm January 24, 2016.

      so basically its useless on win 32 bit?

      Reply
user

Author Edmund John

Posted at 11:16 am December 4, 2015.

This is a very easy to follow tutorial and quite interesting. Great post Alex. Looking forward to your next post about DAO creation.

Cheers,

Edmund John

http://Flagtheory.com
http://Incorporations.io
http://Passports.io

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:16 pm December 14, 2015.

    Thanks Edmund!

    Reply
      user

      Author Tumelo

      Posted at 10:16 pm May 24, 2016.

      Hi Alexandre, Tumelo from South Africa can i please have your email address

      Thanks

      Reply
user

Author Nina Kilbride

Posted at 12:44 pm December 4, 2015.

Thanks for the tutorial, Alex – I am always looking for things to help with the Ethereum learning curve. -Nina http://crytptolawyer.net

Reply
user

Author Joshua Davis

Posted at 2:06 pm December 5, 2015.

thank you very much for this

Reply
user

Author Nitin Jain

Posted at 11:43 pm December 5, 2015.

I am getting the following error when i switch to testnet

UNCAUGHT EXCEPTION { [Error: read ECONNRESET] code: ‘ECONNRESET’, errno: ‘ECONNRESET’, syscall: ‘read’ }

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:16 pm December 14, 2015.

    Could you please report more details on github.com/ethereum/mist/issues ?

    Reply
user

Author pix

Posted at 5:01 am December 8, 2015.

Hello,

Me and my business partner are tempting to fund a new internet based business with a new cryptocurrency (not optional).

While in development we read that your platform is compatible with new currencies creation and usage for business.

After reading Ethereum.org intro we were willing if creating and using cryptocurrencies on Ethereum platform will be a usefull way to manage all cryptocurrency aspects on this project.

As we have to understand better your platform before making a decision, we have a first question that needs attention, and can be only answered by you:

1) Once the cryptocurrency creation process was based on your platform, are those created coins compatible with actual existing Exchanges over the world?

Thanks in advance

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:16 pm December 14, 2015.

    Hi Pix.

    Ethereum created currencies will be compatible with all exchanges that support the standard ethereum currency apis and all smart contracts built on ethereum. There aren’t many right now but I know poloniex has announced they’ll trade Rep from Augur and there’s a Ðapp being created called “etherex” that should allow for any ethereum based currency to be traded automatically.

    In the other hand if you create a cryptocurrency from scratch you’ll have the same difficulties as you’d have to convince every exchange to add your custom code manually. I think investigating ethereum as a standard is a smart move

    Reply
user

Author Chris Römer

Posted at 4:01 am December 9, 2015.

Thanks Alex, great example and easy to follow. If I run develop > start mining run where can I see how much – if anything – I have mined (so that I’ll know when to turn it off) ? Thanks, Chris

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:12 pm December 14, 2015.

    If you have created an account, all mining proceeds will go there. The first account is called “ether base” until you rename it.

    Reply
user

Author Brent Simpson

Posted at 4:22 am December 9, 2015.

Fantastic tutorial… I understand if no one answers this. But I think this might be the community that might find this notion useful in future crypto potentials. I have a background in philosophy (and have recently been studying programming) but via my philosophy training a lineage of thought erupted from it. Stemming from Platonic frameworks came the notion that there were three essential domains… the good the true and the beautiful. Some more modern philosophers have picked up on this such as integral theorists and philosophers like Habermas. These can to some major degree be segmented into the I (art) we (morals) it (science) or the three major pronouns in most languages. These three domains or perspectives are essential it seems but in our modern and postmodern world often one is emphasized at the expense of another. Think materialism and how it it reduces reality to the it IT where subjectivity (U) and intersubjective type (we) are essentially forgotten about. It is a travesty. (Therefore, having three major currencies (that somehow interconnect) seems integral to uphold the major perspectival domains of our cosmos. (and maintaining a sane world) If anyone is interested in helping to craft this idea into reality with me… please get in touch!

Reply
user

Author Eniac2

Posted at 5:55 am December 10, 2015.

I cannot switch to the test net. The menu item is greyed out, with no obvious explanation. What gives?

Reply
    user

    Author Eniac2

    Posted at 7:00 am December 10, 2015.

    Ah, I did not realize it was already on the test net. Great tutorial, just what is needed to get people to actually use this awesome platform!

    Reply
user

Author Brian Rice

Posted at 1:55 pm December 10, 2015.

Thanks. this looks easy but whenever I switch to testnet, the Ethereum wallet crashes, so I can’t mine any ether. This happens when running it on Ubuntu-14.04.3.

I tried on windows 7 but the Ehereum wallet never opens. The initial screen just hangs saying starting Ethereum node.

Can you help please?

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:12 pm December 14, 2015.

    We are investigating causes of crash on the node. If the “starting node” message persists more than a minute, please restart

    Reply
user

Author Guy

Posted at 9:19 pm December 11, 2015.

Thanks for the tutorial Alex but still have a question, what if i would like to premine a percentage
of total coin supply ?

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:11 pm December 14, 2015.

    Just follow the instructions above and you’ll create a token that belongs 100% to you. It’s not a “premine” because unless you specifically add a function to do so, your token has no “mining” function.

    Reply
      user

      Author Guy

      Posted at 2:42 pm December 14, 2015.

      Thanks.

      Reply
      user

      Author Mi Chi

      Posted at 6:17 am February 4, 2016.

      So, does that mean that I own 100% of all the coins of the coin I create?

      Reply
user

Author Dave Kruse

Posted at 5:16 pm December 12, 2015.

This is great. Thank you. After I downloaded the wallet and selected Start Mining nothing happened. Any suggestions?

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:10 pm December 14, 2015.

    You need to create an account before mining. Also, mining is only available on the testnet as it has a much lower difficulty.

    Reply
user

Author Taotech4096

Posted at 2:10 pm December 13, 2015.

Hello Alex, Thank you very much, great post. I´m so exited to use the wallet but the wallet does not respond after showing “Starting Ethereum node…” Any suggestions what could be the problem? Is there a place maybe at Github to report the issues?

Thanks!

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:09 pm December 14, 2015.

    I’ve seen this error pop up. If the “Starting Ethereum node…” message lasts more than a minute, you should quit it and try again as some error has occurred. We are investigating what might be causing the bug

    Reply
user

Author Mark Jackson

Posted at 4:09 am December 14, 2015.

Something is broken. I followed the instructions, created 10,000 tokens then attempted to send 10 tokens to another address. However, instead of sending 10 tokens it appears to have sent 10% (=1000 tokens). I repeated the procedure from the beginning with 100 tokens and it sent 100% of my balance to the other address.

But, still very very cool. Thanks for the blog post.

Reply
    user

    Author Alexandre Van de Sande

    Posted at 2:08 pm December 14, 2015.

    Hi Mark. This seems like a problem with the decimal display of the tokens. The internal logic always deals with the minimum integer value so if you created 10,000 tokens with 2 decimal places then the total amount of tokens will be displayed as “100.00”. If you want to send 1.00 token, internally the system will actually send 100 of them. Imagine that you want to send a dollar but the system is instead sending 100 cents. It should amount to the same

    Reply
      user

      Author Mark Jackson

      Posted at 6:09 pm December 14, 2015.

      Thanks for the explanation, that makes sense..

      Reply
      user

      Author GCM

      Posted at 8:58 am January 25, 2016.

      I understand this now… but it is not intuitive.
      When choosing the values I understood the decimal places as the “maximum fungibility” of the token… as in, by chosing 2 decimal places, there could be only 0.01 as the minimum token and not 0.001 for example. And the number of tokens as total number of tokens, as in number of shares.

      Reply
        user

        Author Alexandre Van de Sande

        Posted at 2:17 pm January 26, 2016.

        The nice thing about this is that you can change the contract to fit what is intuitive to you! On the constructor function, just change the initial supply to be: (initial supply)*10decimals ( means to the power of)

        Reply
user

Author saculel

Posted at 8:15 am December 17, 2015.

I’m having trouble using the AlethOne client. Are the mining proceeds automatically sent to the reward address? I can’t figure out how to view my balance or withdraw funds. Clicking send in the withdraw dialog doesn’t work.

Reply
user

Author saculel

Posted at 8:24 am December 17, 2015.

I can’t figure out the AlethOne client. Where can I see the mining proceeds? When I try to withdraw funds the send button in the withdraw dialog doesn’t work. Do the proceeds automatically transfer to the reward address?

Reply
user

Author Cryptoeconomist

Posted at 4:03 am December 27, 2015.

Alex, thank you for the tutorial. I have installed the wallet on my iMac (OSX 10.10.5), but after launching the wallet, I see a screen “Starting Ethereum node…”. After I restarted the wallet, I still encountered this screen. Even after 20-minute waiting, the screen remains.

Do I need to install anything else to run this wallet? Do I need to install a software called “gmp”? If yes, can you tell me how to install gmp? As you may guess, I am not a programmer.

Reply
    user

    Author Cryptoeconomist

    Posted at 4:35 am December 27, 2015.

    Ok, the wallet is syncing the blocks now after I installed the following three softwares in terminal mode:

    Install Xcode: (xcode-select –install)
    Install Homebrew (http://brew.sh/)
    Install gmp (brew install gmp)

    Reply
      user

      Author Cryptoeconomist

      Posted at 6:15 am December 27, 2015.

      After downloading the blocks, I was asked to install Geth by the wallet.

      After installing Geth, when I restart the wallet, I get this error message:

      “Couldn’t start an Ethereum Node! Are you already running a node? Make sure your IPC path is set to the default: $ geth –ipcpath/Users/[user account]/Ethereum/geth.ipc”

      However, when I type in the above command, I get an error message in the command line: “Incorrect Usage”.

      How can I fix this problem? Thanks.

      Reply
user

Author Jonathan Sidego

Posted at 11:50 pm December 27, 2015.

Hi,

Great tutorial, and I got up and running in no time. A question, though:

Is there something in the contract code that signals that this is a token? How does the UI, etc. know which variables are the supply, symbol, etc? Do the variables have to have those specific variable names?

Thanks!

Reply
user

Author PM Practice

Posted at 3:40 am January 6, 2016.

Thanks for publishing. It seems than my first contract waits for confirmation forever (0 of 12). I have 2020 ether. Following “create a token” part, using default code and parameters, and zero ether to be send. Any idea?

Reply
    user

    Author Dinkar Gupta

    Posted at 4:38 pm January 12, 2016.

    Did you manage to get it confirmed ? I have the same problem… just posted

    Reply
      user

      Author PM Practice

      Posted at 6:29 pm January 12, 2016.

      No, I didnt. After second try I have switched to browser version of solidity in order to try some smart contracts. I dont know how to progress with Wallet.

      Reply
    user

    Author meirariel

    Posted at 11:25 am February 28, 2016.

    Me too. I’m guessing no one is using the testnet?

    Reply
user

Author Dinkar Gupta

Posted at 4:23 pm January 12, 2016.

Thanks for the excellent series Alex. I have just started following this but I am stuck at the contract creation step (using testnet). I have submitted the contract for creation following the steps but the contract is not getting confirmed.. it’s still showing ‘Creating contract’ under progress only for last 4 hrs (also tried creating a new one but still same result). Have attached a screenshot.. not sure how can I see under the hood what’s happening? I checked on testnet explorer but the transaction is not visible there. Account is visible but with 0 ethers (I have >3000) and no transactions. Am I missing something ?

Reply
    user

    Author GCM

    Posted at 8:54 am January 25, 2016.

    “The wallet only allows basic mining on the testnet”

    Reply
    user

    Author Saarthak Puri

    Posted at 9:04 am April 3, 2016.

    Start mining! If you’re on a private testnet, there are no miners apart from you. So start mining. Just type miner.start() in your console and in a few seconds, your transactions should be confirmed.

    Reply
user

Author David

Posted at 7:38 am January 18, 2016.

Can’t be easier. Thank you very good explanation !

Reply
user

Author Gustavo MontesdeOca

Posted at 2:22 am January 28, 2016.

Thanks for the post – and for the desire to involve “the rest of us”. I can just about download an office suite so firmly in your target for this, though I even struggled with that – the installation did not create shortcuts or any other programme than uninstall..

(apologies if this is wrong forum for that- do direct me to appropriate place)

Reply
user

Author Mark Moltzan

Posted at 9:47 pm January 28, 2016.

Great job and thanks for all your hard work!!
Under the contracts page: WRITE TO CONTRACT has several functions under the drop down. Where can I read about what each does ?

Reply
user

Author Cody Af

Posted at 8:37 pm February 2, 2016.

this is what i get when I try to dl the wallet, it just says starting ethereum node….its been doing this for 15 minutes, how long does it take?

Reply
user

Author downhillfromhere

Posted at 11:37 pm February 23, 2016.

Great tutorial, currently trapped in the office while awaiting a very large vessel to arrive in our local port. My friends here are excited after reading your post. Our question is this, do we need to run geth or eth seperately and sync before running aleth one? Appreciation from an enthusiastic but unexperienced group at Port of Houston, USA.

Reply
user

Author Jabber0ne

Posted at 10:44 pm February 25, 2016.

What are best resources to work with e.g. PC, Windows 10. iPad, Smartphone, …?

Reply
user

Author wazza

Posted at 3:17 am February 27, 2016.

jcoin created…lol can i sell you some for btc……lol 🙂

Reply
user

Author Josh Jacobsen

Posted at 8:14 am March 5, 2016.

Token Made Look out for the volt world! to Donate send coins here 0xbfc209331e80ac266d472ccee2c9b2b280d66db0

Reply
user

Author Winbc

Posted at 4:48 am March 7, 2016.
user

Author Dean James

Posted at 11:03 pm March 7, 2016.

Mist does not have a windows 32 bit wallet?

Reply
user

Author Sripathi Srinivasan

Posted at 3:15 pm March 9, 2016.

In any transaction’s details there are two fields – “Gas used”, “Gas price”. What do these mean?

Reply
user

Author Saarthak Puri

Posted at 9:35 am April 3, 2016.

Great post Alex. In the wallet (OSX 0-5-2), the slider for setting the maximum amount of eth that you want to spend for a transaction is limited to a maximum that is below what is required in my testnet. I was able to compile from the command line but this is something that the wallet should allow.

Reply
user

Author Laura Wilson

Posted at 9:05 pm October 21, 2016.

Great info. Can’t wait to try it..
Best-
L R. Wilson
http://www.anonabank.com

Reply

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

View Comments (71) ...
Navigation