Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Gas Station Network (GSN)

A decentralized relay network that allows dApp developers to pay for their users' transaction gas fees, enabling gasless interactions via meta-transactions.
Chainscore © 2026
definition
BLOCKCHAIN INFRASTRUCTURE

What is Gas Station Network (GSN)?

A decentralized system enabling gasless transactions for end-users by abstracting the complexities of gas fees.

The Gas Station Network (GSN) is a decentralized infrastructure protocol that allows users to interact with Ethereum smart contracts without needing to hold or pay for gas (transaction fees) directly. Instead, a third-party relayer pays the gas fee on the user's behalf and is later reimbursed by the dApp or its developers, a model known as meta-transactions. This removes a significant barrier to entry, making blockchain applications feel more like traditional web services where users don't need to manage cryptocurrency for fees.

The GSN architecture is built around three core components: the Relayer, which broadcasts the user's signed transaction and pays the gas; the Paymaster, a smart contract that holds funds and decides whether to sponsor a transaction based on predefined rules; and the RelayHub, the central registry and coordination layer that connects relayers and paymasters. This separation of concerns ensures the system remains trustless and decentralized, as no single entity controls the entire flow. Developers integrate the GSN by modifying their smart contracts to accept relayed calls and optionally deploying a custom Paymaster contract.

For end-users, the primary benefit is a seamless experience; they can sign a message with their private key (creating a meta-transaction) without needing ETH in their wallet for gas. This is crucial for onboarding non-crypto-native users and enabling use cases like mass airdrops, subscription models, or freemium services on-chain. For developers, the GSN can be a powerful user acquisition tool, as they can choose to absorb gas costs for their users or implement complex sponsorship logic, such as paying for gas only for specific functions or for users who hold a certain token.

While the original GSN v2 provided a foundational framework, its development and maintenance have evolved. The concept of gas abstraction has been widely adopted and integrated into other account abstraction initiatives, most notably ERC-4337. This newer standard creates smart contract wallets that natively support sponsored transactions, offering a more flexible and integrated approach than the relay-based model. Thus, the GSN represents a critical evolutionary step in making blockchain applications more accessible and user-friendly.

how-it-works
META-TRANSACTION INFRASTRUCTURE

How the Gas Station Network Works

The Gas Station Network (GSN) is a decentralized infrastructure layer that enables users to interact with Ethereum applications without holding Ether (ETH) for gas fees, a major barrier to mainstream adoption.

The Gas Station Network (GSN) is a decentralized infrastructure protocol that enables meta-transactions, allowing users to interact with supported smart contracts without needing to hold the native blockchain token (e.g., ETH) to pay for gas fees. Instead, a third party, known as a relayer or paymaster, sponsors and pays for the transaction gas on the user's behalf. This is achieved by wrapping the user's original intent in a meta-transaction, which is then submitted to the network by the relayer, who is reimbursed by the dApp developer or through other mechanisms. This abstraction of gas payment is a critical step towards improving user experience (UX) and onboarding.

At its core, the GSN operates through a set of standardized smart contracts and a peer-to-peer network of relayers. The process begins when a dApp integrates the GSN client library. A user signs a meta-transaction request off-chain, which includes the target contract, function call data, and a signature. This request is broadcast to the GSN relay network. A relayer picks up the request, verifies its validity and the user's signature against the GSN RelayHub contract, and then pays the gas to submit the actual transaction to the Ethereum network. The RelayHub acts as the central coordinator, managing relayer registration, staking, and ensuring they are compensated correctly.

For a smart contract to be compatible with the GSN, it must implement specific interfaces, most notably accepting transactions from a trusted GSN trusted forwarder contract rather than directly from msg.sender. This forwarder validates the meta-transaction signature and then calls the target contract, ensuring the original user's address (_msgSender()) is correctly used for authorization logic. Developers must also decide on a gas payment strategy, often configuring a paymaster contract that defines the rules for reimbursement. The paymaster could be funded by the dApp itself to offer a gasless experience, or it could allow payment in ERC-20 tokens, deducting fees from the user in a token they already possess.

