Cover photo

Impact of Gas Subsidies on Uniswap

Help me decipher how effective a gas subsidy campaign is by analyzing on chain data.

Introduction and Context

Uniswap is one of the most important decentralized cryptocurrency exchanges, with most of its activity coming from Layer 2 networks. This article is part of a Research Challenge to explore the impact of gas subsidies on Layer 2 chains. Since this is a rather hypothetical idea, not yet tested with any campaign or direct/indirect subsidy, I'll take the liberty of using a carefully selected sample of transactions to Uniswap on various chains to explore the potential effects on protocol activity.

The selected sample includes transactions subsidized by Rabby, a wallet that offers the possibility to 'subsidize' transactions when users run out of gas. The blockchains (chains or Layer 2 chains) explored are Arbitrum, Binance Smart Chain (BSC), Optimism, Polygon, and Avalanche. I'll use the term "Layer 2" to refer to them, although this isn't strictly correct as some don't depend on Ethereum to function. However, they are EVM-compatible and were created after Ethereum to offer cheaper and faster transactions.

Uniswap Volume on Layer 2 Chains

To better understand the protocol, let's look at how volume has behaved on these chains.

Daily Volume on Uniswap Layer 2 Ecosystem’s

Key observations:

  • The average daily volume across these chains is approximately 500M USD.

  • Weekend days typically show lower trading volumes.

Average Daily Volume for Uniswap on Layer 2 chains

Looking at the daily average volume from March to July 2024, we observe how Arbitrum outpaces all other chains by a factor of two, with an average daily volume of 300M USD, followed by Base, Polygon, and Optimism.

Daily Number of Users using Uniswap on Layer 2 chains

Exploring user dynamics, we can see that most users come from Base, with around 70,000 users making exchanges on Uniswap, followed by Polygon.

  • Base and Polygon lead in user numbers.

  • Arbitrum shows an interesting pattern: highest volume but fewer users compared to Base and Polygon.

  • BSC appears to be losing its share of Uniswap users over time.

On March 13, the Dencun hard fork was activated, enabling one of Ethereum's most anticipated features: proto-danksharding (also known as EIP-4844, or blobs). This feature allowed for cheaper transactions on Layer 2 chains.

Weekly and cumulative gas spent using Uniswap on Arbitrum

In Arbitrum's case, we see how at least 60 ETH (around 160k USD today) was spent weekly on Uniswap transactions, and now it's closer to 10 ETH spent on fees.

Before Dencun, the growth in transaction spending seemed more exponential, but now it's much more linear as much less is spent on transaction fees. As BSC, Avalanche, and Polygon don't use this technology and transactions are made in their native currency, I don't expect to see major changes in cost on those networks.

Cumulative transactions fees spent on Uniswap on Arbitrum, Base and Optimism

We also see how the transaction costs decrease has occurred in Optimism, from an average of 100 ETH spent on transaction fees weekly, it has dropped to around 20 ETH. Base's case is more paradigmatic because after March 13, in the week of March 25, 1750 ETH was spent on transactions to use Uniswap.

Transaction fees spent on Uniswap overtime since the beginning of the year 2024

Overview of the Gas Subsidy Campaign

As mentioned at the beginning, we want to understand how gas subsidies could optimize user engagement and improve liquidity provision, particularly on Layer 2 under various economic conditions and in different liquidity pools. For this, we'll use data from Rabby's gas campaign, where some of the transactions ended up being transactions to the Uniswap protocol to perform a token exchange.

Daily volume generated by subsidized transactions on Uniswap

The data begins on April 29, with the start of Rabby's campaign, so we can forget about the effects that blobs had on transaction fees.

Daily users subsidized by Rabby that used Uniswap

The particularity of the subsidy that Rabby provides is that it's given when a user, using this wallet, doesn't have enough native currency to pay for transaction fees. Once the user decides to receive the subsidy, Rabby sends the native currency from an account to the user and allows them to pay for the transaction for which they didn't have sufficient funds.

Marketshare of Subsidies Users by Chain

As these subsidies are delivered through the Rabby interface, it's expected that they're not bots. There may be users with more than one account, but the data is expected to correspond more to a 'retail' user than a 'professional' one, as we'll see, the average exchange volume is less than 200 dollars.

Uniswap L2 Volume generated by subsidized transactions per chain

Most of the volume generated by these subsidized transactions has occurred on Arbitrum, followed by Base and Optimism.

It's important to consider that the daily volume is almost always less than 50k dollars, a very low number considering that Avalanche, the chain that generates the least volume for Uniswap, generates around 1 million dollars in volume.

Number of users subsidized by Chain

Most of the subsidized users are found on Arbitrum and BSC, with almost 5000 subsidized users.

