Gas - Reading Assignment

  1. Gas is calculated by the cumulative sum of all the operations.
  2. Gas limit is the maxium amount of gas you are willing to spend on a transaction
    3.The transaction will not be complete and whatever ether spent will be kept by the miner
    4.The transaction will not be processed and the transaction will not be reflected on the blockchain
  3. Gwei is the denomination for the cost of Gas. It is a subunit of wei which is the smallest unit of the Ether coin 1 gwei=1e9 wei
1 Like
  1. The total gas cost (gwei) per transaction is calculated by summing the cost of each operation of a contract.

  2. Gas limit is the maximum amount of ether to initiate a transaction on an EMV.

  3. If specified gas limit is too low, the transaction will run out of fees, and will no be processed. The fees used will be awarded to the miner, but the amount of ether to be transferred will remain in the wallet.

  4. Gas limit that is too high will be returned to the wallet, as it is unconsumed or unspent.

  5. A gwei is 1 Billionth of a Wei, and a Wei is the smallest unit of an ether. Therefore, a gwei is a divisible fraction of an ether (1 Billion).

1 Like
  1. The total gas cost for a transaction is the cumulative sum of all operations required.

  2. the gas limit corresponds the maximum amount of gas you are willing to spend on a transaction.

  3. If the gas limit is too low the transaction won’t execute.

  4. The gas limit is set by the miners. We get a choice of slow, medium, or fast. Trick question?

  5. Gwei is a measurement of ethereum. It’s 1 billion wei which is the smallest unit of measurement for ethereum.

2 Likes
  1. We add up the costs of all operations (each execution & interactions with smart contract )in the txn. Simple operations cost less, complicated operations are more expensive.

  2. The gas limit is the maximum amount you were willing to spend on a txn.

  3. If you don’t pay enough in gas the txn fails and you still pay the gas fee.

  4. If you pay too much in gas only what is needed is consumed and the rest is returned to you.

  5. 1 gwei is 1,000,000,000 wei; & 1 wei is the smallest unit of Ethereum.

2 Likes
  • How do we calculate the total gas cost for a transaction?
    First, we use the fibonacci sequence combined with salt and pepper to find out the spiciness level. At this point a samurai is consulted for the final transaction cost in accordance with the laws of zen and the art of motorcycle maintenance.
  • What is gas limit?
    The gas limit depend on how much your tank can hold.
  • What happens if we specify a gas limit that is too low?
    In this case we will run out of gas too soon and we will not make it to the destination without out calling AAA for help.
  • What happens if we specify a gas limit that is too high and therefore not consumed fully?
    In that case we will have extra gas and it will flow all over the ground. That’s why we don’t smoke cigarettes at gas stations.
  • What is a gwei?
    giant wise engaging investigator

Reading Assignment: Gas

By adding up all the operations that make up a transaction with a minimum cost of 21,000.

Gas limit is the maximum amount of gas you are willing to spend on a transaction.

The transaction will start but will stop when it runs out of gas. The gas already spent will be paid to the miners but the transaction will not be written to the block chain. This essentially means you lose the gas fee but the funds you attempted to send are still in your wallet.

Unspent gas is refunded to the originating wallet.

Wei is the smallest unit of ether, and one gwei is a billion wei (1,000,000,000)

1 Like

Hello @tuchtech1, hope you are great.

Funny answers :rofl:.
Sadly, none is correct.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

  1. The total gas cost for a transaction is calculated by adding up all the gas costs for each operation.
  2. Gas limit is the maximum amount of gas you’re willing to spend on a transaction.
  3. If you specify a gas limit that is too low the transaction will run out of gas and stop, you will not be refunded the ether spent on gas but since the transaction did not complete funds will never leave your wallet.
  4. If you specify a gas limit that is too high and not fully consumed the extra will be refunded back to you, although there is a good chance your transaction will not go through because miners are paid by computational density and consumed gas and the transaction will most likely remain in the mempool.
  5. 1 gwei is 1 billion wei. A wei is one unit of Ether.
1 Like
  1. How do we calculate the total gas cost for a transaction?
    Answer: You multiply the gas limit by the gas price.

  2. What is gas limit?
    Answer: The maximum amount of gas your’re willing to spend on a transaction.

  3. What happens if we specify a gas limit that is too low?
    Answer: Transaction will start to be executed and will fail and stop. You’ll lose any fees paid to the miners, but your transaction will not process (meaning your funds will remain where they were).

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Answer: Any remaining gas fees are refunded

  5. What is a gwei?
    Answer: It’s a denomination of Ethereum, like dimes and pennies.

2 Likes
  1. How do we calculate the total gas cost for a transaction?
    We add the sum of all the operations to get the total gas cost for the transactions.
  2. What is gas limit?
    This is the maximum amount of gas yoou are willing to spend on the transaction.
  3. What happens if we specify a gas limit that is too low?
    This will result in a failed transaction, the fees are kept by the miner but the main funds remain in your wallet.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Extra unspend gas is refunded automatically.
  5. What is a gwei?
    Wei is the smallest unit of ether and gwei is 1.000.000.000 wei.
