level
Mid Level Reading
04 Jun, 2024

Gas Station Networks

[ Gas stay-shn net-wuhks ]

GSN is a decentralized system that allows users to interact with dApps while paying gas fees in fiat, stablecoins, and other altcoins.

Suchet Dhindsa Salvesen
Written by
Suchet Salvesen
Suchet Dhindsa Salvesen Suchet Salvesen Expert Author
Suchet is a Norwegian economist, entrepreneur, and investor, serving as the CFO and COO of Brainfund. With over a decade of experience in global expansion, venture capital, and emerging technologies, he earned his MBA from the NMBU School of Business & Economics. He held dual bachelor's degrees from the University of South-Eastern Norway. His career...
Fact checked by
Mike Grantis
Mike Grantis Expert
Mike Grantis is the co-founder of Contango Digital Assets and a recognized industry thought leader with over 7 years of experience investing private allocations. He is also the Founder of the acclaimed Bitcoin 101 course, an educational program that has enlightened over 13,000 students from 57 countries about the transformative potential of Bitcoin. Beyond his...

Understanding Ethereum Gas Station Networks

Ethereum Gas Station Networks (GSN) is a system that allows users to interact with Ethereum-based decentralized applications (dApps) without paying gas fees in ETH. 

blockquote icon

Gas fees are payments made by users to compensate for the energy required to process a transaction.

Instead, users pay the GSN with any asset, and the GSN pays validators with ETH. Users can pay for their GSN using other altcoins, stablecoins, and even fiat currency. 

The GSN was created by TabooKey and was first launched in 2019. The protocol has onboarded hundreds of dApps, companies, and platforms in the Ethereum ecosystem. 

Relayers

To achieve a “gas-less network,” the GSN introduced a layer of relayers (third-party services that facilitate data transition between blockchains) on Ethereum. These relayers are responsible for paying the gas fees for the transactions. 

When a user interacts with a decentralized Application (dApp), the transaction is sent to a relayer. The relayer then signs the transaction, sends it to the Ethereum mainnet, and pays for the gas. 

The user pays the relayer for its service in any token, and the Ethereum network processes the transaction, executing the smart contract associated with the user’s request. 

Practical Example of how Gas Station Networks work

For example, Alice wants to open a vault on MakerDAO (a service on a dApp that uses GSN) but doesn’t want to convert her DAI to ETH. 

Instead, she chooses to use the GSN to complete the transaction. MakerDAO sends her request to a relayer, which verifies whether she has the needed DAI in her balance. 

Then, the relayer pays for the transaction, and Alice pays the relayer with DAI. She covers the actual gas fee and a small premium for the relayer’s work. Now, Alice has a MakerDAO vault without having ETH in her wallet. 

How Gas Fees Work on the Ethereum Blockchain

The Evolution of Ethereum Gas Fees
The Evolution of Ethereum Gas Fees | Source: Etherscan

On Ethereum, gas fees are measured in gwei, a subunit of Ether. 

As of 2021, gas fees are split into two important components:

  • The Base Fee: a standard fee applied to all transactions. It can fluctuate depending on the blockchain’s capacity and the number of validators available. 
  • The Priority Fee: a tip users can pay to prioritize their transactions. The more the tip is, the faster a validator will process a transaction. 
blockquote icon

Formula for gas: Units of Gas Used * (Base Fee + Priority Fee)

As an illustration of how this works in practice, let’s consider Chris sending 1 ETH to Bob.

An ETH transfer requires 21,000 units of gas, and the base fee is 10 gwei. Chris includes a tip of 2 gwei as the transaction is urgent, i.e. 21,000 * (10 + 2) = 252,000 gwei (Total of 0.000252 ETH).

When Chris initiates the transaction, 1.000252 ETH will be deducted from his account. Bob will receive 1 ETH, the validator will receive the tip of 0.000042 ETH, and the base fee of 0.00021 ETH will be burned (removed from circulation).

Suchet Dhindsa Salvesen
Written by

Suchet is a Norwegian economist, entrepreneur, and investor, serving as the CFO and COO of Brainfund. With over a decade of experience in global expansion, venture capital, and emerging technologies, he earned his MBA from the NMBU School of Business & Economics. He held dual bachelor’s degrees from the University of South-Eastern Norway. His career spans roles at NextToMe, Get, and Conax before joining Everipedia, now Brainfund, in 2017.