YTread Logo
YTread Logo

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

May 04, 2020
What are the best Ethereum

wallets

out there? How do Ethereum

wallets

work and what is their purpose? What is Gas and how is it calculated? Well, stick around, in this episode of Tuesday's Ethereum Whiteboard 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. In essence, an Ethereum wallet, also known as a client, contains your private key, the “secret password” that gives you control over your coins. It also provides you with a public Ethereum address that people can use to send you the Ethereum currency known as Ether.
ethereum wallets explained simply smart contracts gas transactions
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 that they see Bitcoin. They buy Ether in the hope that its price will increase, pay for things with Ether, and more. However, Ether was not designed for the same purpose as Bitcoin. If you watched our previous video “What is Ethereum?” and if you didn't, you should know that Ethereum is a network of independent computers that work together like a supercomputer. This supercomputer executes pieces of code known as

contracts

or

smart

contracts

.
ethereum wallets explained simply smart contracts gas transactions

More Interesting Facts About,

ethereum wallets explained simply smart contracts gas transactions...

Interacting with contracts requires more complex communication than

simply

sending X amount of money from Y to Z like Bitcoin does. Ethereum wallets are the tool we use for this communication. So to really understand Ethereum wallets, we first need to understand how Ethereum is built. On Ethereum there are two types of accounts: The most basic type of account on Ethereum is called EOA or Externally Owned Account. Similar to how a Bitcoin wallet works, EOAs have an Ethereum address controlled by a private key. A person can open as many EOAs as he wants. In addition to sending and receiving Ether, EOAs have the ability to create contracts and activate them.
ethereum wallets explained simply smart contracts gas transactions
The second type of account is the Contract account. These are accounts that have a code associated with them. Each contract deployed on the Ethereum network has its own account that includes a unique Ethereum address. However, unlike an external account, a contract account does not have a private key that controls it. So how do you control a contract account? Well, the code that defines the contract includes a set of predefined triggers that control the account. In other words, the conditions to control how the contract operates are codified from the beginning. Similar to EOAs, contract accounts can receive Ether and, if activated, send Ether or even create additional contract accounts.
ethereum wallets explained simply smart contracts gas transactions
It is important to note that contracts cannot be changed once they have been released, so the author must be very thorough when drafting the conditions for each trigger. EOAs can interact with other EOAs and with contracts through messages. These messages are "wrapped" within

transactions

that are paid 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, that is, 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 code. And finally, transactions can be used to activate a contract. For example, when you send money to an ICO contract account address, you are 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 communicate with 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 also allow you to deploy or activate a contract.
These wallets are known as “smart contract wallets.” Like Bitcoin, wallets are sometimes called clients or nodes. There are two types of clients: full clients and thin clients. A full node is a computer that contains the entire history of the Ethereum blockchain, from its inception to the present day. Running a full node has disadvantages such as increased memory and computer usage; However, it allows you to verify transactions on the Ethereum blockchain without needing to trust anyone's word. 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 within these transactions. There are different programs that will help you run a full Ethereum node. We will not discuss all of them, however, we will talk about the most common clients: the first is Geth, short for Go Ethereum. Developed by the Ethereum Foundation, a non-profit organization established to develop the Ethereum code and community. Geth is the most popular and used program. The second is Mist: Since Geth is a tool built for developers, Mist was built to allow non-technical users to interact with it. So while you're technically using Geth, Mist gives you a simple UI to talk to him.
And finally, Parity, which is a private company based in London whose mission is to enable companies and organizations to capitalize on blockchain technology. They developed software to run full nodes for Ethereum and are considered the second most popular full node client. Just for reference, at the time of publishing 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 on the Ethereum network. If you don't want to run a full node, you can use a lightweight node. Light nodes, similar to Bitcoin SPV wallets, are programs that rely on third-party full nodes to obtain information when needed rather than having a complete copy of the blockchain.
This means they require less space and can work on devices with limited space, such as mobile phones. Being the second largest coin by market capitalization in the crypto market, Ether has caught the attention of everyday users. These users often use light nodes as a wallet as they are easier to install and operate. If you don't intend to write smart contracts anytime soon, you can use any of the light nodes listed on our website for the most user-friendly experience. Let's talk a little about Ethereum hardware wallets. If you are serious about security, I suggest storing your Ether in a hardware wallet.
While they are the most secure way to store your coins, hardware wallets cost money. Additionally, 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; Believe me, you will understand in a few minutes. While Bitcoin can be divided into 100,000,000 units with the smallest unit called Satoshi, Ether can be divided into a quintillion units, that is, a 1 with 18 zeros after it... and the smallest is called Wei. Wei is named after Wei Dai, a crypto activist known for supporting the widespread use of strong cryptography and privacy-oriented technologies.
Transaction fees are generally calculated in Giga Wei. So, 1 trillion Wei is equivalent to 1 Ether and one billion Wei is equivalent to 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 must add a miner fee to it. In this way, we incentivize miners to include it in a block. On Ethereum, we must also keep miners incentivized for their contribution of computing power to the Ethereum supercomputer. Just like a car, the Ethereum network runs on gasoline. Each line of code that the network must execute will consume a certain amount of gas.
It runs out of gas and the code stops executing. You specify how much gas to use in advance and you can't refuel along the way. If your contract runs out of gas because it is written inefficiently or because you miscalculated, you will

