Ethereum Wallets Explained Simply (Smart Contracts, Gas, Transactions)

99Bitcoins
2 Aug 201813:02

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

00:00

💼 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.

05:02

🛠️ 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.

10:02

💰 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

Ethereum wallets, also known as clients, are software or hardware tools that facilitate interaction with the Ethereum network. They hold the user's private key, which is a 'secret password' that controls the user's coins, and provide a public Ethereum address for receiving Ether. These wallets are crucial for managing and securing Ether and interacting with smart contracts, which is a primary function of Ethereum distinct from Bitcoin.

💡Private Key

A private key in the context of Ethereum wallets is a secret alphanumeric code that grants the holder control over their cryptocurrency assets. It is a fundamental aspect of blockchain security, ensuring that only the owner of the private key can access the associated Ether. The video emphasizes the importance of keeping private keys secure as they are not recoverable if lost.

💡Ether

Ether, the native cryptocurrency of the Ethereum network, is used not only as a digital currency for transactions but also as a means to pay for computational services within the Ethereum ecosystem. It is used to compensate miners for the work they do in validating transactions and smart contract execution, which is a key difference from Bitcoin's use case.

💡Smart Contracts

Smart contracts on the Ethereum network are self-executing contracts with the terms of the agreement directly written into code. They automatically execute when predetermined conditions are met, eliminating the need for intermediaries. The video explains that Ethereum wallets are used to interact with these contracts, highlighting the network's utility beyond simple currency transactions.

💡EOA (Externally Owned Account)

An EOA is a type of account on the Ethereum network controlled by a private key, similar to a Bitcoin wallet. It allows users to send and receive Ether and also to create and trigger smart contracts. The video uses EOAs as an example to illustrate the two types of accounts in Ethereum and their functionalities.

💡Contract Account

A contract account in Ethereum is associated with deployed smart contracts and has a unique Ethereum address. Unlike EOAs, contract accounts do not have a private key; instead, they are controlled by the predefined triggers within the contract's code. These accounts can receive and send Ether and are integral to the execution of smart contracts.

💡Transactions

In Ethereum, transactions serve a broader purpose than in Bitcoin. They are used not only for transferring value (Ether) between accounts but also for creating new smart contracts and triggering existing ones. Transactions encapsulate messages that allow accounts to communicate and interact with each other on the Ethereum network.

💡Gas

Gas is a measurement of computational effort required to execute a contract or a transaction on the Ethereum network. It is paid in Ether and is necessary to compensate miners for their work. The concept of Gas is central to the video as it explains how transactions are processed and how the cost of executing smart contracts is determined.

💡Wei

Wei is the smallest denomination of Ether and is used to measure transaction fees, known as Gas. Named after Wei Dai, a cryptography activist, it is crucial for understanding how transaction fees are calculated on the Ethereum network. The video provides a detailed explanation of Wei and its relation to Ether and Gas.

💡Full Node

A full node in the Ethereum network is a computer that maintains a copy of the entire blockchain and participates in the verification of transactions. Full nodes are essential for the decentralized nature of the network as they execute smart contracts and validate transactions. The video mentions Geth and Parity as popular full node clients.

💡Light Node

Light nodes are a type of Ethereum client that do not store the entire blockchain. Instead, they rely on full nodes to provide necessary blockchain data when required. This makes light nodes suitable for devices with limited storage capacity, such as smartphones, and are preferred by users who do not intend to write smart contracts.

💡Hardware Wallets

Hardware wallets are physical devices used to store private keys securely, providing a high level of security for cryptocurrency holdings. Although they are not designed to interact with smart contracts, they are recommended in the video for users serious about security, as they can send and receive Ether and ERC-20 tokens.

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

play00:00

What are the best Ethereum wallets out there?

play00:02

How do Ethereum wallets work

play00:04

and what’s their purpose?

play00:06

What is Gas and how is it calculated?

play00:09

Well stick around,

play00:10

in this episode of Ethereum whiteboard Tuesday

play00:12

we’ll answer these questions and more.

play00:21

Hi, I’m Nate Martin from 99Bitcoins

play00:23

and today we’re going to talk about Ethereum wallets -

play00:26

those pieces of software, or hardware,

play00:28

that allow us to interact with the Ethereum network.

play00:32

At its core,

play00:33

an Ethereum wallet, also known as a client,

play00:35

holds your private key -

play00:37

the “secret password” that gives you control

play00:39

over your coins.

play00:40

It also supplies you with a public Ethereum address

play00:43

which people can use to send you Ethereum’s currency

play00:45

known as Ether.

play00:47

This is almost as far as Bitcoin and Ethereum go

play00:50

in terms of similarities.

play00:52

Many non technical users think of Ether as a currency

