0x Labs—a prominent developer of web3 infrastructure, including the popular decentralized exchange (DEX) Matcha—today announced the launch of their newest trading API: Tx Relay.
Tx Relay facilitates “gasless” swaps, or the ability to swap between cryptocurrencies without spending any ETH on gas fees. Gas fees are the costs a user pays to execute a transaction—whether it’s a swap, a mint, or a token approval, it needs gas.
The problem is, on average, 8-10% of DEX transactions fail, and this figure spikes up to 20% during times of network congestion (when Ethereum is experiencing an abnormally high volume of transactions). The Tx Relay API abstracts away the usual process of pre-emptively setting how much gas you want to use on your transaction by covering all the gas needed for the transaction and combining it into the transaction itself.
The cost of the gas is then added to the swap, and paid by the user in the form of the token they’re swapping. The API is available today on Ethereum and Polygon, but the team plans to launch on Arbitrum shortly after in Q1 of 2024.
Coinbase Wallet Product Manager Claudia Haddad believes that network fees have been a top pain point for the last few years. The simplified trading experience gasless swaps create is a “huge UX unlock,” she told Decrypt.
Crypto users are no strangers to gas fees and the headaches that come with them. Coinbase, which is both an investor in 0x and a beta tester for the new API, claims that 69% of Ethereum swaps encounter a “not enough gas” error when the user starts the trade. Figuring out gas fees, or getting your transactions to execute at all during times of high congestion, are common pain points for the average crypto trader. They’re also common hurdles for new crypto users.
For example, gas can typically only be paid in the blockchain’s native token. For example, on Ethereum you pay in ETH. A common mistake many new crypto traders make is not leaving enough Ethereum in their wallet to cover transaction costs. With 0x’s new gasless swap, users don’t have to worry about maintaining a balance of whatever their blockchain’s gas token is, the fee is deducted from their trade in the background.
Gasless swaps made using the Tx Relay API also benefit from MEV protection. In simple terms, that means protection against bots and other advanced tools. While sophisticated traders often run their trades through private mempools or custom RPCs, most users are either unaware or just plain too lazy to implement the basic protections available. The Tx Relay API aims to abstract this too away from the user.
Gasless swaps have been pretty popular with users during their beta. Coinbase reported thousands of users using them in December alone. Matcha has also reported that using the feature reduced failed trades by 85%. When asked how the new API would deal with large spikes in network congestion, 0x co-CEO and co-founder Amir Bandeali said cases of congestion-related failed transactions were rare, but when they occur, the transactions would be automatically resubmitted and executed.
If everything works as expected, this could create a much better overall user experience for crypto traders, and make the task of conducting on-chain transactions less intimidating to new users.