simply

stop in the middle of the road. This system motivates smart contract programmers to keep their code agile and optimized, since gas costs money, as we will soon learn. The gas you pay goes to the miners, since they are the ones who invest computing power to update the Ethereum transaction ledger, similar to what happens with Bitcoin.
Note that Gas is not something you can own, it is just a unit of account to measure how much work it takes to execute a line of code. Think of it as the equivalent of work hours. Gas is paid in Ether. Now I know what you're thinking: why not just price smart contract execution in Ether? Why do we need another virtual currency? Well, the price of Ether changes constantly, and if we were to value contracts in Ether, the price would be different each time we calculated it due to the exchange rate fluctuation. Let's imagine that we would value painting our house at 2 Ether, sometimes it would cost us $1000 and other times $2000.
With Gas, executing the same contract multiple times will always result in a fixed amount of Gas to pay, just as painting the same house takes the same number of hours each time. So how much gas do you need to run one line of code? Easy... there are predefined quantities for each action you want to execute in your code. For example, sending Ether from one address to another requires 21,000 units of gas. Now comes the complicated part. How much do you really pay for a gasoline unit? The price of 1 unit of gas changes all the time depending on how busy the network is.
In the same way that an hour of work would cost more if many people are looking for employees, the price of gas rises when the network is saturated. The “standard” price of gas is around 20 GiGa wei. You can think of it as the average market wage for one hour of work. If the Ethereum network is very busy and you want your contract to have execution priority over other contracts, you can overbid the gas price so that miners have an incentive to include your contract in the next block. You are basically saying that I am willing to increase your salary per unit of work so that you prioritize my work.
This is similar to how Bitcoin transaction fees increase when the network is crowded. When you send transactions in Ether, you also need to specify a gas limit, that is, how much gas you are willing to use at most to execute your lines of code. This is done to protect you from depleting your funds in case your code has a bug and runs endlessly or inefficiently. You pay the full amount of your gas limit up front and there is no “fill up” option. This can cause certain things to go wrong, for example: If you overpaid and your contract ended up using less gas, you will be refunded for the unused gas.
However, if an operation runs out of gas halfway, it will stop, just like your car, and you won't be refunded any Ether, just like a gas station doesn't refund you even if you didn't have enough gas to get there. where to. do you want to go. This can happen if, for example, your contract needs to perform some recurring function that keeps consuming gas and eventually runs out. If you don't include enough gas units to run your code, no miner will accept your transaction since you don't have enough gas to begin with. And finally, if you choose enough gas units but pay too little for each unit, your transaction may take a long time to complete as miners will prioritize transactions that pay more.
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 work hours worked multiplied by the hourly wage. The more you are willing to pay per unit of gas, the more miners will compete to run your code and the faster your transaction will be included in the blockchain. That's all for today's video. Hopefully by now you have a better understanding of Ethereum wallets, Ethereum accounts, gas, transaction fees, and also the various wallets you can choose from. As you've probably noticed, Ethereum is much more complicated than Bitcoin mainly because it's meant to perform much more complex functions than simply sending money from A to B.
Don't worry, it gets worse, but we'll explain how to do it as usual. in our next videos. You may still have some questions. If so, please leave them in the comments 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 be sure to subscribe to the channel and click the bell to get notified as soon as we post new episodes. Thank you for joining me here on theboard. For 99Bitcoins.com, I'm Nate Martin and I'll see you... in a moment.

If you have any copyright issue, please Contact