play00:56

in the same sense they view Bitcoin.

play00:58

They buy Ether in hopes its price will rise,

play01:00

they pay for stuff with Ether and more.

play01:03

However,

play01:03

Ether wasn’t designed for the same purpose as Bitcoin.

play01:07

If you’ve watched our previous video

play01:08

“What is Ethereum?”

play01:09

and if you didn’t you should,

play01:11

you know that Ethereum is a network of independent computers

play01:14

working together as one supercomputer.

play01:17

This super computer executes pieces of code

play01:19

known as contracts or smart contracts.

play01:22

Interacting with contracts requires more complex communication

play01:26

than to just send X amount of money

play01:28

from Y to Z like Bitcoin does.

play01:30

Ethereum wallets are the tool we use

play01:32

for this communication .

play01:33

So in order to truly understand Ethereum wallets

play01:36

we need to first understand how Ethereum is built.

play01:40

In Ethereum there are two types of accounts:

play01:42

The most basic type of account in Ethereum is called

play01:45

an EOA or Externally Owned Account.

play01:49

Similar to how a Bitcoin wallet operates,

play01:51

EOAs have an Ethereum address that is controlled by a private key.

play01:55

A person can open as many EOAs as he likes.

play01:58

In addition to sending and receiving Ether,

play02:00

EOAs have the ability to create contracts and trigger them.

play02:05

The second type of account is the Contract account.

play02:08

These are accounts that have code associated with them.

play02:12

Every contract deployed to the Ethereum network

play02:14

has its own account which includes a unique Ethereum address.

play02:18

However, unlike an external account

play02:20

a contract account doesn’t have a private key that controls it.

play02:24

So how is a contract account controlled?

play02:27

Well, the code that defines the contract

play02:29

includes a set of predefined triggers

play02:32

which control the account.

play02:33

In other words,

play02:34

the conditions to control how the contract operates

play02:37

are hard coded from the get-go.

play02:39

Similar to EOAs,

play02:41

contract accounts can receive Ether,

play02:43

and if triggered,

play02:44

send Ether or even create additional contract accounts.

play02:48

It’s important to note that

play02:49

contracts can’t be changed once they’ve been launched,

play02:52

so the author must be very thorough

play02:55

in drafting the conditions for each trigger.

play02:58

EOAs can interact with other EOAs

play03:01

and with contracts through messages.

play03:03

These messages are “wrapped” inside transactions

play03:07

which are paid for in Ether.

play03:08

So while in Bitcoin

play03:10

transactions are used only to transfer value,

play03:13

Ethereum transactions are used for a variety of reasons:

play03:16

First, transactions are used for the transfer of value.

play03:19

This is the simplest form of transaction,

play03:21

meaning sending Ether between accounts.

play03:24

You can also use transactions to create a new Smart contract.

play03:28

Creating a new contract

play03:30

is done by sending a transaction that includes the contract’s code.

play03:34

And finally,

play03:35

transactions can be used to trigger a contract.

play03:38

For example -

play03:38

when you send money to an ICO’s contract account address,

play03:42

you’re actually activating a contract

play03:44

that sends you tokens in return.

play03:46

Now that you understand how Ethereum is built

play03:49

and that transactions are in fact used to help accounts

play03:52

talk to each other

play03:53

we can move on to Ethereum wallets.

play03:55

Some Ethereum wallets will only allow you to transfer value,

play03:58

or send Ether between accounts.

play04:01

Other wallets will allow you to also deploy or trigger a contract.

play04:05

These wallets are known as “Smart contract wallets”.

play04:08

Similar to Bitcoin,

play04:10

wallets are sometimes referred to as clients or nodes.

play04:13

There are two types of clients -

play04:15

full clients and light clients

play04:18

A full node is a computer that holds

play04:21

the entire Ethereum blockchain history,

play04:23

since its inception until this day.

play04:26

Running a full node has disadvantages like

play04:28

increased memory and computer usage,

play04:30

however it allows you to

play04:32

verify transactions on the Ethereum blockchain

play04:35

without needing to trust anyone’s word for it.

play04:38

Full nodes are an integral part of the Ethereum network

play04:41

as they are the “muscles” of the network,

play04:43

that help execute contracts in a decentralized manner.

play04:47

Each node that receives a new block of transactions

play04:49

also executes the code inside these transactions.

play04:53

There are different programs

play04:54

to help you run an Ethereum full node.

play04:57

We won't discuss all of 'em,

play04:58

however we will talk about the most common clients:

play05:01

The first on is Geth -

play05:03

Short for Go Ethereum.

play05:05

Developed by the Ethereum Foundation,

play05:07

a non-profit organization established to develop

play05:10

the code and community for Ethereum.

