Ethereum Beginners' Guide #1 - Ether

in #ethereum7 years ago (edited)

All right, so maybe you have a geek friend who told you that Ethereum is the best thing since sliced bread Bitcoin, or your Mom told you that you really should be using Smart Contracts now-a-days, or you heard that guy with the tinfoil hat on the corner raving that your Ether isn't safe and you should be managing your wallet better. But in all those cases you Googled around and got lost in whitepapers, ICO advertisements, Solidity jargon, and gave up.

If so, this guide is for you. This guide is written by me, a developer, to help you, a user. Ethereum is branding itself as the "web/internet version 3.0" (implying that what you're using right now to view this article is the web 2.0). When you're talking software (and we are), jumping a whole integer like that is a "major version upgrade", and often includes brand new ways of doing things. That's what's going on here. Ethereum wants to change the fundamental way we interact with computers that are connected to the internet. As such, all the reflexes and assumptions from the "web 2.0" might not be useful any more. So, that's what this guide is for; learning some new reflexes.

It will be strange. It might be slow. But it doesn't have to be hard. Remember back when you first learned what a username and password was, and how strange it was that when you type in a password field all you see is ••••••••, but the computer knows it's hunter2? Now passwords are a second-nature to you; not strange or slow for you to figure out how to interact with. So let's learn some fundamentals that will help you get around the web 3.0, so you stop having to call your Mom to come fix your Smart Contracts for the third time.

This guide is the first step in getting integrated into Ethereum, and will cover getting a wallet and funding it. That's an essential step before moving on to step two, which is "Smart Contracts" (actually doing something with Ethereum). If you're wanting to jump right into Smart Contracts, click here to go straight to that guide.

All right, for those of you still here, great! There's one core rule that you need to understand when dealing with Ethereum, or any of these new blockchain technologies: they use the word "decentralized" to describe how they work. And they'll market that as a feature, saying it's hard to censor, crash, or monopolize something that's decentralized. Those are all true, and those are all positives, but there's one very big downside that now needs to be part of every single action you do within this technology: there is no trust built in. When a system is centralized, you have something like PayPal. You create an account with PayPal, and do all actions through their website, where you trust that they're watching over you. They make a good product because their reputation is on the line. You learn to trust them because if they break that trust, you can complain to that guy on the corner in the tinfoil hat, point at PayPal's corporate offices and say "there they are, they did bad things to me and I want restitution!" And because that guy in the tinfoil hat is actually a CIA agent, you get justice served. That threat helps keep PayPal honest. Odds are very slim that PayPal will suddenly close its site and run off with everyone's money. With Ethereum (and Bitcoin, and all other blockchain-based, "decentralized" technologies), there is no central point like that. In Ethereum, you must operate with the default being that everyone's a con man. Because if you don't, no one will cover for you. And that includes me. Don't trust anything I say without verifying it. This blog post may have been been copied from its original location, edited by your evil step-cousin, and now has some nefarious bad advice in it. As we go, I will show you how to verify actions you take within Ethereum. Do those checks. If you don't, come back and post in the comments so the rest of us can have a good chortle. So, treat me not as your Albus Dumbledore ✨, who's going to take you on a special adventure to wild places you've never been, but as your Cato Fong 💪, who is helping you train for the unknown fight ahead, and part of that training is kicking you in the head if you're not paying attention. Like that link I posted up a paragraph to skip this guide; it's a ruse. To those of you who clicked it, welcome back 😀 ! Skipping steps will get you kicked, either by me or by any nefarious hacker out there (possibly that new intern who linked you to this article in the first place) . Even if you think you've done all this baseline setup already, it's worth a re-read, as you probably missed something. So, I'm not going to give you the link to the next guide until the end. It's for your own good.

So, how can you trust me? To start with, I'm posting this article on Steem, which is blockchain-based, and has upvotes and downvotes where users stake their own reputation on vouching for articles. As this article gains upvotes, those users likely have gone through it before you and can vouch for it, which should give you some baseline confidence to keep going. Once you have your own Ethereum account set up, I'll show you how to do more verifications within the Ethereum ecosystem.

1. Get a Wallet

Okay, so Ethereum is a brand new world. So where do you start? In this initial step, it's useful to think of Ethereum as a separate country that you're immigrating to (or at least staying for several months to check out the beach scene). One of the first things you'll need there is money. And that's why we're going to start with money. Yes, it will take real money to follow this guide. Yes, if you make a mistake you can lose your money. So, we're only going to be playing with an amount of money that won't hurt too badly if you lose it all. But we're going to be treating it as if it's much more, so you learn the proper reflexes for transacting in large sums when the time arrives. This first step (setting up a wallet) will be the longest, and probably hardest to get. So good news, it gets easier! This first step is very involved because you're building a foundation, and you want that foundation to be as rock-steady as possible for all the next steps. There's ways to do this step less-steady and more-steady; I'm going to show you a middle-ground way that's good enough for initial investment. So here's a few terms you may have heard of to put your mind at ease about because you don't need them right now: If you've heard of the "testnet", we're not doing anything with that (testnet is for developers). If you've heard "paper wallets are the best", relax, you're going to make one through this process. If you've heard "hardware wallets are the best", relax, this is an intro, and we'll get to them eventually, just not right now; you're going to learn the reflexes for living without a hardware wallet first.

So, imagine you've got $100,000 you're needing to bring with you. What do you do? You put on your best suit and smile, walk into a bank, speak to a banker and set up an account. We're going to do the same thing in Ethereum. Before you do any sort of depositing of any sort of funds, you need a place to hold them (in a bank, that would be termed an "account". On your person, you keep your real-world cash in a "wallet". Ethereum has similar-named holding places). But, as you may have heard, there are no banks in Ethereum; you have to be your own bank. What does it mean to be your own bank? Well, it means that you ask yourself for an account! So go put on your best suit and go sit down at your computer. No, seriously, go put on your best "going in for a job interview" outfit. If you actually had $100,000 in your pocket you'd treat the situation seriously, and would take a formal approach to it. So go put on some different clothes to mentally break yourself out of your routine for these next steps 👔 . Go on, I'll wait.

Back now? Good. So let's open an account for ourselves. For this guide, we're going to use the MyEtherWallet website. It's a website that gives you several tools for interacting with your wallet. One thing to realize about an Ethereum "account" is that it's just a number. In the same way that for your checking account at your local bank, you have an account number that's printed on the bottom of your checks and allows your checks to be distinguished from your hairy neighbor who likes to sunbathe in the backyard in the buff. So, MyEtherWallet will help you create an account in Ethereum by helping you pick a number, but you can then take your account other places afterward if you so desire; there's nothing about your account that will tie you to MyEtherWallet because it's just a number. 

Now, if you're that gal who just flipped her hair off her shoulder and said "if it's just a number, I can pick a number myself; I don't need a website to help me count!" Great! Fine, pick a number. Any number. Is it your birthdate? Bad; pick again. Is it your telephone number? Bad; pick again. Pick the largest number you can rattle off. Now, if you're like most people, when you said the largest number you could think of, you probably said a number whose largest unit is "trillion", so you probably ended up with a 15-digit number. That number is too small; pick again. Why? In Ethereum, where there's no central authority who makes sure that the number assigned to you isn't assigned to anyone else, you have to pick an account number that no one else will ever guess. To make sure there's many options for everyone to pick from, an Ethereum account number can have up to 78 digits. The technical definition is "Pick a number between 0 and 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,935" (that's "115 quattuorvigintillion, 792 trevigintillion ..."; quattuorvigintillion is now the word of the day. Use it in a sentence and post a comment here how you did it. Bonus points if the sentence doesn't reference Ethereum accounts!). And, since humans are terrible at picking random things, we'll use a computer to help us pick a random number in that range that's not stupid.

So, head over to https://myetherwallet.com and go click on some stuff. Get a feel for what the site is and what it looks like. There's some tabs across the top that are some different tools, and some controls in the top-right that have some different options.

Got it? Okay, so let's use this tool. Still in your best suit? Good. Now you might want to add a Dick Tracy hat if you have one, since this next step is to create something secret, something that no one else should ever know, so a little bit of super-spy wouldn't go amiss.

Knowing that you're going to create something that should be secret, there's a few preparatory steps to do: Firstly, to the guy with the awesome mustache sitting in the middle of Starbucks reading this, get out of a public setting! You don't want anyone reading over your shoulder or any security cameras recording what you're about to do. To the soccer mom who borrowed her teenage son's laptop for this, run a virus scan! You don't want any malicious viruses on your computer that might be recording every keystroke you make. Now, to that slick business professional who still has a tab open to MyEtherWallet to save time since you guessed I'd have you go back there, close all windows to myetherwallet.com! That last one may make you pause; didn't I just say we'd be using it? Yes. We will, but not the web-based one. "MyEtherWallet" is a web-based application, which means it's a bunch of HTML, CSS, and Javascript code that your browser knows how to run (in the case of Javascript) and display (HTML/CSS). For the web 2.0, visiting a domain name (example.com or whatnot) downloads the latest version of that website and displays it for you. For this exercise, we don't necessarily care about getting the latest version, we want a verified version that hasn't been tampered with. So, we're going to download a copy of the MyEtherWallet website to our computer and run the code from there instead. Fortunately, MyEtherWallet creates download-able bundles of their website to make it easy to do this. Download this file (dist-v3.9.6.5.zip), and double-click it to extract. You should see a folder structure like this:


Does your folder contents not look like mine? OMG, did you actually do that?! Did you download something and double-click it without knowing what it was? Shame on you! Be glad I didn't just stick you with a virus! 😏 Okay, so here's how you can get a real download of MyEtherWallet and verify it. Head back to https://myetherwallet.com (okay, you didn't really have to close the tab; I just wanted your attention) and look in the lower-right for the "Github: MyEtherWallet v3" link. That will take you to a GitHub page, where the developers of MyEtherWallet host their code. Double-check that you're actually at GitHub (the URL should be https://github.com/kvhnuke/etherwallet and there should be a green lock icon indicating the site is owned by "GitHub, Inc. [US]"), and go to the "Releases" link for the project. From that page, find the link for the dist-v3.9.6.5.zip package and download it. That will be the genuine bundle; double-click it to extract it and you'll see the folder structure like I have above.

In your downloaded files, double-click on the index.html file, and your browser should re-open to a site that looks like the MyEtherWallet application, but the URL will start with file:// instead of https://. Click around and you should see that it still works the same as the one hosted at myetherwallet.com

When you're ready, click the "New Wallet" tab across the top. Now, enter a password in the indicated field. Use your best "web 2.0" reflexes to create a good password. This password will not be your Ethereum account, but will be one of the safeguards MyEtherWallet's going to put in place for you. When you've got that entered, click "Create New Wallet".

That will take you to a screen prompting you to download your Keystore. Click the button to download it, and then click the "I understand" button to continue.

It will then show you your Private Key. There it is, in all is glory; that is your access to the Ethereum universe! You'll see it's mostly numbers, with a few letters sprinkled in. MyEtherWallet formats the number in hexadecimal, which is a numbering system a bit easier for computers to understand, plus it makes it shorter to write out (remember I said account numbers were up to 78 digits? That's true if you write them out using common decimal notation. Written out in hexadecimal, they're a max of 64 digits. Such a savings!). Save that number in a safe spot. Now, that was a very short sentence, but there's a lot of weight to it. "Safe spot" here is relative; for this exercise we're not going to be storing too much value in it, so if it falls into enemy hands it's not the end of the world. But what if you did have $100,000 you're working to protect? Whoever gets a hold of that private key would be able to steal all that from you. So how do you protect it? The best advice is to not have it stored in a computer, to prevent hackers having any possibility of getting at it. So, write it down on a piece of paper. You could manually do this, or MyEtherWallet gives you a big easy button to "Print Paper Wallet". Click that and it will generate a pretty document you can print out on your printer. You can cut it out (it's supposed to somewhat resemble paper money in size and shape), and note that it has (among other things) your Private Key on it. But now you need to keep the piece of paper safe. If you have a safe, put it there. Or a safety deposit box. And you need to make sure that paper lasts. Put it in a fire-resistant safe to survive a house fire. Once you've got that sorted, click the "Save Your Address" button to continue.

MyEtherWallet then tests you to make sure you followed the previous instructions properly by asking you for your Keystore File back again, and your Password again. Enter both those things, and click the "Unlock" button. If you did it correctly, it will show you a bunch of information about your newly-created account. The only piece of all that's being shown to you that you don't have already is the Account Address. Find that and copy that one down too.

Okay, you're done with the initial setup! MyEtherWallet generated several things for you just now:

  1. Password: what you created in the first step
  2. Keystore File: a file you downloaded, which starts with UTC--
  3. Private Key: A 64-character hexadecimal string.
  4. Paper Wallet: physical piece of paper you printed off your computer. It has your Private Key written on it.
  5. Account Address: a 40-character hexadecimal string.

These five things are redundant backups of each other. They're designed such that if you lose access to one, you can still get at your funds. Here's how they work together: your private key (#3) is the only thing you need to access your funds. That makes it both very convenient and very dangerous (if an attacker gets it, they have your funds). And, the private key doesn't have any protection of its own, so it's up to you to use outside means to keep it safe. The paper wallet (#4) is a useful way to store your private key in a physical form. The paper wallet has both private key (#3) and account address (#5) on it, both written out as a hexadecimal string, and as a QR code (which makes it easy to input into a mobile device that has a camera). It's intended for you to fold the right side of the paper over and tape it, so that the private key values are hidden and sealed away (helps prevent accidentally showing your private key to a security camera as you're walking around with your paper wallet). The keystore file (#2) and Password (#1) work together. Either of them individually is useless for getting at your funds; the keystore file (#2) has the private key (#3) encrypted inside it with the password (#1). So, an attacker would need to get their hands on both to steal your funds. So, separate those two into two separate locations, so an attacker would have to hack two different things in order to get them both. The account address (#5) is the least essential but most commonly used part of your wallet. The account address (#5) can be derived from the private key (#3), so as long as you have the private key (either the paper wallet (#4), or the keystore file (#2) and password (#1) together), you can re-calculate the account address.

One other bit of terminology for you: in Ethereum, a "wallet" is a single place to store funds (similar to a "bank account"). An "account" in Ethereum is a collection of wallets (the reason why they're grouped that way is up to the owner of them. Could be personal/business expenses, different accounts for different family members, etc.). So, an "account" is singular in the traditional banking system, while in Ethereum it is a grouping of things (and everyone carries a "wallet" in Ethereum, so ladies, no more purses you need to worry about matching to your outfit 👛). Typically one of the wallets in an account is the primary wallet for the account, and acts as the main identifier for the account, so many places use "account" and "wallet" interchangeably.

2. Get funded

Okay, so you've now got a place to store funds. But how do you get funds to put in there? First, let's relate it to a common checking account: with a checking account, you have an account number and routing number, which together allow anyone to deposit funds into your account. But to take funds out of your account, you need one more thing. Typically your signature (signing a check), a PIN (using an ATM), or your face (using a photo ID to make a withdrawal in the bank). Let's take your PIN as the example to represent of all things that allow you to make a withdrawal. So, it's safe to give someone your routing number and account number, since the worst they can do is make you richer 🤑 ! And you must guard your PIN, since if any attacker gets a hold of it, they can easily find your account number (since it's fairly public) and use the two together to steal your funds.

Now, let's take that analogy to Ethereum. Instead of having an account number (public thing) and a PIN (private thing), Ethereum has two numbers called "Account Address" and "Private Key". Like a checking account, you can give out your Account Address freely without any risk of losing money. But if someone gets your Private Key, that one bit of information is all they need to steal your funds. One difference with Ethereum compared to a bank account: if someone knows your bank account number, they can send money to you, but they cannot see how much money you have in your account. With Ethereum, they can! Knowing someone's Account Address allows you to both send money to them and see exactly how much money is stored at that destination.

So, let's use your Account Address to get someone to send you some money. The actual "cash" in Ethereum is called ether. And just like US Dollars and other real-world currencies, it can be divided into smaller pieces. US dollars can be split into 100 cents. That gives you some degree of precision, which is okay for buying/selling goods (products can be priced at $1.99 or $2.00), but for buying items based on time or volume (buying a salad for lunch cost per pound, or parking meters price per minute) there's room for it to be more accurate than it is. Buying gas for your car adds one more decimal place for precision, though that's odd and not many other goods/services do that. Hence Ethereum scoffed at dollars' measly 2 decimal places and set it that one ether can be divided into 1,000,000,000,000,000,000 wei ("one quintillion wei")! So, even if you can't afford a whole ether, you should at least be able to afford a couple million wei.

Now, you've got US Dollars you're wanting to hand over to the banker to get deposited into your account, but in Ethereum, you're the banker, so how do you change USD into ether? The answer is "on an exchange" (if you're the sultry vixen in the back who answered "mining", you've been hanging out with some very cool friends 😎; forget about mining (you don't need to know how that works), and just ask the person who told you that term to just send you some ether instead). For this guide, we're going to use Coinbase as an exchange. Why? Because they adhere to US regulations, and have made it quite easy to purchase ether directly, using a checking account or credit card. The downside is, because this step is dealing with USD, it's subject to regulation, and will take a few days to process. So, head over to Coinbase and create an account. Fill out the form and click "Sign Up" to get an account. Once in, you'll need to either enter information for a credit card (takes longer to verify that you own the account, but then you can buy ether instantly, but the purchase fee is higher), or a checking account (can be instantly verified using your online bank account credentials, but then buying ether takes several days, however the fee is lower) pick whichever suits you, or one of each for flexibility in the future. 

Once you have a payment source configured in Coinbase, go to the "Buy/Sell" page, and initiate a "Buy" for ether. Note, Coinbase charges a flat fee for purchases under $200. So, the most economical is to buy $200 worth, since if you buy any less, you'll still pay the same fee. We're not going to use $200 worth for the rest of the exercises, so feel free to get less if you can't afford that.

Click the "Buy/Sell" tab, then make sure the "Buy" tab is selected in the page widget. Click "Ethereum", pick your payment method, and enter an amount in USD to purchase. Then click "Buy Ethereum" to confirm.

Now, you'll have to wait a few days if you used a bank account to purchase, but soon Coinbase will tell you you have some ether in your account! But if you scour around the Coinbase site, you'll notice that it doesn't show you anywhere the private key associated with where your ether is. That's because Coinbase keeps all the private keys to itself. It holds all its customer's funds in a few large pools and only earmarks part of it for you through your username and password with them. As I said in the beginning, you must start from a default perspective of not trusting. So, this should seem like a tenuous position to you. Coinbase has been around for several years, so it probably won't suddenly shutter its site and run away with everyone's money, but are you certain about that? The saying among cryptocurrencies is "if you don't own the private key, you don't own the funds", and web-based wallet software (like Coinbase) is convenient, but part of that convenience is they have the private keys. And remember, we're pretending what we really have is $100,000 invested, so we really want to make sure we're the only ones in control of our funds! So, let's send that ether to the wallet we created.

Go back to Coinbase, and go to the "Send/Request" page, and make sure that "Send" is selected in the widget. First, jump partway down the page to where it has the wallet drop-down and make sure your "ETH Wallet" is selected. Then you can go back up to the "Recipient" field and fill in the account address of the wallet you created. Triple-check that what you're entering is not the private key for your wallet! The account address (the one you want) is 40 characters long, and you do want to put the 0x in front too (which is a flag that indicates it's a hexadecimal number), so you should have typed 42 characters into the field. Good? Under the "Amount" field, change the drop-down to USD, and enter "10.00" for the amount. Then click "Send Funds", and you're good to go!

Coinbase will give you a confirmation message saying the funds were sent, but your paper wallet doesn't change (it's just paper; what, were you expecting some Futurama-like self-updating paper bill?). How do you know the funds really did move? Coinbase shows you how much ether you have in your account when you log in, but how do you check your paper wallet? Let's use MyEtherWallet again:

Head back to MyEtherWallet and go to the "View Wallet Info" tab. Make sure that in the top-right corner of the screen, the drop-down menu labeled "Node:" says "Node: ETH (MyEtherWallet)". Then, check the "View with Address Only" option, enter your account address into the "Your Address field" and click "Unlock".

The screen should show some details about your wallet again, and on the right side, it will show "Account Balance". Does it still say "0 ETH"? Don't panic; your transaction may not have confirmed yet. Any actions taken within Ethereum are sent to the worldwide network of Ethereum-running computers to be verified. Once every 10 seconds the transactions that are verified are finalized by being added to the blockchain. Further below the "Account Balance" display is a "Transaction History" widget. Click the link there that leads to Etherscan.io. Etherscan is a "Block Explorer" website, which means it gives you an insight into the blockchain data that's the backbone of Ethereum. Following the link will take you right to the Etherscan page about your wallet address (you can also get there by visiting https://etherscan.io directly and putting your account address into the search box). In that page, find the section labeled "Transactions" and you should see your incoming funds listed there.

Got it? Great! You now have an Ethereum wallet you totally control, and is worth something! 🎉  Now, to prove you've done so, make a comment below with your Account Address, so the rest of us can go check it out on Etherscan and see you were successful (and if you're still wearing your best suit 👔, take a selfie with your paper wallet and post that so we can all applaud how awesome and dapper you are)!

Also, by posting your account address here for all the world to see, you're testing the system to verify what I've said. I said a person who only has your account address cannot get at your funds (only can add more). Find your comment where you posted your account address, and find the address of the person just above you who did the same. Copy their address, and use Coinbase to send them $1 worth of ether. Did Coinbase let you? Go check Etherscan; do they now have their funds plus your $1? Great!

Now that your public account address is out there, wait a few weeks. Then go check Etherscan. Are your funds still there? You put your money on the line, and attackers have had days to poke at it, knowing that because it's posted with this article, you're a n00b who may have made a dumb mistake that they can capitalize on. Do you have your funds still? Great! They haven't found any glaring holes in your process! If you do find your funds are gone, you may have messed up your public/private numbers, and posted a private key when you were supposed to give the public account number. Or, you've mistyped the public account number when trying to send something and you sent it to a wrong destination. Post a question here, and someone's sure to jump in and help you figure out what went wrong.

3. Next Steps

Now that you've got ether, what do you do with it? So far what we've done is a very similar process to creating a Bitcoin account and acquiring your first bitcoins (Actually, now that you know what "private key" and "public address" are, you could head over to BitAddress.org and figure out all on your own how to create a Bitcoin paper wallet, since the process is pretty much the same. Your Coinbase account can also be used to purchase bitcoins, which you can transfer to your Bitcoin paper wallet the same way as transferring ether to your Ethereum paper wallet).

With Bitcoin, the only thing to do with your bitcoins once you have them is to send them to someone else (probably in exchange for a good or service). But with Ethereum, there's worlds of possibilities that your ether can be used for. In the next guide, I'll step you through "Smart Contracts" and we'll diversify your Ethereum portfolio by changing some ether into different Ethereum assets.

I don't actually have that guide done yet, so hang tight for a bit on that, and I'll post a link for it here when it's done. In the meanwhile, post any comments or feedback on this guide to help me keep it up-to-date and as helpful to other newbies as possible!


Sort:  

Guide #2 is done; check it out over here! ✨

Great guide and well delivered. Thanks!

Here's my address! Verifying that I got started using this guide.
0x7A8D273A042EE1Bd557Bc060362CDF2FdeC6D3E8

Extremely well-written guide. Perhaps even more useful than it's explanatory value are the sharply-made points about good OpSec. Definitely worth doing the exercises AS you read the article.

My address: 0xE9c3395DEDc275E38eDA480e52beFc2BF3A0dFAA

Can't figure out how to post a picture here, so I guess I'll leave out the photo showing off my suit and paper wallet key pair... ¯_(ツ)_/¯

Interesting post. I was about to start a similair discussion. Be prepared for a fluctuating crypto market. We do need more indept investment analysis. I was wondering if anyone of you uses: https://www.coincheckup.com Every single coin can be analysed here based on: the team, the product, advisors, community, the business and the business model and much more. See: https://www.coincheckup.com/coins/Ethereum#analysis To see the: Ethereum Research report.

Coin Marketplace

STEEM 0.33
TRX 0.11
JST 0.034
BTC 66407.27
ETH 3219.07
USDT 1.00
SBD 4.34