How Fixed Price Transactions Lead to Better UX
Originally published on June 10th, 2022 by Trevor Jacka on mirror.xyz
Biconomy’s Mission to Onboard the Billions “Web3 is here, but it remains half-cooked!”
The web3 user experience is wrought with challenges for even the most well-versed blockchain degen. Blockchain gas markets are one example. Blockspace is preciously limited, and its value is determined through typical market structures. These markets allow prices to fluctuate along with supply and demand, setting off a never-ending roller-coaster for those looking to execute basic transactions.
To date, web3 has accepted variable transaction costs as an inherent part of blockchain technology. But, Biconomy is in the business of examining typical web3 user experiences and understanding where frictions can be removed.
In this blog, we introduce the concept of fixed-price transaction subscriptions and a high-level overview of how we will offer them to our partners using the Biconomy relayer network and gas price-forward commitments.
The Ethereum Gas Market
Gas in Ethereum is simply a framework for valuing a scarce computational resource. The Ethereum gas framework can be a bit tricky to understand because there are two core components, as well as a third financial component that is often a source of confusion. The two core components are (1) gas units and (2) gas prices.
Gas units are a measure of the computational resources required to perform particular functions in the EVM. Gas price (measured in Gwei) is what someone must pay in order to have functions executed. It is obvious, but worth noting that gas units are dependent upon the complexity of the code needing to be executed and gas price is determined by the supply of resources available to execute that code (i.e., blockspace) and the competing demand for it. The third component, often leading to confusion, is the price of Ether (ETH). As Ether is required to execute code within the EVM, one must acquire ETH to use Ethereum.
ETH as a financial asset is volatile, where the price is determined by market factors. This price volatility is injected into the Ethereum gas framework. To recap, there are two sources of volatility in the Ethereum gas framework: (1) ETH market price volatility, and (2) Gas Price volatility.
Previously, Ethereum used a first price auction where users submitted gas price bids to have their transactions included in the next block. Gas price was entirely defined by the user and their perception of immediate blockspace supply/demand. This changed with the introduction of EIP 1559.
The infamous protocol improvement came to life at block 12,965,000 (August 2021) as part of the London network upgrade. The EIP introduced a base fee and a miner tip fee (aka, priority fee), where the base fee is set by the protocol and is a function of gas used/targeted in the parent block, and the priority fee is bid by the user — typically through their wallet provider. These changes are meant to lower gas price volatility leading to a more predictable user experience. Another important aspect of the EIP is that base fees are burned by the protocol.
Ethereum Gas Framework from a user perspective
It’s not a surprise Ethereum users have had a rough time with gas prices.
Gas prices have spiked as demand for Ethereum block space has surged.
Users are often times confronted with the need to get a transaction completed on a Thursday but speculate that if they get up early on Sunday morning they can catch a low bid.
The data indicates this user mindset isn’t actually true. Over the last 90 days, it is almost two times more expensive to execute a transaction on Sunday than it is to execute on a Saturday. In fact, over the same time period, transactions performed on a Sunday are roughly 3 percent more expensive on average than transactions performed on Thursday.
Improving the User Experience
Biconomy is a pioneer in Ethereum and EVM-compatible L1 meta transactions. Meta transactions allow Ethereum users to transact with a zero balance account by passing transactions to a third party — Biconomy — to pay transaction gas fees.
Biconomy enables this at scale by providing a non-custodial and gas-efficient relayer infrastructure network. Under the hood, Biconomy can be thought of as a gas storage provider. Biconomy helps partner dApps load large amounts of gas (in the form of ETH) into general-purpose gas tanks to be used at a future date.
This relayer infrastructure allows Biconomy to abstract away user pain points, such as having to acquire native gas tokens across chains in order to transact, or as we will discuss here, potentially eliminating exposure to volatile gas prices.
Fixed Price Transactions and Financial Markets
First, let’s define a forward commitment as a term that encompasses forwards, futures, and swaps. Think of each as a financial primitive that was created to solve business needs that typically involve cash flow or interest rate mismatches.
A simple example could be a mining company that harvests precious metals from an established mine. They have somewhat predictable precious metal yields, but the price buyers are willing to pay for those precious metals varies based on market conditions. The mining company could simply leave their future revenue susceptible to the market, or they could engage with a counterparty to sell their yields at a fixed price at some known date in the future. The forward commitment in this example is the financial contract the mining company entered into with the counterparty.
So, how can Biconomy use such a forward commitment to enable fixed-price transactions (technically, fixed price per user operation)?
Let’s see how this works for Bob.
- Bob estimates he will need 100 transactions over the next thirty days at an average gas per transaction of 21,000. Bob needs to purchase 2,100,000 gas for the thirty days.
- Current gas prices are 110 gwei — 100 gwei base fee and 10 priority fee. Biconomy expects Bob’s thirty-day gas costs to be 231,000,000 gwei (0.231 ETH).
- Biconomy writes up a contract to sell 2.1MM units of gas to Bob for consumption within a thirty-day period for a fixed price of 0.231 ETH.
- Biconomy executes the contract with Bob, receives the 0.231 ETH, and loads it into Bob’s gas tank.
- Biconomy will consume 2.1MM gas units on behalf of Bob over the next thirty days, with a variable marginal gas cost.
- Biconomy will need to purchase protection for gas price volatility over the next thirty days. This protection can be in the form of a contract with an intermediary that grants Biconomy consensus fees earned for 2.1MM gas units of block space production.
- For example, Biconomy would enter into a contract with the Intermediary at a price of roughly 0.231 ETH (paid in stablecoins), and gain access to the variable consensus fees earned for the 2.1MM gas units of block production over the thirty days.
- The intermediary executes a swap with consensus producers thereby gaining the right to consensus fees generated for 2.1MM gas units of block production over the thirty days. The consensus producer gets a fixed amount of money (~0.231 ETH paid in stablecoins).
Figure 1 below, offers a simple diagram of how Biconomy is working to abstract away gas price volatility for the user.
In the above steps, we can see there is an “intermediary” facilitating the transaction between Biconomy and the block producer. A crypto-native solution would involve a decentralized futures/swap market with deep liquidity where Biconomy could purchase index-priced contracts that settle in cash based on fluctuations in spot gas price vs contract price. This market would align more closely with the Ethereum ethos of disintermediation, which we wholeheartedly believe in at Biconomy.
However, the reality is we as an industry haven’t yet built a forward commitment primitive — or a market for this primitive to trade in. Some exciting new projects like Alkimiya (https://alkimiya.io/) and Oiler (https://t.co/GGyoSR6Xoq), and earlier attempts, such as Uma’s uGAS token (https://medium.com/uma-project/ulabs-gas-futures-token-9f51682778dd) have put forth working models for how gas price forward commitments or options might work. However, these markets have not yet garnered enough liquidity to bootstrap a healthy blockchain gas market. There is much work yet still to be done here.
While this critical piece of infrastructure is being developed, Biconomy is actively working with consensus producers on hedging strategies. If you are actively building in this space and would like to build together, please reach out to us (see contacts below).
If you have made it this far, then you are probably one of the five people on the planet working on blockchain gas markets (ok, maybe more than five). Also, if you have made it this far and are nodding your head saying “yes, this makes sense”, then you would be somewhat at odds with the mechanics of EIP 1559. The chart below shows the split between Ethereum base fees and priority fees over the last 15 days.
Priority fees are in orange and represent ~10 percent of variable fees over the last 15 days (the chart looks the same over a longer time horizon — priority fees make up roughly 10 percent of variable gas costs. Base fees paid by the user are burned by the protocol.
Biconomy’s job, as a participant in gas markets, is to offer an optimal user experience through features such as fixed-price transactions. As discussed above, one option for doing this is by accepting price risk from the user, and hedging that price risk on the back-end so that Biconomy doesn’t get rekt. As you can see in figure one above, the way to hedge gas price risk is to purchase variable block production fees from producers such that Biconomy’s variable costs are offset with commensurate variable income.
Unfortunately, 90% of user variable costs are burned and not received by producers. The mechanism introduced by EIP 1559 creates a natural shortfall in cash flow for Ethereum users looking to swap their variable costs for fixed costs. ETH block rewards passed along to the user would mitigate ETH price risk, but are no substitute for gas price volatility. Conceptually this cash flow mismatch seems like a deal breaker; however, as long as an oracle exists to prove the gas price index (both Alkimiya and Uma have built their forward product around a gas price index), and enough speculators participate in both sides of the market, a gas futures market in the EIP 1559 world is possible.
Although improved user experience was the intent of EIP 1559, the burn mechanism presents an obstacle for properly functioning gas forward markets that may allow for a more optimal user experience.
ERC 4337 and Biconomy as a Bundler Service
The limitations of EIP 1559 style gas markets cuts even deeper with account abstraction proposals like ERC 4337 on the roadmap. The ERC bakes in a natural place for Biconomy’s relayer services and provides the setup for leveraging financial engineering to provide a more optimal user experience. In the diagram below, Biconomy would provide services, such as fixed price transaction bundles and the ability to pay gas fees in ERC 20 tokens (Biconomy’s Forward product) as a “Bundler”. In the 4337 blog post, Vitalik notes a potential benefit is the ability to sponsor transactions through the use of a paymaster. These paymasters resemble Biconomy’s current Gasless infrastructure, which would make the below transaction model well-positioned for facilitating fixed-price transaction subscriptions that leverage gas price forward commitments.
We believe fixed-price transactions will provide a decidedly better user experience than variable-price transactions. Much of the financial infrastructure required for fixed-price transactions does not yet exist. Biconomy is working to bootstrap a forward gas market as a natural buyer of gas forwards. We are actively looking for partners to help develop these primitives.
Future blog posts will describe the product in greater detail, as well as provide an update on our progress towards facilitating the development of gas forward markets.
Biconomy is building critical tooling for web3. Although Ethereum was the focus of this article, Biconomy’s relayer network is live across ten different EVM-compatible chains. If you are a web3 wallet or dApp and are interested in fixed-price transaction subscriptions, get in touch with us on telegram or discord.