0x 101: Intro to gasless API

Discover how you can simplify crypto and scale user adoption by building frictionless crypto experiences with end-to-end gasless infrastructure.

June 13, 2023

Learn & Build

Simplify DeFi with end-to-end gasless infrastructure. Expecting users to pay gas fees sets up unnecessary roadblocks in your product experience, Gasless API simplifies crypto for users by abstracting away the complexities of gas fees.

In this guide, we will take a deeper look at what Gasless API is and how you can leverage it to scale user adoption by building frictionless crypto experiences.

What is Gasless API?

A major source of friction in Web3 is the need for a user to hold and maintain balances for each chain’s native token in order to pay for transactions. Before Gasless, users had to overcome this hurdle by preloading wallets, moving balances across apps, and sending tokens between addresses to initiate transactions. This poses a significant barrier to user adoption.

Gasless API leverages the 0x relay network to offer developers and their end-users the ability to perform on-chain transactions without holding a chain’s native token. By abstracting away the complexities related to approvals, allowances, and swaps, you can build more intuitive user interfaces for your applications.

With Gasless, you can tap into deep liquidity and power gas-free crypto trading in your application with a single integration.

How does Gasless API work?

The first time a user sells a new token from their wallet, they must perform a separate one-time transaction to set an approval for it. This transaction costs gas, so the user needs to hold a small amount of the chain’s native token to pay for it. Users also need to maintain token balances to pay network fees on every subsequent transaction.

With Gasless API, users no longer need to hold the network’s native token to trade and won’t ever have to worry about gas fees when transacting on your application. Both approvals and swaps are gasless.

Using the same engine that powers Swap API, Gasless API aggregates liquidity from 50+ decentralized exchanges, including Uniswap, Curve, and Sushiwap, and professional market makers across Ethereum and Polygon to find the best available price for a trade. Gas fees are then abstracted away to the backend.

For example, if a user wants to swap USDC for another token on Ethereum, they don’t need to hold both USDC and ETH. Similarly, If a user wants to trade USDC on Polygon, they only need USDC.

How are gas fees abstracted away? Gasless transactions work by “wrapping” the gas costs into the all-in price that the user pays. Via highly-optimized metatransactions, 0x pays the actual native token costs of the transaction and recoups the gas costs by collecting a portion of the tokens involved in the actual swap on-chain. Gasless API also offers developers the ability to collect fees on-chain.

Why use Gasless API?

Expecting users to pay gas fees sets up unnecessary roadblocks in your product experience. Gasless API simplifies crypto for users by abstracting away the complexities of gas fees - enabling you to scale user adoption by building frictionless crypto experiences.

Improve onboarding and conversion: 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.

Protection for users: Protect users from MEV with our proprietary Slippage Protection feature. When Slippage Protection is enabled, users save an average of 50-80% on slippage. Request for Quote (RFQ) orders from private market makers come with zero slippage and guaranteed MEV protection.

Deep liquidity for the best execution: Unlock aggregated liquidity from 0x private market makers and 100+ exchanges for the most popular pairs on Ethereum and Polygon.

Build for crypto-native users: Gasless is composable with Swap API if you want to offer execution optionality. You can design a UX where advanced users can opt in and opt out of gasless swaps.

Best of all, it’s easy-to-use! With Gasless API, you can get real-time quotes and execute gasless swaps with just a few lines of code.

Powered by Gasless API

Matcha is a decentralized platform for searching and trading tokens, built on 0x’s infrastructure. Developed using Gasless API, Matcha Auto is a transaction mode that offers faster trade confirmation, fewer failed trades, and gasless trading, all while keeping the same great prices - providing users with a frictionless trading experience. Matcha has enabled over $56B in traded volume across 1.3M+ trades.

Robinhood Wallet, which is now available to iOS customers globally, leverages Gasless API to power gasless swaps - enabling Robinhood to build the first self-custody wallet with no network fees.

Ready to get started?

Gasless API is available now on Ethereum, Base, Optimism, Arbitrum,and Polygon.

Check out our quick guide to get started today. New to 0x? Sign-up for a free account on the 0x Dashboard.

Contents

Subscribe to newsletter

By submitting you're confirming that you agree with our Terms and Conditions.
Yay! You’re signed up.
Oops! Something went wrong, but it's not your fault.

Up next

Fundamentals: Smart Contract Wallets

Oct 15, 2024

Compliance made easy with 0x Address Screening

Sep 26, 2024

0x's next-gen pricing engine is now live

Sep 25, 2024

Introducing state-of-the-art Buy/Sell Tax support

Sep 4, 2024

Take control of your balance sheet with 0x v2

Aug 15, 2024

0x v2 bug bounty program

Jul 30, 2024

What does the "best price" in DeFi really mean?

Jul 23, 2024

Eliminate allowance risk with Permit2

Jul 17, 2024

Introducing 0x's next-gen pricing engine

Jul 15, 2024

0x Dev Digest: May 2024

May 31, 2024

Frame spotlight: Paycaster

May 21, 2024

Frame spotlight: Airstack

May 9, 2024

Power up your Farcaster Frames with 0x swaps

May 2, 2024

0x Dev Digest: April 2024

Apr 30, 2024

Introducing 0x Trade Analytics

Mar 12, 2024

Coinbase Case Study

Jan 30, 2024

Introducing gasless swaps and approvals with Gasless API

