Gas - Reading Assignment

  1. Sum up the costs of all individual operations that are part of the transaction
  2. The maximum amount of gas you are willing to pay for the execution of a transaction
  3. A gas limit that is too low will let the transaction fail. The fees will not get returned.
  4. The gas that is not used for the transaction will be returned.
  5. The smallest unit of ETH is wei. One gwei = 1000000000 wei
1 Like
  1. How do we calculate the total gas cost for a transaction?
    It is calculated by the cumulative sum of all the operations.

  2. What is gas limit?
    It is the maximum amount of gas that you are willing to spend on the transaction.

  3. What happens if we specify a gas limit that is too low?
    It will result in a failed transaction. 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. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Unused gas will be returned to you.

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

1 Like
  1. We calculate the total gas cost for a transaction by adding up the gas cost of all the operations of the transaction
  2. Gas limit is the maximum amount of gas you are willing to spend on a transaction
  3. Providing too little gas will result in a failed transaction. The fees are kept by the miner.
  4. Unspent gas is refunded automatically
  5. Gwei is the unit of ether in which gas price is usually measured. 1 ether = 1 billion gwei
1 Like
  1. it depends on what is involved in your transaction/execution. The more complex the more expensive.
  2. the max amount of gas you are willing to spend
  3. transaction will be reverted, but all gas will be used.
  4. tx might not be processed as the blocs have a gas limit. If executed and you will be refunded the remaining gas.
  5. the smallest unit of ether
1 Like
  1. The total gas cost of a transaction is determined by adding up the gas cost of every specific instruction to be executed according to the fee schedule in the Ethereum Yellow Paper.
  2. The gas limit is the maximum amount of gas available to spend on processing the transaction and is set by the user.
  3. Your transaction will start to be executed, but will eventually run out of gas and be stopped. You lose your gas and the transaction is not executed.
  4. Extra, unspent gas is refunded as Ether automatically.
  5. Wei is the smallest unit of ether, and gwei is simply 1000000000 wei.
1 Like
  1. How do we calculate the total gas cost for a transaction?
    Transaction is calculated by amount and price of computation inside the TX.
  2. What is gas limit?
    The max. amount of gas which you are willing to pay for the TX. So TX could be cheaper and the rest will be refunded.
  3. What happens if we specify a gas limit that is too low?
    The TX will fail and abort. Since the Block was never updated the Token never left the wallet, but the fees are kept by the miner.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Unspent Gas will be refunded.
  5. What is a gwei?
    A Unit that represents the Gas price. One gwei is 1000000000 wei. The Gas price is measured and calculated usually in gwei.
1 Like

Total gas is calculated by the amount of computation needed

gas limit is the maximum gas payable, if limit specified is too low then transaction is rejected and does not leave wallet

If gas is too high transaction will likely stay in pool

gwei is 1000000000 wei which is a smaller unit price of ETH

1 Like
  1. How do we calculate the total gas cost for a transaction?

Based on functions used in smart contract

  1. What is gas limit?

Max amount of GAS you are willing to pay for TX

  1. What happens if we specify a gas limit that is too low?

fail and abort, fees are kept by miner

  1. What happens if we specify a gas limit that is too high and therefore not consumed fully?

Block is filled to mach GAS, extra GAS is returned to you.

  1. What is a gwei?

Gwei is a smallest unit of Eth.

1 Like
  1. How do we calculate the total gas cost for a transaction?
  • We accumulate the gas prices of all operations that comprise smart contracts or transactions.
  1. What is gas limit?
  • The maximum amount of gas user is are willing to spend on the transaction.
  1. What happens if we specify a gas limit that is too low?
  • The gas that was used for execution of operations is “lost” and the transaction/ smart contract does not actually finish execution so nothing happened as far as the blockchain structure is concerned.
  1. What happens if we specify a gas limit that is too high and therefore not consumed fully?
  • It will be refunded.
  1. What is a gwei?
  • 1 000 000 000 wei
1 Like
  1. How do we calculate the total gas cost for a transaction?
    The cumulative sum of all the operations is the total gas cost for the transaction.
  2. What is gas limit?
    Is the maximum amount of gas you are willing to spend on the transaction.
  3. What happens if we specify a gas limit that is too low?
    Transaction will be stopped, fees are kept by miner.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    It will be refunded.
  5. What is a gwei?
    Gwei is a fractional amount of ether (gwei = 1000000000 wei which is the smallest unit of ether)
1 Like
  1. Gas cost is calculated by adding up all the different operations gas cost.

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

  3. If too little gas limit is specified then the transaction is rejected and you fee only is lost.

  4. a too bigger gas limit may result in you transaction not processed as a miner will not want to add it to their block. This is because the blocks can only hold a certain amount gas the transaction may not be dense enough.

  5. Gwei is a fractional part of ether that represents a billion wei.

  1. Total gas cost is the cumulative sum of all the costs to execute all the operations for the transaction.
  2. Gas limit is the maximum amount of gas you are will to spend on the transaction.
  3. A gas limit that is too low will result in the transaction not getting executed completely and will also lose the ether spent on any amount of gas used.
  4. A gas limit too high and not consumed fully will create delay in the completion of your transaction, because miners only get paid for the actual gas consumed, the excessive gas discourage miners from want to execute the transaction.
  5. Gwei the unit of measure for Ethereum gas price. It equals 1,000,000,000 wei, which is 0.000000001 ether.
