You've successfully subscribed to Alpaca Learn | Developer-First API for Crypto and Stocks
Great! Next, complete checkout for full access to Alpaca Learn | Developer-First API for Crypto and Stocks
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.
Search
crypto-basics

What is Gas?

Alpaca Team
Alpaca Team
Crypto basics series: What is Gas?

Gas is another term for the transaction fee for using smart contract-compatible blockchain platforms like Ethereum. The price per transaction is dynamic in nature and depends on the demand and supply of the virtual machines needed to conduct the transaction.1

Why is gas needed?

When one makes a payment through a bank, a transaction fee is normally levied. This fee is charged for the services and infrastructure needed to process the transaction. Similarly, blockchain networks require resources to execute a transaction. These transactions can be financial payments or smart contracts. Validator nodes are responsible for verifying the transactions and updating the ledgers. Some computational energy is expended in the process for which an expense is incurred. To compensate for these machines, the users have to pay in the form of gas. Take Ethereum for example, the price is fixed as a fraction of 1 Ethereum and is expressed in gwei.2 One unit of ETH is equal to 109 gwei.

Gas pricing is dependent on several factors. Higher demand for the blockchain’s resources would drive gas prices higher. The nature of the transaction will also determine the amount of gas fees that the user has to pay. Transactions involving long-term contracts have a higher gas bill compared to a one-time payment. The miners play an active role in determining the gas price in a proof-of-work blockchain.

Example

Suppose the price of a transaction is set at 50 gwei. The user making this transaction will have to pay an amount equal to 50*10-9 ETH, which is a relatively small amount in terms of the native cryptocurrency.


References

1 Gas (Ethereum) Investopedia.

2 Gas price Coinmarketcap.


Please note that this article is for informational purposes only. The example above is for illustrative purposes only. Actual crypto prices may vary depending on the market price at that particular time. Alpaca Crypto LLC does not recommend any specific cryptocurrencies.

Cryptocurrency is highly speculative in nature, involves a high degree of risks, such as volatile market price swings, market manipulation, flash crashes, and cybersecurity risks. Cryptocurrency is not regulated or is lightly regulated in most countries. Cryptocurrency trading can lead to large, immediate and permanent loss of financial value. You should have appropriate knowledge and experience before engaging in cryptocurrency trading. For additional information please click here.

Cryptocurrency services are made available by Alpaca Crypto LLC ("Alpaca Crypto"), a FinCEN registered money services business (NMLS # 2160858), and a wholly-owned subsidiary of AlpacaDB, Inc. Alpaca Crypto is not a member of SIPC or FINRA. Cryptocurrencies are not stocks and your cryptocurrency investments are not protected by either FDIC or SIPC. Please see the Disclosure Library for more information.

This is not an offer, solicitation of an offer, or advice to buy or sell cryptocurrencies, or open a cryptocurrency account in any jurisdiction where Alpaca Crypto is not registered or licensed, as applicable.

crypto-basicsCrypto

Alpaca Team

API-first stock brokerage. *Securities are offered through Alpaca Securities LLC* http://alpaca.markets/#disclosures