Jan 22, 2024

Bitcoin ETFs have arrived

Jan 12, 2024

Building in the open: 0x pricing update

Dec 11, 2023

Matcha leverages Gasless API to bring users the most frictionless trading experience in DeFi

Nov 30, 2023

0x Dev Digest: October 2023

Nov 2, 2023

Monetize crypto trading in your app with Swap API

Oct 26, 2023

0x Dev Digest: September 2023

Oct 3, 2023

A comprehensive analysis of RFQ performance

Sep 26, 2023

Unlock optimal trades in Swap API with 0x RFQ liquidity

Sep 20, 2023

0x Dev Digest: August 2023

Aug 31, 2023

Portal launches swaps in its white label MPC wallet powered by 0x

Aug 16, 2023

0x Swap API is now live on Base

Aug 9, 2023

Introducing paid plans for Swap API

Jul 24, 2023

Decreasing Frictions in DeFi hackathon recap

Jul 12, 2023

0x's pricing principles

Jul 3, 2023

0x Dev Digest: June 2023

Jun 30, 2023

App spotlight: tastycrypto

Jun 27, 2023

App spotlight: 31Third

Jun 22, 2023

Inspiration for building with Swap API

Jun 8, 2023

0x Dev Digest: May 2023

May 31, 2023

Fundamentals: What are gas fees?

May 25, 2023

Decreasing Frictions in DeFi Hackathon

May 12, 2023

Swap API liquidity management

May 18, 2023

0x 101: Getting started with Swap API

May 16, 2023

0x 101: Intro to Swap API

May 9, 2023

0x 101: Intro to 0x Orders

May 4, 2023

0x 101: Intro to 0x Protocol

Apr 27, 2023

A new home for 0x Protocol

Apr 24, 2023

Say hi to the new 0x

Apr 20, 2023

0x Year in Review 2022

Jan 5, 2023

0x Swap API expands to Arbitrum

Sep 22, 2022

Managed liquidity

Apr 23, 2020

0x Smart Order Routing

May 19, 2020

App spotlight: Taho

Mar 8, 2022

Fundamentals: What is a Layer 2 chain?

Apr 19, 2023

Fundamentals: What is the difference between quoted, executed, and adjusted prices?

Apr 19, 2023

Fundamentals: What is price impact?

Apr 19, 2023

Fundamentals: What is slippage?

Apr 19, 2023

Fundamentals: What is an automated market maker (AMM)?

Apr 19, 2023

Fundamentals: What is market making?

Apr 19, 2023

Fundamentals: What is a DEX aggregator?

Apr 19, 2023

Fundamentals: What is liquidity?

Apr 19, 2023

Fundamentals: What is a decentralized exchange (DEX)?

Apr 19, 2023

0x at ETHDenver 2023

Mar 21, 2023

The 0x Mission and Values

Jun 7, 2018

Announcing support for new testnets

Aug 10, 2022

0x Swap API expands to Binance Smart Chain

Mar 17, 2021

Scaling DeFi — Layer One

Sep 1, 2021

Introducing Slippage Protection

Jul 14, 2022

San Francisco Blockchain Week 2022 Recap

Nov 21, 2022

0x Swap API adds new liquidity sources

Jul 11, 2022

Review of slippage performance

Sep 14, 2022

Phuture case study

Oct 20, 2022

Measuring the impact of hidden DEX costs

Apr 14, 2022

Market making in DeFi

Aug 12, 2021

Introducing 0x Labs

Jun 22, 2020

Introducing 0x Explorer

Oct 26, 2022

Growing DeFi with professional market makers

Aug 26, 2020

0x 101: How to Access 0x Data

Apr 25, 2023

GameStop chooses 0x Swap API

Jul 8, 2022

Build on Base with 0x

Feb 23, 2023

A comprehensive analysis on DEX liquidity aggregators’ performance

Oct 1, 2020

Announcing 0x Swap API v1

Oct 1, 2020

Access all DEX liquidity through 0x Swap API

Jan 28, 2020

Announcing the 0xpo Summit 2022

Aug 24, 2022

0x Protocol, a preview of what’s to come

Mar 16, 2023

Update to our Privacy Policy

Mar 14, 2023

Price Impact Protection has arrived

Dec 14, 2022

0x Limit Orders Go Multi-Chain

Dec 23, 2021

0x Labs raises $70M Series B led by Greylock to continue expanding Web3’s core exchange infrastructure

Apr 26, 2022

0x launches Tx Relay API in beta, with Robinhood Wallet as first partner

Mar 1, 2023

0x Labs raises $15M Series A to bring decentralized exchange markets to a global audience

Feb 5, 2021

App spotlight: Zerion

Jun 22, 2022

App spotlight: Matcha

Nov 24, 2021

App spotlight: DexGuru

Jun 17, 2021

App spotlight: DEXTools

Sep 23, 2021

App spotlight: DODO

Aug 10, 2021

App spotlight: DappRadar

Dec 16, 2021

App spotlight: DeFi Saver

Jul 20, 2021

0x + Brave partner to make crypto and DeFi more accessible to everyone

Jul 7, 2021

0x Swap API now supports 0x Protocol v4

Mar 1, 2021

0x Swap API is now available on Fantom

Oct 26, 2021

0x Swap API is now live on Optimism

Jan 11, 2022

0x Swap API is now available on Polygon

May 31, 2021