Introduction
Overview​
Welcome to 0x's Gasless API (formerly Tx Relay API)!
Gasless API leverages the 0x relayer network to enable developers to build gasless approvals & swaps into their dApps & workflows.
The Problem​
"Gasless swaps have helped us create a simpler trading experience, where users can focus more on trading and less on network fees. Network fees have been a top pain point for the past few years, and giving users more flexibility around network fees is a huge UX unlock”. - Claudia Haddad, Coinbase Wallet Product Manager.
A major source of friction in Web3 is the need for users to hold and maintain balances for each chain’s native token in order to pay for transactions. Before today, users had to overcome this hurdle by preloading wallets, moving balances across apps, and sending tokens between addresses to complete transactions.
This is not only a significant barrier to more widespread adoption, as well as a major source of friction for existing DeFi users when gas spikes, exploring new chains and ecosystems, or trying to make a mobile trade on the go.
The Solution​
The Gasless API allows developers to create the smoothest trading experience in DeFi by abstracting away the complexities related to approvals, allowances, and swaps for their users.
Build more intuitive user interfaces and user flows in your applications, improve your conversion funnel drop-offs due to insufficient gas, and set yourself up to easily onboard the next wave of users into Web3.
The benefits of Gasless API​
- Improve your conversion funnel: Add a gasless fall-back to your existing solution so users aren’t stuck with insufficient gas. Capture more trades when gas is spiking. Become the best places for users to explore DeFi.
- Build for crypto-native users: Composable with Swap API if you want to offer execution optionality. Devs can design a UX where advanced users can opt in and opt out of gasless without sacrificing experience.
- Grow your user base with seamless onboarding: Simplify user flows for your app and allow your users to start trading with any token that’s in their wallet. Users won’t be confronted with upfront requests for approvals and network fees, these are abstracted away into the backend.
- Deep liquidity for the best execution: Unlock aggregated liquidity from 0x private market makers and 100+ exchanges including Uniswap for the most popular pairs on Ethereum, Polygon and Arbitrum.
Want to see a production-level implementation? 👉 Try out the composed Gasless API + Swap API flow live in Matcha Auto at https://matcha.xyz/
Want to see a demo app? 👉 Check out Gasless API Demo App
Learn More​
Videos​
Gasless API Explained + Code + Next.js Demo App
Top 10 Gasless API Commonly Asked Questions