Cost to subsidize a Uniswap user by chain

The cost of subsidizing a user varies by chain, with four chains costing less than 10 cents and BSC and Avalanche having the highest cost, around 38 cents to subsidize users on these chains.

Total USD spent subsidizing transactions on Uniswap per chain

CHAIN

TOTAL SWAP VOLUME

MEAN SWAP VOLUME

Arbitrum

$1,104,621.32

$171.36

Binance Smart Chain

$289,585.2

$36.74

Optimism

$532,681.49

$156.34

Base

$852,595.28

$268.44

Polygon

$194,279.51

$115.84

Avalanche

$96,990.47

$76.43

From the table, we can conclude that Binance Smart Chain is the most expensive network to subsidize. Despite ranking fourth in terms of generated volume, it has the lowest average swap volume at just $36.

With a fraction of what was spent on BSC, Arbitrum generated a volume of $1M during the gas subsidy campaign.

As we can see, most of the pools used contain a stablecoin such as USDC, USDT, or DAI, with the other counterpart in the pool usually being WETH, WBTC, or the wrapped coin of each chain, such as WBNB or WAVAX.

Conclusions

Chains using blobs like Arbitrum, Base, and Optimism have become cheaper to subsidize, though not as cheap as Polygon, as it costs less than 10 cents to subsidize a swap on these networks. In contrast, BSC and Avalanche are the most expensive, with a cost close to 40 cents per transaction.

The total cost of Rabby's campaign to subsidize transactions on Uniswap was $3,172, benefiting 16,510 users (or addresses) and generating a volume of around $3M during the month and a half of subsidies.

If there were a fixed budget for subsidies, determining how much money to allocate to each chain would be a linear programming exercise, aiming to maximize the volume generated for each chain considering the cost per user. It's just a matter of formulating the right equations.

This sample is limited, and it remains to be seen whether these users use Uniswap more than non-subsidized users, analyze the retention of these users in the following weeks, and compare these results with other DEXs. More data is needed.

Although there hasn't been a direct comparison with non-subsidized users, it's useful to observe how the activity of a retail user, who is using a wallet and not a bot, behaves.


Methodology

Data Collection and Processing

All data for this analysis was collected using FlipsideCrypto's databases. The following tables were utilized:

  1. Native transfers:

    • optimism.core.ez_native_transfers

    • arbitrum.core.ez_native_transfers

    • polygon.core.ez_native_transfers

    • bsc.core.ez_native_transfers

    • avalanche.core.ez_native_transfers

    • base.core.ez_native_transfers

  2. Transaction data:

    • optimism.core.fact_transactions

    • arbitrum.core.fact_transactions

    • polygon.core.fact_transactions

    • bsc.core.fact_transactions

    • avalanche.core.fact_transactions

    • base.core.fact_transactions

  3. DEX swap data:

    • optimism.defi.ez_dex_swaps

    • arbitrum.defi.ez_dex_swaps

    • polygon.defi.ez_dex_swaps

    • bsc.defi.ez_dex_swaps

    • avalanche.defi.ez_dex_swaps

    • base.defi.ez_dex_swaps

The data collection and analysis process consisted of the following steps:

  1. Identifying Rabby subsidies: We first identified all native token transfers from the Rabby wallet (address: 0x76dd65529dc6c073c1e0af2a5ecc78434bdbf7d9) to user addresses across six different chains (Optimism, Arbitrum, Polygon, BSC, Avalanche, and Base). These transfers represent gas subsidies provided by Rabby.

  2. Tracking subsequent transactions: For each subsidized address, we identified the next transaction made by that address after receiving the subsidy.

  3. Filtering for Uniswap swaps: We then filtered these subsequent transactions to include only those that were swaps on Uniswap (v2 or v3) platforms.

  4. Aggregating data: Finally, we aggregated the data by chain to calculate various metrics such as the number of unique swappers, total swap volume, average swap volume, total subsidy amount, and cost per user.

The analysis covers transactions from March 1, 2024, onwards. This allows us to focus on recent activity and the impact of gas subsidies on Uniswap usage across different Layer 2 and EVM-compatible chains.

Limitations

It's important to note a few limitations of this methodology:

  1. We only consider the immediate next transaction after a subsidy. This may not capture all Uniswap activity influenced by the subsidy if users made multiple transactions.

  2. The analysis doesn't account for users who received subsidies but didn't perform a Uniswap swap as their next transaction.

  3. The data doesn't include comparison with non-subsidized transactions, which could provide additional context on the impact of subsidies.


If you have any comments, contact me on x.com/mrwildcat7

Subscribe to Wild Tales and never miss a post.
#defi#uniswap