2 Likes

1.How do we calculate the total gas cost for a transaction?
->Each of the operations has an associated cost in gas. And the cumulative sum of all the operations is the total gas cost for the transaction.

2.What is gas limit?
-> the total amount of gas you are willing to pay.

3.What happens if we specify a gas limit that is too low?
-> the transaction will be processed to the point that you set the gas limit.

4.What happens if we specify a gas limit that is too high and therefore not consumed fully?
-> the gas you set which was not consumed will be comeback to your wallet.

5.What is a gwei?
->Wei is the smallest unit of ether, and gwei is 1000000000 wei.

1 Like

1 Every operation has a price, the total fee is calculated by evaluating the price of all operatiins adding them together.

2 The maximum amunt I am willing to spend on the transaction.

3 The gas is gone and the transaction is not executed.

4 The excess will be refunded.

5 10^-9 ether, Gwei = 10^9 wei so 1 eter = 10^18 wei (1 wei = 1 attoether)

2 Likes

1 in order to make a smart contract and just do the math to calculate the amount of gas to be paid

2 is the amount of gas you are willing to spend on the transaction.

3 Your transaction will start to be executed, but will eventually run out of gas and be stopped. When this happens, you will not get back ether spend on the gas used, but since the transaction did not complete, the blockchain does not reflect a transfer, so the main funds essentially never left the wallet.

4 the maximum total amount is not used, but only what is necessarily spent on the contract

5 Gwei is a denomination of the cryptocurrency ether (ETH)

1 Like
  1. The sum costs of each operation.

  2. The max cost a user is willing to pay for each transaction.

  3. The transaction will not take place.

  4. The balance of gas left will be refunded.

  5. It’s the smallest unit gas price of ethereum.

1 Like
  1. How do we calculate the total gas cost for a transaction?
    If I understood this correct, is that if you don’t pay enough gas, your transaction won’t go through. But if you put in a bit more, the transaction will go through, and if there still is gas “over”, you’ll get a refund of these. So as I figure – always put in a bit more, to be sure your transaction will work. There are also grids over what certain thins cost, so study these. Also know that the price depend on the market price.

  2. What is gas limit?
    Is the maximum amount of gas allotted to the transaction. 21000 is sufficient for simple transactions. But the “cost” of gas is much higher when it comes to smart contracts like in ICO’s.

  3. What happens if we specify a gas limit that is too low?
    It will be a failed transaction, also you’ll lose the fee you’ve paid. But your transaction won’t be useful, it will still be in your wallet, since it never left it. But it will be an extra cost for you to make another try.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    You’ll get a refund.

  5. What is a gwei?
    The gas price is usually measured in ether – usually in gwei which is 1000000000 wei. And wei is one unit or one ether.

3 Likes
  1. Total gas cost = cumulative sum of all operations executed

  2. The gas limit is the maximum amount of gas that you are willing to spend on a transaction.

  3. If the gas limit is set too low, then the transaction will fail AND you will lose the fee (gas) paid.

  4. If the gas limit is set too high, and therefore not consumed fully, the extra gas will be refunded. Note that blocks have a maximum gas limit, so setting a high gas limit will not work in your favour, as you might expect.

  5. A gwei is 10^9 wei.
    For reference, an ether is 10^18 wei.
    Wei is the smallest unit of ether.

3 Likes
  1. Total gas cost is calculated - for an eth transaction is actually the amount of gas multiplied by the price in Gwei per gas unit.
  2. Gas limit is the maximum amount of gas that willing to spend on a transaction.
  3. If gas limit is too low the transaction will start to be executed, but will eventually run out of gas and be stopped - will not get back ETH spend on the gas used and transaction did not complete.
  4. If gas limit is too high the transaction will move faster and unspent gas will be refunded.
  5. Gwei is a unit of ETH which stands for gigawei. Wei is the smallest unit or the base unit of ETH. The denominations of Ether follow a measurement system akin to the metric system.
2 Likes
  1. https://etherscan.io
  2. The gas limit is the max amount of gas you want to spend on a transaction
  3. The transaction will fail
  4. The leftover gas difference from actual gas will be refunded but still might result in failed transaction
  5. The measurement for gas used on ETH
2 Likes
  1. How do we calculate the total gas cost for a transaction?
    By totalling all the operations in the transaction, every operation has a fee associated with it.

  2. What is gas limit?
    The maximum fee to be paid for a transaction.

  3. What happens if we specify a gas limit that is too low?
    The transaction will not be processed
    .

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    The difference will be returned.

  5. What is a gwei?
    A measurement of gas, its units. It represents, 1000000000 wei.

1 Like
  1. The amount depends on the amount of computation required to complete the transaction
  2. the maximum amount of gas required for a certain transaction
  3. the transaction will not be executed, hence the ETH will not leave the original wallet (but the fee will still be used/lost)
  4. the transaction will just be executed really fast and the miners will still keep the excess gas
  5. Gwei is 10 Billion Wei. Wei is the smallest amount of Ether (like Satoshi’s in Bitcoin)
2 Likes