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:
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.
Transaction example link from the RSK explorer: https://explorer.rsk.co/tx/0x35f7318d4c1def4301f0b4a3087d3f2da4c35b6d5c96a67b01a682bdec072773?__ctab=Transaction
|
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.