The GSN introduces important economic and security models. Relayers typically stake ETH as a bond to prevent spam and malicious behavior. The system uses a reputation system to prioritize reliable relayers. Security for users is maintained because they only sign a specific, limited meta-transaction request; they never relinquish control of their private keys or assets. The primary adoption challenge has been the cost burden shifting to dApp developers, who must fund paymaster contracts and manage relay economics. While the original GSN v1 and v2 were pioneering, the concept has evolved, with similar functionality now being explored and implemented through other account abstraction initiatives like EIP-4337.

key-features
MECHANISMS

Key Features of GSN

The Gas Station Network (GSN) is a decentralized infrastructure that enables meta-transactions, allowing users to interact with dApps without holding the native blockchain token for gas fees. Its architecture is built around several core components that handle sponsorship, relay, and payment.

01

RelayHub & Relay Servers

The RelayHub is the central on-chain smart contract that coordinates the network. It manages the registration of Relay Servers, which are off-chain entities that:

  • Receive, sign, and broadcast user transactions.
  • Pay the gas fees upfront.
  • Submit proof of work to the RelayHub for reimbursement. This separation of concerns creates a trust-minimized relay layer.
02

Paymaster Contracts

A Paymaster is a smart contract that defines the rules for sponsoring transactions. It acts as the gas fee payer and can implement complex logic, such as:

  • Whitelisting: Only paying for specific users or dApps.
  • Token Payments: Accepting payment in ERC-20 tokens instead of ETH.
  • Subscription Models: Sponsoring gas for users with active subscriptions. The dApp developer or a third party deploys and funds the Paymaster.
03

Client-Side SDK & GSN Provider

To integrate GSN, dApps use a client-side SDK that wraps a standard Web3 provider. This GSN Provider intercepts transaction requests and:

  • Discovers available Relay Servers.
  • Packages the transaction into a GSN-specific format (a RelayRequest).
  • Handles the off-chain signature from the Relay Server. This allows existing dApp frontends to become gasless with minimal code changes.
04

Meta-Transaction Flow

The end-to-end process for a gasless transaction involves several steps:

  1. User Initiation: User signs a meta-transaction (content & recipient) without gas.
  2. Relay Selection: Client SDK picks a Relay Server and gets its signature.
  3. Relay Submission: Relay Server pays gas and submits the full transaction.
  4. On-Chain Verification: The RelayHub and target contract's acceptRelayedCall function verify the request.
  5. Reimbursement: The RelayHub reimburses the Relay Server from the Paymaster's balance.
05

Trust & Incentive Model

GSN uses cryptographic proofs and economic incentives to align participants:

  • Relays stake ETH in the RelayHub and can be penalized for malicious behavior.
  • Paymasters must maintain a deposit to cover gas costs.
  • dApps can choose trusted Relay sets. Users only trust the dApp's chosen Paymaster and Relays, not the entire network. Relays earn a small fee on top of gas reimbursement.
06

Forwarder & Recipient Contracts

Two critical smart contract interfaces enable the meta-transaction logic:

  • Forwarder: A contract that verifies the user's meta-transaction signature and nonce to prevent replay attacks.
  • IRelayRecipient: The interface that a destination dApp contract must implement. Its acceptRelayedCall function allows the contract to accept or reject the gasless request based on custom logic before execution.
ecosystem-usage
GAS STATION NETWORK

Ecosystem Usage & Adoption

The Gas Station Network (GSN) is a decentralized infrastructure that enables meta-transactions, allowing users to interact with dApps without holding the native blockchain token for gas fees. It abstracts gas costs, shifting the payment responsibility to a relayer or the dApp itself.

01

How It Works: The Relay Lifecycle

A GSN transaction follows a specific relay cycle:

  • User Signing: A user signs a transaction request, authorizing the action but not paying gas.
  • Relayer Selection: A decentralized network of relayers picks up the request.
  • Gas Payment & Forwarding: The relayer pays the gas fee in the native token (e.g., ETH) and forwards the transaction to the blockchain.
  • Reimbursement: The relayer is reimbursed from a RelayHub smart contract, which is funded in advance by dApp developers or sponsors.
02

Core Components: RelayHub & Paymasters

The GSN protocol is built on two key smart contracts:

  • RelayHub: The central registry and payment manager. It holds stakes from relayers, manages balances for paymasters, and handles the reimbursement logic.
  • Paymaster: A smart contract that defines who pays for gas. It can be funded by the dApp to sponsor user transactions (gas abstraction) or implement custom rules (e.g., only paying for specific function calls). This separates payment logic from application logic.
03

