Gas Abstraction Layer Development | Mezo Case Study

The Problem
Here's a situation every new blockchain runs into.
Mezo had a solid stablecoin bridge. Users could bring USDT and USDC onto the network easily. But once they arrived — nothing. Every action on Mezo costs BTC in gas. Swapping, lending, providing liquidity — all of it needs BTC in your wallet first.
The only way to get BTC? Deposit it from another network. That means the user already needs to hold Bitcoin, know how to bridge it, and be willing to go through a multi-step process — all before doing the one thing they actually came to do.
So you end up with users sitting on stablecoins they can't use. That's not a minor UX inconvenience. It's a wall. New users hit it and leave.
This is the cold-start problem. And it's what Gas Station was built to solve.
Results and Impact for Mezo
The cold-start wall is gone. Users who arrive via the stablecoin bridge can start transacting immediately. No need to source BTC from somewhere else.
It unlocks the full network. Getting native tokens isn't the end goal — it's the prerequisite. Once a user has gas, they can provide liquidity, borrow, vote, interact with any protocol. Gas Station turns passive stablecoin holders into active participants.
It works for the whole ecosystem, not just one app. Any protocol on Mezo can plug into Gas Station through an adapter. No need to build their own relayer or manage gas reserves.
Nobody notices it. That's the point. Users who already have BTC never see Gas Station. Users who need it go through one signing step and move on. The best infrastructure is the kind you forget exists.

Implementation
Gas station is built around three tightly coupled layers. The API Gateway is the entry point — it handles all user-facing requests, handles the swap routing, and manages the signing flow. The Relayer Backend sits behind it, responsible for validating signed messages, sponsoring gas, and queuing transactions for execution. The Gas Station smart contract is the on-chain component that ties everything together, executing the final atomic transaction on the Mezo L2.

System Architecture
Three layers, tightly coupled, strict execution sequence.
API Gateway — entry point for all user requests. Coordinates between the frontend, protocol adapters, and the Relayer. Handles the full flow from request to execution.
Swap Router — finds the best swap route and calculates fees. Queries the Mezo API for routes and the DEX for prices in parallel. Converts input token amounts to native tokens, calculates the service fee, and outputs a multicall bundle ready for execution.
Relayer Backend — the gas sponsor. Takes signed user messages, submits them as on-chain transactions from its own account, pays gas in BTC.
Gas Station Smart Contract — the on-chain execution layer. Receives the transaction from the Relayer. Pulls MUSD via signed permit, routes through DEX, delivers native tokens minus service fee. All atomic. Full revert on any failure.
How It Works, Step by Step
Step 1 — User initiates a swap.
Say the user wants to swap MUSD for MEZO. They open the DEX, select the pair, and hit swap. The interface prepares an EIP-712 message — an off-chain authorization for Gas Station to spend their MUSD. The user signs it with their wallet. No gas, no on-chain approval, just a signature.
Step 2 — Transaction goes through.
The Relayer picks up the signed message, submits the transaction, covers gas. In one atomic operation: takes MUSD, swaps through DEX, sends result to user's wallet minus fee.
Step 3 — User has BTC for gas and can explore the rest of Mezo.
User now holds native tokens. They can pay gas for anything — liquidity, lending, governance, whatever they came here to do.
Constraints
The core technical constraint was token standard coverage. Our gasless transaction scheme relies on EIP-2612 (ERC20Permit) — a standard that allows off-chain spend authorizations, which is what makes the whole flow possible without requiring gas from the user.
This meant we couldn't simply support all tokens at launch. The set of assets available for gasless swaps was limited to those with Permit support, which is a real constraint in a multi-token ecosystem.
Rather than working around it with a brittle solution, we designed the architecture to accommodate it properly. Gas Station is token-list driven — new tokens can be plugged in as they adopt the EIP-2612 standard, without touching the core architecture. The system is built to grow with the ecosystem rather than require a rewrite every time a new token becomes eligible.
In practice, the constraint had limited impact at launch. MUSD — the most common token for new users entering via the stablecoin bridge — already supported EIP-2612, meaning the primary onboarding flow was fully covered from day one.
The Bottom Line
Gas abstraction is one of those problems that looks solved once you have a working demo. The real work starts after — making the fee model hold up over time, handling tokens that don't support the standard, keeping the relayer funded without manual intervention, and building the adapter layer so the system doesn't become a dead end the moment a second protocol wants to use it.
We've been through that process with Mezo. The constraints were real, the tradeoffs were deliberate, and the result is infrastructure that runs in production without anyone needing to think about it. That's what good infrastructure is supposed to do.
Want to see it in action? Try Gas Station on the testnet at mezo-gateway-dev.rocknblock.io. Test tokens are available at faucet.test.mezo.org. From there, mezo.org/overview is a good place to explore what else you can do on the network.