play05:12

Geth is the most popular and widely used program.

play05:15

The second is Mist -

play05:17

Since Geth is a tool made for developers

play05:20

Mist was created in order to allow

play05:22

non technical users to interact with it.

play05:24

So while technically you’re using Geth,

play05:27

Mist provides you with an easy user interface to talk to it.

play05:30

And finally, Parity –

play05:32

which is a private company based in London

play05:34

whose mission is to enable businesses and organizations

play05:37

to capitalize on blockchain technology.

play05:40

They developed software to run full nodes for Ethereum

play05:43

and are considered the second most popular full client.

play05:47

Just for reference,

play05:48

at the time of releasing this video

play05:49

there are 9713 nodes running Geth

play05:52

and 4069 nodes running Parity.

play05:55

All full nodes are smart contract wallets -

play05:58

meaning they can deploy smart contracts

play06:00

to the Ethereum network.

play06:02

If you don’t want to run a full node

play06:04

you can use a light node.

play06:06

Light nodes, similar to Bitcoin’s SPV wallets,

play06:09

are programs that rely on 3rd party full nodes

play06:11

in order to get information when needed

play06:13

rather than holding a full copy of the blockchain.

play06:16

This means they require less space

play06:18

and can operate on devices with limited space,

play06:21

such as mobile phones.

play06:24

Being the second largest currency

play06:25

by market cap on the crypto market,

play06:27

Ether has caught the eye of day to day users.

play06:30

These users will usually use light nodes as their wallet

play06:33

since it’s easier to install and operate.

play06:35

If you don’t intend to write smart contracts any time soon

play06:38

you can use any of the light nodes

play06:40

listed on our website

play06:41

for the most user friendly experience.

play06:44

Let’s talk a bit about Ethereum hardware wallets

play06:48

If you're serious about security

play06:49

I suggest storing your Ether on a hardware wallet.

play06:52

While being the most secure way to store your coins,

play06:55

hardware wallets cost money.

play06:57

Also, hardware wallets are not smart contract wallets by design,

play07:01

they can only send and receive Ether

play07:03

and ERC-20 tokens.

play07:05

Now let’s move on to transaction fees and Gas;

play07:08

trust me, you’ll understand in a few minutes.

play07:11

While Bitcoin can be divided into 100,000,000 units

play07:14

with the smallest unit called a Satoshi,

play07:17

Ether can be divided into one quintillion units,

play07:20

that’s a 1 with 18 zeroes after it…

play07:23

with the smallest one called Wei.

play07:26

Wei is named after Wei Dai,

play07:28

a cryptography activist

play07:30

who is known for supporting widespread use of strong cryptography

play07:33

and privacy-oriented technologies.

play07:36

Fees for transactions, are usually calculated in Giga Wei.

play07:39

So 1 quintillion Wei equals 1 Ether

play07:43

and 1 billion Wei equals one Giga Wei.

play07:46

There are also other names for different amounts of Wei,

play07:49

all named after famous cryptographers,

play07:51

as shown in this table.

play07:53

In Bitcoin,

play07:54

to send a transaction we need to add a miner's fee to it.

play07:57

This way, we incentivize the miners to include it in a block.

play08:00

In Ethereum,

play08:01

we must keep miners incentivized as well,

play08:03

for their contribution of computing power to the Ethereum supercomputer.

play08:07

Just like a car,

play08:08

the Ethereum network runs on Gas.

play08:11

Each line of code that needs to be executed by the network

play08:14

will take up a certain amount of gas.

play08:15

Run out of Gas and the code stops running.

play08:18

You specify how much Gas you’re going to use upfront,

play08:22

and you can’t refuel on the way.

play08:24

If your contract runs out of Gas because it’s written inefficiently

play08:27

or you miscalculated,

play08:28

it will just stop in the middle of the road.

play08:31

This system motivates Smart contract programmers

play08:34

to keep their code lean and optimized,

play08:36

since Gas costs money as we will soon learn.

play08:39

The Gas you pay goes to the miners,

play08:41

as they are the ones investing computing power

play08:44

in order to update the ledger of Ethereum transactions,

play08:47

similar to what goes on in Bitcoin.

play08:49

Keep in mind that Gas isn’t something you can own,

play08:52

it’s just a unit of account

play08:53

to measure how much work is needed to run a line of code.

play08:56

Think of it as the equivalent of hours of labour.

play08:59

Gas is paid in Ether,

play09:01

Now I know what you’re thinking -

play09:03

why not just price execution of smart contracts in Ether,

play09:06

why do we need another virtual currency?

play09:08

Well, Ether’s price is constantly changing,

play09:11

and if we priced contracts in Ether

play09:13

the price would be different each time we calculated it

play09:15

