Gas Station abstracts gas fees from the end-user during a blockchain transaction using Programmable Wallets, vastly improving the user’s experience.
Despite its promises to democratize finance and revolutionize industries such as art, video games, and music, Web3 is still often difficult to navigate, especially for people used to the seamless UX offered by iOS and Android apps. One of the biggest culprits of Web3 UX problems is the concept of gas.
Gas has no real equivalent in Web2.0; equating it to a transaction fee is close, but doesn’t really encapsulate all the UX issues it presents. Why? Two reasons: gas costs are highly volatile, and gas must be paid in different currencies on different blockchains.
In this article, we’ll walk through Circle Gas Station: a service that allows developers to build experiences that completely abstract gas fees and gas tokens—both for their end users and themselves. It makes Web3 payments as seamless and easy as credit cards. We’ll look at the details of Circle Gas Station, how it works, and then point you to a tutorial of how to conduct a gasless transaction.
On virtually every blockchain that supports smart contracts, transactions involve running a piece of code and storing/modifying data. Even the simplest transaction of sending tokens from one wallet to another entails updating a ledger which tracks token balances.
Since anyone can create code and store data on a public blockchain such as Ethereum, it’s important to charge for this service. Doing so prevents the system from being spammed and choking from a large number of requests.
This is where gas comes in; gas is simply a unit that represents the amount of computation a particular transaction request requires. The more complex the computation, the higher the amount of gas needed.
For every deterministic transaction, the amount of gas required remains the same. However, the price of each unit of gas does not; it is dependent on how much traffic is currently being experienced by the system. The price of one unit of gas at a particular block is known as the gas price.
The gas fee is simply the product of the amount of gas required by your transaction and the current price of one unit of gas.
Gas fee = gas needed x gas price
This fee typically has to be paid in the native token of the blockchain. On Ethereum, this is ETH. On Polygon, this is Matic. On Solana, this is SOL, and so on.
Therefore, gas fees typically present two major problems that deter users:
Circle’s Gas Station solves this problem by abstracting away gas and gas fees from the end user. It does so by enabling developers to sponsor all or part of the fee on behalf of its users, not only on Ethereum, but also on side chains or L2s such as Polygon, where the gas fees are greatly reduced. This creates a gas-reduced or gas-free user experience and removes a huge amount of the friction in using web3 dApps.
To accomplish this, Circle utilizes the ERC-4337 account abstraction protocol which has been touted as the greatest change to Ethereum since the Merge.
ERC-4337 aims to increase security and usability in Ethereum by changing the way user accounts and transactions work. It has the following features:
The protocol also introduces other innovations such as multi-signatures, recovery options, and spending limits.
Circle Gas Station builds on top of this protocol, allowing developers to seamlessly create gasless experiences. It does so by leveraging the following components in the Web3 Services Console:
The Gas Station is plug-and-play ready with all smart contract (SCA) wallets. As of now, it accommodates both custody types of Programmable Wallets on the Ethereum and Polygon.
You can create your first gasless transaction by following along with this thorough interactive tutorial on user-controlled wallets. It will not only walk you through creating your first gasless transaction, but also all the steps needed to create a Web3 Services Console account, create a user, set up a user wallet, deposit funds into the wallet, and create user transactions.
Enabling gasless transactions for end users is the future of dApps and something that may soon be a part of any serious developer’s toolbox. You can get a head start now with the Web3 Services Platform—where you can unlock innovative Web3 functionality, empower your users, and create delightful Web3 user interfaces.
To get started with Programmable Wallets, check out the documentation available here.
Sign up for an account to get started.
*Programmable Wallets application programming interface (“API”) is offered by Circle Technology Services, LLC (“CTS”). CTS is not a regulated financial services company and the API does not include financial, investment, tax, legal, regulatory, accounting, business, or other advice. For additional details, please click here to see the Circle Developer terms of service.