0
0
Blockchain / Solidityprogramming~5 mins

Gas and transaction fees in Blockchain / Solidity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is 'gas' in blockchain transactions?
Gas is a unit that measures the amount of computational effort required to execute operations on a blockchain like Ethereum. It helps pay for transaction processing.
Click to reveal answer
beginner
Why do blockchain transactions require fees?
Fees pay miners or validators to process and confirm transactions. They prevent spam and ensure network security by rewarding those who maintain the blockchain.
Click to reveal answer
intermediate
What happens if you set a low gas price for a transaction?
The transaction may take longer to be processed or might not be processed at all because miners prioritize transactions with higher fees.
Click to reveal answer
intermediate
How is the total transaction fee calculated?
Total fee = Gas used × Gas price. Gas used is how much work the transaction needs, and gas price is how much you pay per unit of gas.
Click to reveal answer
intermediate
What is the difference between 'gas limit' and 'gas price'?
Gas limit is the maximum gas you allow for a transaction to use. Gas price is how much you pay per unit of gas. Together they control the max fee you pay.
Click to reveal answer
What does 'gas' measure in a blockchain transaction?
AComputational work needed
BAmount of cryptocurrency sent
CTime taken to confirm transaction
DNumber of users on the network
Why might a transaction with a low gas price take longer to confirm?
ALow gas price means more work needed
BIt uses less gas overall
CMiners prefer transactions with higher fees
DIt is automatically rejected
How do you calculate the total fee paid for a transaction?
AGas price divided by gas used
BGas limit plus gas price
CGas limit minus gas used
DGas used multiplied by gas price
What is the purpose of setting a gas limit?
ATo limit the maximum gas spent on a transaction
BTo set the price per gas unit
CTo speed up the transaction
DTo increase the transaction size
Which of these is NOT true about transaction fees?
AThey reward miners or validators
BThey guarantee instant transaction confirmation
CThey depend on gas price and gas used
DThey prevent network spam
Explain how gas and gas price work together to determine transaction fees.
Think about how much work is done and how much you pay for each unit of work.
You got /3 concepts.
    Describe why transaction fees are important for blockchain networks.
    Consider what motivates people to keep the network running and safe.
    You got /3 concepts.