At its core, an Ethereum wallet, also known as a client, holds your private key – the “secret password” that gives you control over your coins. It also supplies you with a public Ethereum address which people can use to send you Ethereum’s currency known as Ether.
Introduction – We’re not in Kansas anymore
Ethereum addresses are long strings of letters and numbers starting with a “0x”.
Here’s an example:
This is as far as Bitcoin and Ethereum go in terms of similarities.
Many non technical users think of Ether as a currency in the same sense they view Bitcoin. They buy Ether in hopes its price will rise, they pay for stuff with Ether and more. However, Ether wasn’t designed for the same purpose as Bitcoin.
If you’ve watched our previous video “What is Ethereum?” you know that Ethereum is a network of independent computers working together as one supercomputer. This super computer executes pieces of code known as contracts (or smart contracts).
Interacting with contracts requires more complex communication than just send X amount of money from Y to Z like Bitcoin does. Ethereum wallets are the tool we use for this communication . So in order to truly understand Ethereum wallets we need to first understand how Ethereum is built.
Ethereum accounts and addresses
In Ethereum there are two type of accounts:
Externally Owned Accounts (EOAs)
The most basic type of account in Ethereum is called an EOA. Similar to how a Bitcoin wallet operates, EOAs have an Ethereum address that is controlled by a private key.
A person can open as many EOAs as he likes. Additionally to send and receive Ether, EOAs have the ability to create contracts and trigger them.
Contract accounts are accounts that have code associated with them. Every contract deployed to the Ethereum network has its own account which includes a unique Ethereum address. However, unlike an external account a contract account doesn’t have a private key that controls it.
So how is a contract account controlled?
The code that defines the contract includes a set of pre defined triggers which control the account. In other words, the conditions to control how the contract operates are hard coded from the get-go.
Similar to EOAs, contract accounts can receive Ether, and if triggered, send Ether or even create additional contract accounts (if they were programmed to do so).
It’s important to note that contracts can’t be changed once they have launched so the author must be very thorough in drafting the conditions for each trigger.
Sending Ether between accounts
EOAs can interact with other EOAs and with contracts through messages. These messages are “wrapped” inside transactions which are paid for in Ether. So while in Bitcoin transactions are used only to transfer value, Ethereum transactions are used for a variety of reasons:
- Transfer of value – The simplest form of transaction, sending Ether between accounts.
- Create a new Smart contract – Creating a new contract is done by sending a transaction that includes the contract’s code.
- Trigger a contract – Sending a transaction can also activate a specific contract to perform an action. For example – when you send money to an ICO’s contract account address you’re actually activating a contract that sends you tokens in return (more on tokens here).
Now that you understand how Ethereum is built and that transactions are in fact used to help accounts talk to each other we can move on to Ethereum wallets.
Types of Ethereum wallets
Smart contract wallets
Some wallets will only allow you to transfer value (i.e. send Ether between accounts). Other wallets will allow you to also deploy or trigger a contract. These wallets are known as “Smart contract wallets”.
Similar to Bitcoin, wallets are sometimes referred to as clients or nodes. There are two types of clients – full clients and light clients
A full node is a computer that holds the entire Ethereum blockchain history, since its inception until this day. Running a full node has disadvantages like increased memory and computer usage, however it allows you to verify transactions on the Ethereum blockchain without needing to trust anyone’s word for it.
Full nodes are an integral part of the Ethereum network as they are the “muscles” of the network, that help execute contracts in a decentralized manner. Each node that receives a new block of transactions also executes the code inside these transactions.
There are different programs to help you run an Ethereum full node. The most common ones are Geth and Parity.
Geth – Short for Go Ethereum. Developed by the Ethereum Foundation (A non-profit organization established to develop the code and community for Ethereum). Geth is the most popular and widely used program.
Mist -Since Geth is a tool made for developers Mist was created in order to allow non technical users to interact with it. So while technically you’re using Geth, Mist provides you with an easy user interface to talk to it.
Parity – A private company based in London whose mission is to enable businesses and organizations to capitalize on blockchain technology. They developed software to run full nodes for Ethereum and are considered the second most popular full client.
Just for reference, at the time of this article there are 9713 nodes running Geth and 4069 nodes running Parity. All full nodes are smart contract wallets – meaning they can deploy smart contracts to the Ethereum network.
Light nodes, similar to Bitcoin’s SPV wallets, are programs that rely on 3rd party full nodes in order to get information when needed rather than holding a full copy of the blockchain. This means they require less space and can operate on devices with limited space, such as mobile phones.
Being the second largest currency by market cap on the crypto market, Ether has caught the eye of day to day users. These users will usually use light nodes as their wallet since it’s easier to install and operate. If you don’t intend to write smart contracts any time soon (which I assume is the case) you can use any type of wallet listed below for the most user friendly experience.
MyEtherWallet – A friendly website interface
MyEtherWallet (or MEW for short) is a site that makes the experience of interacting with Ethereum’s blockchain easier. It is one of the first Ethereum light wallets, it is open-source and it’s a smart contract wallet.
You can access MEW through your internet browser. When using MEW, you can send & receive Ether, ERC20 tokens and even Ethereum Classic. Also, it’s important to know that the private key for MEW is stored on your computer in an encrypted file and not on the website. Meaning MEW doesn’t have access to your coins.
Security-wise, there are some things to look out for. Using a web browser as an interface opens a door to two types of attacks:
Phishing – A fraudulent attempt to steal your private keys by impersonating the website.
DNS attacks – Redirecting your internet activity to an alternative malicious server, usually on public WiFi.
However, there are ways to protect yourself from these attacks, by adding the website to your bookmarks, and always checking to see that the website has a lock-icon on the browser’stop-left-hand side with the word “Secure” next to it.
Hardware wallets – the most secure form of wallets
If you’re serious about security I suggest storing your Ethereum on a hardware wallet. While being the most secure way to store your coins, hardware wallets aren’t free and cost anywhere between $50-$100 (shipping not included).
Also, hardware wallets are not smart contract wallets by design, they can only send and receive Ether and ERC-20 tokens.
However, you can use MEW’s interface to control your hardware wallet and then use it as smart contract wallets.
Today’s leading hardware wallets TREZOR, Ledger and KeepKey all supply you with the option to store Ethereum on them. Here are links to previous reviews we conducted about these wallets:
Personally, I use a TREZOR but all three are excellent choices for maximum security.
MetaMask – A browser extension wallet
MetaMask is a browser extension that can be used on Chrome, Firefox and Brave. It can hold Ether and ERC-20 tokens only. It has a built-in coin purchasing mechanism and even has Hierarchical Deterministic (HD) settings – meaning your wallet can create an almost infinite amount of addresses.
Similar to MEW, MetaMask is open source, however unlike MEW, the private keys are stored on your browser in an encrypted way including password protection and are not downloaded to your computer. MetaMask is not a smart contract wallet.
Exodus – The desktop option for increased control
Exodus is a Bitcoin and Altcoin desktop wallet with beautiful design and an intuitive interface. The wallet can be used purely for sending and receiving Ether and is not a smart contract wallet. I’ve reviewed the wallet in the past and thought it was one of the best I’ve found so far.
When it comes to limitations for exodus keep in mind that it’s not 100% open source. Many components inside Exodus are open source, but not all of them. This means that the code is not fully reviewed by the community.
Also the wallet is currently available only in a desktop version (no mobile version yet). Exodus supports only ETH and not ETC (Ethereum Classic). Exodus is an independent wallet that stores the private key on your machine and not on any external server. This means you have full control (and full responsibility) over your coins.
Jaxx Wallet – A multi-platform Ethereum wallet
Similar to Exodus Jaxx provides a simple and intuitive interface for many altcoins. Also similar to Exodus Jaxx is not a smart contract wallet.
Unlike most other wallets out there Jaxx supports ETH (Ethereum) and ETC (Ethereum Classic). Also, your private keys are never shared with Jaxx’s server and are safely stored on your machine. Jaxx is not open source but the code is freely available on the wallet’s website which makes it a bit more accessible for review.
ETHAdress – The cold storage option
For those of you who wish to store Ethereum offline and not use a hardware wallet you can print out an Ethereum Paper wallet. MyEtherWallet allows you to print an Ethereum paper wallet just like the one you have in Bitcoin. Similar to BitAddress.org, the site will create a private and public key pair with the click of a button. You can then print out this information and store it in a safe place so no external hacker will be able to get your coins.
One more option that’s available is to encrypt your private key so that if you or anyone else wants to use the coins they will need to know the password to decrypt it.
You should NEVER share your private key with anyone. In the image above my private key is publicly exposed but it’s because there are no coins in this wallet. The minute someone knows your private key he has control over your coins.
Using ETHaddress will probably be a relatively secure way of storing Ethereum. However, ETHaddress can be used only with ETH (not ETC). Also, if you ever want to use your coins for payment or to send them to someone else you will need to import the keys into an online wallet (e.g. Exodus, Jaxx) and only then will you be able to use them.
Units of Ether
While Bitcoin can be divided into 100,000,000 units with the smallest unit called a Satoshi, Ether can be divided into 1,000,000,000,000,000,000 units (1 quintillion) with the smallest one called Wei. Wei is named after Wei Dai, a cryptography activist who is known for supporting widespread use of strong cryptography and privacy-oriented technologies.
Fees for transactions, which we will discuss in a moment, are usually calculated in Giga Wei or GWei. So 1,000,000,000,000,000,000 Wei equals 1 Ether and 1,000,000,000 Wei equals one GWei.
There are also other names for different amounts of Wei, all named after famous cryptographers, as shown in this table:
In Bitcoin, to send a transaction we need to add a miner’s fee to it. This way, we incentivize the miners to include it in a block. In Ethereum, we must keep miners incentivized as well, for their contribution of computing power to the Ethereum supercomputer.
Just like a car, the Ethereum network runs on Gas. Each line of code that needs to be executed by the network will take up a certain amount of gas. Run out of Gas and the code stops running.
You specify how much Gas you’re going to use upfront, and you can’t refuel on the way. If your contract runs out of Gas because it’s written inefficiently or you miscalculated, it will just stop in the middle of the road. This system motivates Smart contract programmers to keep their code lean and optimized, since Gas costs money as we will soon learn.
Who collects this Gas?
Well, it goes to the miners as they are the ones investing computing power in order to update the ledger of Ethereum transactions (similar to what goes on in Bitcoin).
How do I get gas?
Gas isn’t something you can own, it’s just a unit of account to measure how much work is needed to run a line of code. Think of it as the equivalent of hours of labour.
Gas is paid in Ether, Now I know what you’re thinking – why not just price execution of smart contract in Ether, why do we need another virtual currency?
Well, Ether’s price is constantly changing, and if we priced contracts in Ether the price would be different each time we calculated it due to the fluctuating exchange rate. Imagine we’d price painting our house at 2 Ether, sometimes it would cost us $1000 and other times $2000. With Gas, running the same contract several times will always bring back a fixed amount of Gas to be paid just like painting the same house takes the same amount of hours every time.
How gas is calculated
So how much gas do you need to run a line of code? Easy…there are predefined amounts for each action you want to run in your code (an example can be found here). For example, sending Ether from one address to the other requires 21,000 gas units.
How much Ether does a 1 gas cost?
Now comes the tricky part. The price of 1 gas unit changes all the time depending on how crowded the network is. The same way an hour of labor would cost more if many people are looking for employees the Gas price rises when the network is crowded.
The “standard” gas price is around 0.00000002 Ether (or 20 GiGa wei). You can consider this the average salary on the market for an hour of labor.
If the Ethereum network is very busy and you want your contract to get priority in execution over other contracts you may over bid the gas price so that miners will have an incentive to include your contract in the next block. You’re basically saying I’m willing to increase your pay per unit of labor so you’ll give my work priority.
This is similar to how Bitcoin transaction fees rise when the network is crowded. You can check the current standard Gas price of the network here.
When sending out transactions in Ether you must specify a gas limit – meaning how much gas are you willing to pay at max for running our lines of code. This is done in order to protect you from depleting your funds in case your code has an error and runs endlessly and inefficiently.
You pay the gas limit upfront and there’s no option for “refueling”. If you overpaid you’ll get refunded, if you underpaid the contract will just stop in the middle.
So you choose how many units of gas and how how much to pay for each unit. If you don’t use enough units no miner will pick up your transaction since it doesn’t have enough gas from the get go. If, on the other hand, you choose enough units of gas but underpay for them it may take a lot of time for your transaction to go though.
In Ethereum, fees are a general term that refers to the gas used multiplied by the gas price you were willing to pay. In other words – the hours of labor times the wage per hour. The higher you’re willing to pay for gas the more Ether the miners will compete for running your code and the faster your transaction will be included in the blockchain.
Keep in mind that if an operation ran out of gas mid way it will halt (just like your car) and no Ether will be returned to you (just like a gas station doesn’t refund you even if you didn’t have enough gas to get where you want to go). This can happen if for example your contract needs to do some recurring function that keeps on consuming gas and finally runs out.