If you've been executing transactions on Ethereum over the past two years, you’ve likely encountered high gas fees. Unless we’re considering million-dollar transactions where fees are justified, there’s a more cost-effective alternative—sending gasless ETH transactions. Fortunately, powerful tools enable gasless transactions on Ethereum and other EVM-compatible blockchains. For this guide, we’ll use Avalanche’s "Fuji" testnet, but the same principles apply to Ethereum.
👉 Discover how to build gasless dApps
What Is Gas on Ethereum?
Before diving into gasless transactions, let’s clarify the basics:
- Gas fuels Ethereum transactions and smart contracts, covering computational costs.
- Fees are paid in ETH (measured in Gwei) and are unavoidable—someone must pay them.
- Gasless means users don’t pay, shifting the cost to dApp developers/owners.
Example Project: Gasless ETH Transactions on Avalanche
We’ll build a simple storage dApp allowing users to store strings on-chain without paying gas. Here’s how it works:
Preview
- Users input data (e.g., "Hello Moralis").
- They select EIP-712 signature (no gas required).
- MetaMask confirms the transaction—paid by the dApp owner via Biconomy.
Setup Steps
Moralis Server
- Create an account here.
- Deploy a testnet server and note the Server URL and Application ID.
Biconomy Account
- Register at biconomy.io.
- Set up a meta-transaction forwarder for gasless payments.
Tools
- Use VS Code with Truffle and Node.js.
- Clone the finished code.
Code Walkthrough
- Smart Contract: Deployed via Truffle.
- Frontend: Integrates Moralis and Biconomy for gasless logic.
- Signatures: Supports EIP-712 (gasless) and personal_sign (paid).
FAQs
Why offer gasless transactions?
Gasless transactions improve user experience by eliminating fee barriers, ideal for mass adoption.
Which chains support gasless transactions?
Ethereum, Avalanche, BSC, Polygon, and other EVM-compatible networks.
Who pays the gas fees?
The dApp owner covers fees via relayers like Biconomy.
Final Notes: Gasless transactions unlock seamless Web3 interactions. Expand your skills with Moralis Academy and explore more dApp tutorials!