Ethereum Wallets Explained Simply (Smart Contracts, Gas, Transactions)
Summary
TLDRIn this informative video, Nate Martin from 99Bitcoins dives into the intricacies of Ethereum wallets, their operation, and their significance within the Ethereum ecosystem. He explains that Ethereum wallets, also known as clients, serve as the gateway to interact with the Ethereum network by holding private keys and providing public addresses for Ether transactions. Martin distinguishes between two types of Ethereum accounts: Externally Owned Accounts (EOAs) and Contract accounts, highlighting their unique functionalities and the role of smart contracts in the network. The video also elucidates the concept of Gas, a measurement of computational effort required to execute a contract or a transaction on the Ethereum blockchain, and how it's priced in Ether. Furthermore, it outlines the differences between full and light clients, the importance of full nodes in verifying transactions, and the option of light nodes for users with less technical expertise. Martin also touches on hardware wallets for enhanced security and the various clients available for running an Ethereum full node. The video concludes with a discussion on transaction fees, emphasizing the importance of understanding Ethereum's complexities for users and developers alike.
Takeaways
- 💡 Ethereum wallets, also known as clients, are software or hardware that hold private keys and allow users to interact with the Ethereum network.
- 🔑 An Ethereum wallet provides a public Ethereum address for receiving Ether and a private key for controlling the coins.
- 🏦 Ethereum has two types of accounts: Externally Owned Accounts (EOAs) and Contract accounts, with EOAs controlled by a private key and contract accounts by predefined triggers.
- 📝 Ethereum transactions serve multiple purposes, including value transfer, smart contract creation, and contract interaction.
- 💻 Full nodes are computers that hold the entire Ethereum blockchain and verify transactions, while light nodes rely on third-party full nodes for information.
- ⚙️ Smart contract wallets are a type of Ethereum wallet that allows users to deploy or trigger smart contracts.
- 🌐 Full node clients like Geth and Parity are integral to the Ethereum network, executing contracts in a decentralized manner.
- 📲 Light nodes are user-friendly and suitable for everyday users who do not intend to write smart contracts, operating on devices with limited space.
- 💰 Hardware wallets are a secure way to store Ether but are not smart contract wallets and can only send and receive Ether and ERC-20 tokens.
- 💰 Gas is a unit of measurement for the amount of work needed to execute a line of code on the Ethereum network, paid in Ether.
- ⛽️ Gas price fluctuates based on network congestion, and users can overpay for faster execution, similar to paying more for labor during high demand.
- 🔍 Transaction fees in Ethereum are calculated as the product of the gas used and the gas price, incentivizing miners to include transactions in blocks.
Q & A
What is the primary function of an Ethereum wallet?
-An Ethereum wallet, also known as a client, holds the user's private key, which is the 'secret password' that provides control over the user's coins. It also provides a public Ethereum address that others can use to send Ether, the native currency of the Ethereum network.
How does Ether differ from Bitcoin in terms of its design purpose?
-While many users view Ether similarly to Bitcoin as a currency for buying and selling goods and as an investment, Ether was not designed solely for these purposes. Ether is used to facilitate complex interactions on the Ethereum network, such as executing smart contracts, which are beyond the scope of Bitcoin's design.
What are the two types of accounts in Ethereum?
-In Ethereum, there are two types of accounts: Externally Owned Accounts (EOAs) and Contract accounts. EOAs are controlled by a private key and can send and receive Ether, create contracts, and trigger them. Contract accounts, on the other hand, are associated with deployed contracts on the Ethereum network and do not have a private key; they are controlled by the predefined triggers within the contract's code.
What is the role of transactions in the Ethereum network?
-Transactions in Ethereum are used not only for the transfer of value, like in Bitcoin, but also to create new smart contracts and to trigger existing contracts. They facilitate communication between accounts and smart contracts on the Ethereum network.
What is the difference between a full node and a light node in Ethereum?
-A full node is a computer that holds the entire Ethereum blockchain history and can verify transactions on the Ethereum blockchain without relying on others. Light nodes, similar to Bitcoin's SPV wallets, rely on third-party full nodes for information and do not hold a full copy of the blockchain, making them suitable for devices with limited storage.
How does the concept of Gas function in Ethereum?
-Gas is a unit of measurement for the computational effort required to execute a contract or a transaction on the Ethereum network. Each line of code execution consumes a certain amount of Gas. Users specify the amount of Gas they are willing to use upfront, and the cost is paid in Ether to miners who execute the code.
Why is Gas priced in Ether instead of being a separate virtual currency?
-Gas is priced in Ether to maintain a consistent cost for executing smart contracts despite the fluctuating value of Ether. If contracts were priced directly in Ether, the cost would vary with Ether's exchange rate, leading to inconsistent execution costs.
What are the different types of Ethereum wallets mentioned in the script?
-The script mentions several types of Ethereum wallets: Smart contract wallets, which allow users to deploy or trigger contracts; full node wallets, which can run a full Ethereum node and deploy smart contracts; light node wallets, which are less resource-intensive and suitable for everyday users; and hardware wallets, which offer high security for storing Ether and ERC-20 tokens.
How does the price of Gas fluctuate and what factors influence it?
-The price of Gas fluctuates based on the network's congestion. When the Ethereum network is crowded, the price of Gas increases, similar to how the cost of labor might rise when there is high demand. Users can also choose to overbid the Gas price to give their transactions priority in execution.
What happens if a contract execution runs out of Gas mid-way through?
-If a contract execution runs out of Gas, it will halt, and no Ether is returned to the user, just like a car would stop if it runs out of fuel. This emphasizes the importance of accurately estimating the Gas required for a contract's execution.
How do transaction fees in Ethereum work?
-Transaction fees in Ethereum are calculated as the product of the Gas used and the Gas price the user is willing to pay. The higher the Gas price per unit, the more miners are incentivized to include the transaction in a block, leading to faster processing.
What are the implications of choosing a low Gas price for a transaction?
-Choosing a low Gas price can result in slower transaction processing times, as miners prioritize transactions that offer higher Gas prices. If the Gas price is too low, miners may not pick up the transaction at all.
Outlines
💼 Ethereum Wallets Explained
This paragraph introduces Ethereum wallets, their function, and the basics of how they operate. Nate Martin from 99Bitcoins explains that Ethereum wallets, also known as clients, hold the private key that controls the user's coins and provide a public Ethereum address for receiving Ether. It differentiates Ether from Bitcoin in purpose, highlighting that Ether is used for more complex operations on the Ethereum network, such as executing smart contracts. The paragraph also outlines the two types of Ethereum accounts: Externally Owned Accounts (EOAs) and Contract accounts, each with distinct functionalities and controls.
🛠️ Ethereum Wallets and Clients
The second paragraph delves into the different types of Ethereum clients, namely full clients and light clients. Full clients, exemplified by Geth, Mist, and Parity, maintain the entire Ethereum blockchain and are vital for executing contracts in a decentralized manner. Light clients, on the other hand, rely on third-party full nodes for information and are more suited for users with limited device space or those not intending to write smart contracts. The paragraph also touches on the concept of hardware wallets for enhanced security, which are limited to sending and receiving Ether and ERC-20 tokens but do not support smart contract interactions.
💰 Understanding Gas and Transaction Fees in Ethereum
The final paragraph explains the concept of Gas in Ethereum, which is a measure of the computational effort required to execute a contract or a transaction. It details how Gas operates as a virtual currency with its smallest unit being Wei. The paragraph outlines how transaction fees are calculated as the product of the gas used and the gas price, which can fluctuate based on network demand. It also discusses how miners are incentivized with these fees and the importance of specifying a gas limit to prevent fund depletion in case of inefficient code execution. The content emphasizes the importance of efficient smart contract programming due to the cost of Gas and concludes with an invitation for viewers to ask questions and engage with the content.
Mindmap
Keywords
💡Ethereum Wallets
💡Private Key
💡Ether
💡Smart Contracts
💡EOA (Externally Owned Account)
💡Contract Account
💡Transactions
💡Gas
💡Wei
💡Full Node
💡Light Node
💡Hardware Wallets
Highlights
Ethereum wallets are software or hardware that allows interaction with the Ethereum network.
An Ethereum wallet holds your private key, the secret password that controls your coins.
Ether is used not only as a currency but also to pay for transactions and smart contract execution.
Ethereum is a network of independent computers functioning as one supercomputer executing smart contracts.
There are two types of Ethereum accounts: Externally Owned Accounts (EOAs) and Contract accounts.
EOAs can create contracts and trigger them, while contract accounts operate based on predefined triggers in their code.
Transactions in Ethereum are used for value transfer, creating new smart contracts, and triggering existing contracts.
Smart contract wallets are a type of Ethereum wallet that allows deploying or triggering contracts.
Full nodes hold the entire Ethereum blockchain and verify transactions independently.
Geth, developed by the Ethereum Foundation, is the most popular program for running an Ethereum full node.
Mist provides a user-friendly interface for non-technical users to interact with Geth.
Parity, developed by a London-based company, is the second most popular full client for Ethereum nodes.
Light nodes rely on third-party full nodes for information and are suitable for users with limited device space.
Hardware wallets offer a secure way to store Ether but are not smart contract wallets by design.
Ether can be divided into one quintillion units, with the smallest unit called Wei.
Gas is the fuel that powers the Ethereum network, with each line of code execution consuming a certain amount of gas.
Gas prices fluctuate based on network demand, affecting the cost of executing smart contracts.
Transaction fees in Ethereum are calculated as the gas used multiplied by the gas price.
Higher gas prices lead to faster transaction inclusion in the blockchain due to miner incentives.
Transcripts
What are the best Ethereum wallets out there?
How do Ethereum wallets work
and what’s their purpose?
What is Gas and how is it calculated?
Well stick around,
in this episode of Ethereum whiteboard Tuesday
we’ll answer these questions and more.
Hi, I’m Nate Martin from 99Bitcoins
and today we’re going to talk about Ethereum wallets -
those pieces of software, or hardware,
that allow us to interact with the Ethereum network.
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.
This is almost 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?”
and if you didn’t you should,
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 to 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.
In Ethereum there are two types of accounts:
The most basic type of account in Ethereum is called
an EOA or Externally Owned Account.
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.
In addition to sending and receiving Ether,
EOAs have the ability to create contracts and trigger them.
The second type of account is the Contract account.
These 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?
Well, the code that defines the contract
includes a set of predefined 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.
It’s important to note that
contracts can’t be changed once they’ve been launched,
so the author must be very thorough
in drafting the conditions for each trigger.
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:
First, transactions are used for the transfer of value.
This is the simplest form of transaction,
meaning sending Ether between accounts.
You can also use transactions to create a new Smart contract.
Creating a new contract
is done by sending a transaction that includes the contract’s code.
And finally,
transactions can be used to trigger a contract.
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.
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.
Some Ethereum wallets will only allow you to transfer value,
or 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.
We won't discuss all of 'em,
however we will talk about the most common clients:
The first on is 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.
The second is 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.
And finally, Parity –
which is 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 releasing this video
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.
If you don’t want to run a full node
you can use a light node.
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
you can use any of the light nodes
listed on our website
for the most user friendly experience.
Let’s talk a bit about Ethereum hardware wallets
If you're serious about security
I suggest storing your Ether on a hardware wallet.
While being the most secure way to store your coins,
hardware wallets cost money.
Also, hardware wallets are not smart contract wallets by design,
they can only send and receive Ether
and ERC-20 tokens.
Now let’s move on to transaction fees and Gas;
trust me, you’ll understand in a few minutes.
While Bitcoin can be divided into 100,000,000 units
with the smallest unit called a Satoshi,
Ether can be divided into one quintillion units,
that’s a 1 with 18 zeroes after it…
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, are usually calculated in Giga Wei.
So 1 quintillion Wei equals 1 Ether
and 1 billion Wei equals one Giga Wei.
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.
The Gas you pay 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.
Keep in mind that 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 contracts 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.
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.
For example,
sending Ether from one address to the other
requires 21,000 gas units.
Now comes the tricky part.
How much do you actually pay for a unit of gas?
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 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.
When you send a transactions in Ether
you also need to specify a gas limit -
meaning how much gas are you willing to use at maximum
for running your 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 or inefficiently.
You pay the full amount for your gas limit upfront
and there’s no option for “refueling”.
This can cause certain things to go wrong, for example:
If you overpaid and your contract ended up using less gas -
you’ll get refunded for the gas not used.
However, 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.
If you don’t include enough gas units for running your code
no miner will pick up your transaction
since it doesn't have enough gas from the get go.
And finally -
If you choose enough units of gas
but pay very little for each unit
it may take a lot of time for your transaction to go through
since miners will prioritize higher paying transactions.
To conclude,
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 worked times the wage per hour.
The higher you’re willing to pay per gas unit
the more miners will compete for running your code,
and the faster your transaction will be included in the blockchain.
That’s it for today’s video.
Hopefully by now
you have a better understanding of Ethereum's wallets,
Ethereum accounts, gas, transaction fees
and also the various wallets you can choose from.
As you probably noticed
Ethereum is a lot more complicated than Bitcoin
mainly because it’s intended on
executing much more complex functions
than just sending money from A to B.
Don’t worry, it gets worse,
but we’ll walk you through it as always
in our upcoming videos.
You may still have some questions.
If so, just leave them in the comment section below.
And if you’re watching this video on YouTube,
and enjoy what you’ve seen,
don’t forget to hit the like button.
Then make sure to subscribe to the channel
and click that bell
so that you’ll be notified as soon as we post new episodes.
Thanks for joining me here at the Whiteboard.
For 99Bitcoins.com, I’m Nate Martin,
and I’ll see you… in a bit.
Browse More Related Video
![](https://i.ytimg.com/vi/pR4Q52UxiAU/hq720.jpg)
Ethereum Explained! 🚀 (Ultimate Beginners’ Guide! 📚) How Ethereum Works 💻 & Why it's Undervalued 🤑
![](https://i.ytimg.com/vi/jxLkbJozKbY/hq720.jpg)
What is Ethereum? A Beginner's Explanation in Plain English
![](https://i.ytimg.com/vi/aPprQUQljHE/hq720.jpg)
Hardware Wallets Explained, Reviewed and Compared
![](https://i.ytimg.com/vi/trzf_Lk5rdQ/hq720.jpg)
How to Keep Your Bitcoins Safe? avoiding scam, theft and fraud (2024 Updated)
![](https://i.ytimg.com/vi/rj7-sE6H-Hs/hq720.jpg)
Ethereum Layer 2 Solutions Explained: Arbitrum, Optimism And More!
![](https://i.ytimg.com/vi/0RhJBZGnOLQ/hq720.jpg)
What is Proof of Stake? - Earn Passive Income with Staking
5.0 / 5 (0 votes)