I understand that Ethereum have gas mechanism to avoid infinite loop and network abuse, but I was wondering whether other blockchain platforms also have gas concepts? Say Cardano, Hyperledger,...

  • Gas and transaction fees are universal concepts. For more complex fee model, check EOS which has different prices for network bandwidth, CPU and storage. – Mikko Ohtamaa May 11 at 8:51

There are two crucial aspects of using gas or transaction fees in public, permissionless networks.

  1. Every transaction published into the blockchain imposes on the network the cost of needing to download and verify it. People who run a node spend time, money and effort to do this for which they are compensated. Transaction fees are rewarded to miners (validators) for these services.

  2. To help prevent accidental or hostile infinite loops, e.g. denial of service ('DDoS') attacks. In a DDoS attack, an attacker tries to flood the network with empty transactions. Doing this for an extended period of time, with transaction fees, make these attacks to become expensive. Additionally, for smart contract platforms, it avoids computational wastage in code, by setting a limit to how many computational steps of code execution it can perform within a transaction.

Most public blockchains denominate these transaction fees in their native currency, incl. Cardano and most other blockchain- and smart contract platform.

Hyperledger Fabric is used in private, permissioned set-ups, meaning that you know the other peers in the network. There is typically already some level of trust between these parties. This makes it easy to detect a malicious peer and revoke its access. These networks typically do not have a native currency in the protocol either.

Ethereum can be run in a permissioned setting as well, making the native currency obsolete and transactions free.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.