1 Like
  1. The cumulative sum of all the operations is the total gas cost for the transaction.
    2.The maximum amount of gas you are willing to pay to make a transaction.
  2. if you set the gas limit too low the transaction will not be completed however you will lose the amount spend in gas.
  3. if you set the fee too high unsed gas fees will be returned.
  4. 1 gwei is 1000000000 wei
2 Likes

The total gas cost is calculated by adding up all gas costs for the execution of contracts or transactions.

Gas limit is the maximum amount of gas someone is willing to spend on the execution of a contract or a transaction.

Execution will not be completed and be rejected. Ether transaction fee will be lost. Funds will not leave the wallet .

Unspent gas will be refunded automatically.

Unit of Ether: 1000000000

2 Likes
  1. How do we calculate the total gas cost for a transaction?
    Transaction Fee is calculated by the sum of all the operations, calculated in gas per function, (i.e addition, subtraction, termination etc.) for the smart contract or transaction.

  2. What is gas limit?
    A cost limit set by the seller for the contract / transaction execution. Either a simple transaction or a smart contract.

  3. What happens if we specify a gas limit that is too low?
    Transaction is not completed and is cancelled rejected by the ecosystem. Ether will be lost but the main funds of the transaction will not be be transferred to the other Wallet. Voided transaction but the fee is paid.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Refunded to the originator of the transaction. Unspent Gas will b refunded automatically.

  5. What is a gwei?
    gwei is 1-billion Wei - the smallest fraction of the ether token.

rjr
2021-05-21T04:00:00Z

2 Likes
  1. How do we calculate the total gas cost for a transaction?

The exact price of the gas is determined by supply and demand between the network’s miners, who can decline to process a transaction if the gas price does not meet their threshold, and users of the network who seek processing power.

  1. What is gas limit?

The term gas limit refers to the maximum price a cryptocurrency user is willing to pay when sending a transaction, or performing a smart contract function, in the Ethereum blockchain.

  1. What happens if we specify a gas limit that is too low?

The transaction will start but then fail and any Ether spent on used gas will not be returned although no transfer of Ether will take place because the transaction failed and was not added to a block.

  1. What happens if we specify a gas limit that is too high and therefore not consumed fully?

The surplus amount will be refunded automatically.

  1. What is a gwei?

Gwei is a denomination of the cryptocurrency ether (ETH), which is used on the Ethereum network to buy and sell goods and services. Gwei is the most commonly used unit of ether because gwei can specify Ethereum gas prices easily.

1 Like
  1. Calculation of gas fees is the sum total costs of executing each part of the transaction and smart contract.
  2. Gas limit is the maximum amount of gas that a user is willing to pay for the transaction
    3.Low gas limits will result in the transaction not being excecated. It will keep rolling unitil it runs out of gas. so you spend on gas and lose on the TX execution.
    4.Excess gas fees fills the block and can not be identified by the miner since Etherium blocks have a gas limit size. It is likely that the transaction will delay in the mempool since miners will not be keen to transact due to computational mis-alighnemt. Miners are paid for actual gas when they perform a trnsaction,

However, lately with DEfi, tx fees on Etherium has skyrocked and is out of control. Could you kindly shed some reasons for this. Etherium gas fees on DEFI is too expensive,

  1. GWEI is a fractional amount of ether used as payment for gas fees on etherium platform.
1 Like
  • How do we calculate the total gas cost for a transaction?
    By the amount of computation required to complete a tx.

  • What is gas limit?
    The maximum amount of gas allotted for the tx.

  • What happens if we specify a gas limit that is too low?
    If gas is not enough to cover the computation of the tx then the gas is used but the tx doesn’t get executed.

  • What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Unspent gas will be refunded

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

2 Likes
  1. How do we calculate the total gas cost for a transaction?

The cumulative sum of all operations in the smart contract is the total gas cost for the tx.

  1. What is gas limit?

The max amount you’re willing to spend for a tx.

  1. What happens if we specify a gas limit that is too low?

The transaction will run out of gas and fail and the miner will keep the gas used.

  1. What happens if we specify a gas limit that is too high and therefore not consumed fully?

You will be returned the unspent gas.

  1. What is a gwei?

1000000000 wei, (wei being the smallest unit of Eth).

1 Like
  1. How do we calculate the total gas cost for a transaction?
    gas price x gas limit
  2. What is gas limit?
    the maximum amount of gas that has to be paid for a transaction to be executed
  3. What happens if we specify a gas limit that is too low?
    the transaction will eventually be stopped before it is completed
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    the gas above the limit will not be used
  5. What is a gwei?
    it’s a fraction of an ETH =10^-8 ETH
1 Like