Gwei and Gas Unit Explained (2024)

In most cases, Smart Contracts are similar to paper contracts in the analog world. However, instead of ink on paper, they are written as digital text in computer-readable code. The same way a local computer program can be run by selecting it in the operating system, a smart contract can be triggered by calling a method on the contract using a blockchain transaction (TX).

To interact with these contracts, a fee—called gas—must be paid every time a smart contract is about to be executed. Gas is the computational fuel of smart contracts. Each execution of a smart contract consumes gas that must be paid by a user who requests the execution of the code. Execution of a simple smart contract requires very little gas, whereas interaction with a more complex contract requires more.

Gwei is the unit of value used to express the price of gas. Gwei is short for gigawei, or 1,000,000,000 Wei. One wei was first defined as a unit of value on the Ethereum network, equivalent to 10-18 ether (ETH). A wei is the smallest subdivided unit of an ETH, just as a satoshi is the smallest subdivided unit of a bitcoin or a cent is the smallest subdivided unit of a dollar. One gwei is 10-9 ETH, or one ETH is one billion gwei. Because RSK is an EVM (Ethereum virtual machine) compatible chain, gwei is also used as a unit on RSK. However, the base token of RSK is RBTC rather than ETH. Therefore, gwei is defined on RSK as a subdivision of RBTC rather than ETH. So on RSK, a gwei is 10-9 RBTC, equivalent to 0.1 sats.

The default price of gas on RSK 0.06 Gwei. The price of gas may vary some with the level of activity on the network.

Consider the following example in which we explain everything that happens during a contract interaction on the RSK network.

Each transaction is weighted and paid by these parameters:

  • Gas Price (gwei): The price per unit of gas consumed that you are willing to pay. In RSK, our default is 0.06 Gwei, which says that you are willing to pay 0.00000000006 of RBTC per each needed unit of gas that is required to make the transaction happen. Sending someone some RBTC will cost a small amount, such as 21 000 units, where each interaction with a smart contract adds to the cost.
  • Gas Limit: The upper limit on the number of gas units the user authorizes to pay for a transaction. The number of gas units is multiplied by the price (gwei) you are willing to pay to determine the maximum fee the user is authorizing.
  • Gas Units: The actual number of gas units used by the smart contract interaction triggered by the transaction.

The number of gas units used (Gas Used) multiplied by the price (Gas Price) you are willing to pay in the native asset determines the final cost of the transaction.

Example

Transaction example link from the RSK explorer: https://explorer.rsk.co/tx/0x35f7318d4c1def4301f0b4a3087d3f2da4c35b6d5c96a67b01a682bdec072773?__ctab=Transaction

  • Gas Price = 0.000000000065164 RBTC = 0.065164 Gwei
  • Gas Limit = 1,500,000 units (The maximum we allowed to spend for the transaction. If the number of units needed for fulfilling the transaction is higher than our limit, the transaction will fail due to a lack of gas.)
  • Gas Used = 1,103,764 units (The final amount of units spent by the function triggered by the transaction)
Gwei and Gas Unit Explained (1)
  • The final cost of the transaction in RBTC is then calculated as:
    • Gas Used * Gas Price = 1,103,764 * 0.000000000065164 (RBTC) = 0.000071925677296 RBTC
    • For bitcoin with the valuation of 57,500 USD for BTC => Transaction Fee in USD = 0.000071925677296 * 57,500 = 4.13 USD

Difference between GWEI use on RSK and Ethereum

On Ethereum, one ETH = 1018 Wei = 109 GWei, whereas on RSK one RBTC = 1018 Wei = 109 GWei.

A persistent problem with Ethereum is that the price of gas constantly fluctuates. When the Ethereum network is congested thanks to heavy use, users raise the gas price to increase the priority for their transaction and often pay an exorbitant fee to include their transaction in the next ETH block.

The gas price on RSK is much more stable, so a Gas Price is set at 0.065 GWEI.

Gwei and Gas Unit Explained (2024)
Top Articles
Understanding Fixed Income & Bonds
What Are RVUs? Understanding Relative Value Units
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6417

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.