due to the fluctuating exchange rate.

play09:18

Imagine we’d price painting our house at 2 Ether,

play09:21

sometimes it would cost us $1000 and other times $2000.

play09:25

With Gas,

play09:26

running the same contract several times

play09:28

will always bring back a fixed amount of Gas to be paid

play09:31

just like painting the same house

play09:33

takes the same amount of hours every time.

play09:36

So how much gas do you need to run a line of code?

play09:39

Easy... there are predefined amounts

play09:41

for each action you want to run in your code.

play09:44

For example,

play09:44

sending Ether from one address to the other

play09:46

requires 21,000 gas units.

play09:49

Now comes the tricky part.

play09:51

How much do you actually pay for a unit of gas?

play09:54

The price of 1 gas unit changes all the time

play09:57

depending on how crowded the network is.

play10:00

The same way an hour of labor would cost more

play10:02

if many people are looking for employees

play10:04

the Gas price rises when the network is crowded.

play10:07

The “standard” gas price is around 20 GiGa wei.

play10:11

You can consider this the average salary on the market

play10:14

for an hour of labor.

play10:15

If the Ethereum network is very busy

play10:18

and you want your contract to get priority in execution

play10:21

over other contracts

play10:22

you may over bid the gas price

play10:24

so that miners will have an incentive to include your contract

play10:27

in the next block.

play10:29

You’re basically saying

play10:30

I’m willing to increase your pay per unit of labor

play10:33

so you’ll give my work priority.

play10:35

This is similar to how Bitcoin transaction fees rise

play10:38

when the network is crowded.

play10:40

When you send a transactions in Ether

play10:42

you also need to specify a gas limit -

play10:45

meaning how much gas are you willing to use at maximum

play10:47

for running your lines of code.

play10:49

This is done in order to protect you from depleting your funds

play10:52

in case your code has an error and runs endlessly or inefficiently.

play10:57

You pay the full amount for your gas limit upfront

play10:59

and there’s no option for “refueling”.

play11:02

This can cause certain things to go wrong, for example:

play11:05

If you overpaid and your contract ended up using less gas -

play11:08

you’ll get refunded for the gas not used.

play11:10

However, if an operation ran out of gas mid way

play11:14

it will halt, just like your car,

play11:16

and no Ether will be returned to you

play11:18

just like a gas station doesn’t refund you

play11:20

even if you didn’t have enough gas to get where you want to go.

play11:23

This can happen if, for example,

play11:25

your contract needs to do some recurring function

play11:28

that keeps on consuming gas and finally runs out.

play11:31

If you don’t include enough gas units for running your code

play11:34

no miner will pick up your transaction

play11:36

since it doesn't have enough gas from the get go.

play11:38

And finally -

play11:39

If you choose enough units of gas

play11:41

but pay very little for each unit

play11:43

it may take a lot of time for your transaction to go through

play11:46

since miners will prioritize higher paying transactions.

play11:50

To conclude,

play11:50

in Ethereum fees are a general term that refers to

play11:53

the gas used multiplied by the gas price

play11:56

you were willing to pay.

play11:57

In other words -

play11:58

the hours of labor worked times the wage per hour.

play12:01

The higher you’re willing to pay per gas unit

play12:03

the more miners will compete for running your code,

play12:06

and the faster your transaction will be included in the blockchain.

play12:10

That’s it for today’s video.

play12:11

Hopefully by now

play12:12

you have a better understanding of Ethereum's wallets,

play12:15

Ethereum accounts, gas, transaction fees

play12:18

and also the various wallets you can choose from.

play12:20

As you probably noticed

play12:22

Ethereum is a lot more complicated than Bitcoin

play12:24

mainly because it’s intended on

play12:26

executing much more complex functions

play12:28

than just sending money from A to B.

play12:30

Don’t worry, it gets worse,

play12:32

but we’ll walk you through it as always

play12:34

in our upcoming videos.

play12:35

You may still have some questions.

play12:37

If so, just leave them in the comment section below.

play12:39

And if you’re watching this video on YouTube,

play12:41

and enjoy what you’ve seen,

play12:42

don’t forget to hit the like button.

play12:44

Then make sure to subscribe to the channel

play12:46

and click that bell

play12:47

so that you’ll be notified as soon as we post new episodes.

play12:50

Thanks for joining me here at the Whiteboard.

play12:51

For 99Bitcoins.com, I’m Nate Martin,

play12:54

and I’ll see you… in a bit.

Rate This

5.0 / 5 (0 votes)

Related Tags
Ethereum WalletsSmart ContractsTransaction FeesGas CalculationCryptocurrencyBlockchain TechEther CurrencyDecentralized NetworkSoftware ClientsHardware Security99Bitcoins