Primary Use Case: Removing Onboarding Friction

The GSN's main adoption driver is eliminating the initial gas barrier for new users. Before GSN, a user needed to:

  1. Acquire crypto (e.g., ETH) from an exchange.
  2. Pay a gas fee for their very first transaction. This is a major hurdle. With GSN, dApps can sponsor a user's first interactions, allowing them to mint an NFT, vote in a DAO, or swap tokens without first buying the native token, dramatically improving user experience and adoption.
04

Adoption by dApps & Wallets

GSN has been integrated by projects seeking frictionless onboarding:

  • Unstoppable Domains: Used GSN to allow users to claim free domains without paying ETH gas.
  • DAOs (e.g., Aragon): Enabled gas-less voting for governance participants.
  • Wallet Providers: Wallets like Argent integrated relayers to offer gas-less transactions for their users, subsidizing costs as a service feature.
05

Architectural Trade-offs & Considerations

Using GSN introduces specific design considerations:

  • Smart Contract Upgrades: dApp contracts must inherit from GSN-compatible base contracts (like RelayRecipient).
  • Relayer Trust & Decentralization: While relayers are permissionless, dApps must consider the liveness and censorship-resistance of the relay network.
  • Economic Model: dApps must carefully fund their Paymaster contracts and manage the cost of sponsoring user transactions, which can become significant at scale.
06

The Evolution to Account Abstraction

GSN is a precursor to full Account Abstraction (ERC-4337). Both aim for gas abstraction, but with different architectures:

  • GSN: A protocol-level solution using external relayers and a central RelayHub.
  • ERC-4337: A more generalized, contract-based standard using Bundlers and a UserOperation mempool. While GSN solved the problem for specific use cases, ERC-4337 aims to make gas-less transactions and sponsored gas a native, flexible feature of the Ethereum ecosystem.
technical-details
GAS ABSTRACTION

Technical Details: Paymasters & Relayers

An exploration of the core components that enable gasless transactions, shifting the burden of network fees from end-users to other parties.

The Gas Station Network (GSN) is a decentralized infrastructure protocol that enables gasless transactions by abstracting the payment of network fees away from the end-user. It achieves this through a system of off-chain relayers and on-chain paymasters, allowing dApp developers to sponsor user interactions or let users pay with alternative tokens. This removes a major UX barrier in Web3, as users no longer need to hold the native blockchain token (like ETH) to interact with smart contracts.

A relayer is an off-chain service that receives, signs, and broadcasts meta-transactions on behalf of users. The user signs a request with their private key, which includes all the transaction details except the gas fee. This signed request is sent to a relayer, which wraps it, pays the gas in the native token, and submits it to the network. Relayers compete in an open market, and their operations are secured by being staked on-chain, ensuring they cannot censor or tamper with transactions without financial penalty.

The paymaster is the on-chain smart contract that ultimately decides whether to accept and pay for a relayed transaction. It contains the logic and holds the funds for gas sponsorship. When a relayer submits a transaction, the network validates it against the rules defined in the paymaster contract—such as whitelisted users, specific dApp functions, or payment in ERC-20 tokens. This decouples the act of broadcasting a transaction from the act of paying for it, enabling complex sponsorship models and new economic designs for applications.

Implementing GSN involves integrating a client library (like @opengsn/gsn) into a dApp's frontend, which redirects transaction requests to the relay network. Developers must also deploy and fund a paymaster contract with the native chain token. Key design considerations include setting appropriate gas limits, managing whitelists, and implementing rate-limiting or reputation systems to prevent abuse. The protocol uses a trusted forwarder contract to verify the relayed request's signature and ensure only authorized paymasters can sponsor transactions for a given dApp.

Use cases for gas abstraction are extensive. They include onboarding new users who lack crypto, enabling subscription models where a service pays for its users' gas, and facilitating batch transactions in DeFi protocols. It also allows for innovative advertising-funded interactions or corporate onboarding where a company sponsors employee transactions. By removing the friction of gas fees, GSN and similar abstraction layers are critical for achieving mainstream adoption of decentralized applications.

security-considerations
GAS STATION NETWORK (GSN)

Security Considerations & Risks

The Gas Station Network (GSN) abstracts gas fees from end-users, but this convenience introduces specific security models and attack vectors that developers and relayers must understand.

01

Relayer Trust & Centralization

