...

/

Transaction Cost and Information Vulnerability

Transaction Cost and Information Vulnerability

Learn to contrast the desirable properties of the blockchain with its slow speed, its high transaction cost, and the double-edged sword of transparency.

Blockchain is slow

For a transaction to be valid, it has to be initiated and cryptographically signed. Transactions that change the state of the EVM (transfer of ETH, tokens, or a contract function that changes the value of a state variable) need to be broadcasted to the whole network and only become effective once mined (i.e., added to a block by a miner) and validated by all nodes through a consensus mechanism. This makes processing transactions on the blockchain very slow compared to other forms of distributed computing.

Blockchain is expensive

A transaction object looks like JSON. Here is an example of a transaction:

Press + to interact
{
from: "0xbd0f2934129fbaa44893c9313e7865a85d22846f",
to: "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
gasLimit: "21000",
maxFeePerGas: "300",
maxPriorityFeePerGas: "10",
nonce: "0",
value: "10000000000",
data: ""
}
  • from: The address of the sender.

  • to: The address of the recipient. If this is EOA, the transaction will transfer ETH or tokens. If it's a contract account, the transaction will execute some Solidity function from its source code.

  • gasLimit: The maximum amount of gas units that the transaction is allowed to consume. Gas that is not consumed is returned to the sender.

  • maxFeePerGas: The maximum amount of gas that the sender is willing to pay for the transaction.

  • maxPriorityFeePerGas: The maximum amount of gas to be included as a tip to the miner to speed up the transaction.

  • data: An optional field that can include a message to the recipient or parameters for a contract call.

Since the London update to Ethereum, the cost of a transaction is given by the following formula:

Transaction cost = Gas units (limit) * (Base fee + Tip)

Where Gas units is the number of units required by the transaction, Base fee is the cost (in ETH) of one unit of gas, and Tip is an optional amount that the ...