HomeBlockchainHow does gas work on the Libra blockchain

How does gas work on the Libra blockchain

The project developers of the Libra, Facebook’s stablecoin, have revealed how gas works on this blockchain

Gas is defined as follows:

“Gas is a way for the Move virtual machine to track and account for the abstract representation of computational resources consumed during execution”. 

Move is the language used to create and manage smart contracts on the Libra blockchain. Although it does not actually exist yet and is therefore not yet usable, there is already a test environment that allows testing operations. 

This first post about Libra’s gas reveals the macroscopic aspects of how it works, so as to understand its high-level functioning. Further posts will follow which will explore it in more detail.

Inside the Libra ecosystem, gas is a fundamental component due to the limited computing resources that are inevitably consumed by the programs written in Move, and running on the Libra blockchain. 

Gas guarantees the execution of these programs, and also offers the possibility to charge fees on transactions. 

All this is achieved thanks to specific values specified in each transaction sent by clients to the Libra blockchain, i.e. max_gas_amount and gas_price. The first value indicates the maximum amount of gas that can be used to execute that specific transaction, while the second is a way to translate from abstract units related to the consumption of resources used within the virtual machine (VM) – called gas units – into Libra tokens. 

The sender of the transaction will be charged a maximum transaction cost equal to the product between the max_gas_amount and the gas_price indicated in the transaction. 

This process is clearly inspired by Bitcoin and Ethereum, and in particular by the latter. In fact, the Ethereum blockchain also has smart contracts that require transactions to be paid for using the so-called gas.

One of the purposes of the use of gas is to discourage DDoS attacks on the network. In fact, if there were no execution costs for transactions, there would be the risk that someone would start flooding the blockchain with huge volumes of requests for free transactions, and this could jeopardize the transaction validation process itself. 

Also, since the validation process has real costs, such as electricity consumption, the gas is charged to the transaction sender (i.e. the creator) and not to the validators. 

The official post on the Libra developers’ website also includes other technical details, useful to understand how gas works at a technical level. 

Ultimately, while some people suspect that the Libra project has failed, Facebook developers are actually at work.

 

Marco Cavicchioli
Marco Cavicchioli
Born in 1975, Marco has been the first to talk about Bitcoin on YouTube in Italy. He founded ilBitcoin.news and the Facebook group" Bitcoin Italia (open and without scam) ".
RELATED ARTICLES

MOST POPULARS

GoldBrick