The GSN relies on relayers to pay transaction fees on behalf of users. This creates a trust assumption that relayers will not censor transactions or go offline. A highly centralized relayer infrastructure becomes a single point of failure and censorship. The system's security depends on the economic incentives and reliability of the relayers in the network.

02

Paymaster Solvency Risk

A Paymaster is a contract that decides whether to pay for a user's transaction. Its primary risk is insolvency: if it runs out of funds, all dependent user transactions will fail. Furthermore, a malicious or buggy paymaster logic could approve fraudulent transactions, draining its own balance and harming the applications it supports.

03

Signature Replay & Relay Hijacking

The GSN uses a meta-transaction pattern where users sign messages off-chain. Key risks include:

  • Signature Replay: A malicious relayer could reuse a signed request on a different network or in a different context.
  • Relay Hijacking: If the relayer's private key is compromised, an attacker could impersonate the relayer to steal funds from the paymaster or submit malicious transactions.
04

Gas Price Oracle Manipulation

Relayers use a gas price oracle to determine the appropriate fee to include a transaction. If this oracle is compromised or manipulated, it could lead to:

  • Overcharging: Users are charged unfairly high gas premiums.
  • Underfunding: Transactions are submitted with too low a gas price, causing them to stall or fail, creating a denial-of-service condition.
05

User Approval Logic Exploits

The acceptRelayedCall function in a recipient contract must be meticulously audited. Flaws here can allow:

  • Unlimited Gas Sponsorship: A bug may allow users to get any transaction sponsored, potentially for draining the paymaster.
  • Context Misinterpretation: Incorrect validation of msg.sender or transaction data can lead to unauthorized sponsored actions. This function is a critical security gate.
06

Economic & Sybil Attacks

The GSN's economic model is vulnerable to specific attacks:

  • Sybil Attacks: An attacker could create many fake identities to spam the network with sponsored transactions, draining paymaster funds.
  • Stake-Free Relaying: Without a staking mechanism, malicious relayers face little economic penalty for misbehavior, relying solely on reputation.
GAS ABSTRACTION ARCHITECTURES

Comparison: GSN vs. Alternative Gas Solutions

A technical comparison of mechanisms for abstracting gas fees from end-users, evaluating core architectural approaches.

Feature / MetricGas Station Network (GSN)ERC-4337 Account AbstractionMeta-Transactions (EIP-2771)Direct Sponsorship

Core Architecture

Relay Network & Paymaster

UserOperation Bundler & Paymaster

Trusted Forwarder & Gas Tank

Contract Pays for Specific Users

User Requirement

No wallet, no ETH

Smart Contract Wallet

EOA with signed approval

Pre-approved EOA address

Transaction Flow

User → Relayer → Network

User → Bundler → Network

User → Forwarder → Network

User → Network (sponsored)

Fee Payment Asset

ETH or ERC-20 (via Paymaster)

ETH or ERC-20 (via Paymaster)

ETH (from Gas Tank)

ETH (from Sponsor)

Smart Contract Wallet Required

Decentralized Relay Pool

Anti-Replay Protection

Nonce & Signature

UserOperation Hash

Nonce & Domain Separator

Contract Logic

Typical Sponsor Cost

$0.01 - $0.10 per tx

$0.01 - $0.10 per tx

$0.02 - $0.15 per tx

Variable (custom logic)

Protocol Standard

Open Relay Spec

ERC-4337 Standard

EIP-2771 Standard

Custom Implementation

GAS STATION NETWORK

Frequently Asked Questions (FAQ)

Common questions about the Gas Station Network (GSN), a decentralized infrastructure for enabling gasless transactions on Ethereum and other EVM-compatible blockchains.

The Gas Station Network (GSN) is a decentralized protocol that allows users to interact with smart contracts without paying gas fees directly, by enabling a third party (a relayer) to pay for the transaction on their behalf. It works through a system of smart contracts: a RelayHub coordinates the network, Relay Clients (or relayers) broadcast sponsored transactions, and Paymasters (or gas stations) define the rules and pay for the gas. A dApp integrates a GSN-capable smart contract that, when called, forwards the user's request to a relayer. The relayer pays the gas, submits the transaction, and is later reimbursed by the Paymaster, which may charge the dApp developer or use other funding mechanisms.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Gas Station Network (GSN): Meta-Transaction Relay | ChainScore Glossary