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
What are the three financial statements?
Unlocking the future of banking: the transformative power of generative AI
Pixel Speedrun Unblocked 76
Unblocked Games Premium Worlds Hardest Game
South Park Season 26 Kisscartoon
Mr Tire Prince Frederick Md 20678
Recent Obituaries Patriot Ledger
craigslist: south coast jobs, apartments, for sale, services, community, and events
Fcs Teamehub
The Haunted Drury Hotels of San Antonio’s Riverwalk
Assets | HIVO Support
Pro Groom Prices – The Pet Centre
Oc Craiglsit
9044906381
Missed Connections Dayton Ohio
Www Craigslist Milwaukee Wi
Lowes Undermount Kitchen Sinks
Teen Vogue Video Series
Betaalbaar naar The Big Apple: 9 x tips voor New York City
Mythical Escapee Of Crete
Skycurve Replacement Mat
Cylinder Head Bolt Torque Values
Tactical Masters Price Guide
Black Lion Backpack And Glider Voucher
Datingscout Wantmatures
Craigslist Texas Killeen
Kaiserhrconnect
Kltv Com Big Red Box
2024 Coachella Predictions
In Branch Chase Atm Near Me
The Pretty Kitty Tanglewood
Wednesday Morning Gifs
Whitehall Preparatory And Fitness Academy Calendar
Ishow Speed Dick Leak
Ksu Sturgis Library
Jason Brewer Leaving Fox 25
Keir Starmer looks to Italy on how to stop migrant boats
Shane Gillis’s Fall and Rise
Below Five Store Near Me
Nami Op.gg
Payrollservers.us Webclock
Powerspec G512
Xre 00251
Meet Robert Oppenheimer, the destroyer of worlds
Tito Jackson, member of beloved pop group the Jackson 5, dies at 70
Craigslist Pets Charleston Wv
Evil Dead Rise - Everything You Need To Know
2487872771
Festival Gas Rewards Log In
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.