The bounty will involve analysis of Uniswap’s gas fees and the impact gas price has on Uniswap, as well as the impact of gas prices on Uniswap. There are many topics to explore, such as overall metrics like number of transactions, volume, and size of trades, as well as in-depth analyses of the types of users affected.
Table of Contents
Overview About Uniswap
Uniswap is a decentralized exchange, in short DEX, running on Ethereum blockchain since 2018. It was created by Hayden Adams and decentralized cryptocurrency exchanges. Uniswap empowered everyone to be a liquidity provider by simply supplying liquidity to Liquidity Pools and earn handsome amount of fees.
Different Versions on Uniswap
- UNISWAP V1: AMMs introduced in Uniswap version 1. Uniswap v1 was released onto the Ethereum mainnet on November 2, 2018. Although not the first DEX, it was the first to attract Crypto enthusiasts. Before Uniswap, EtherDelta was the only DEX to gain traction with Crypto enthusiasts. Even still, it utilized the Order Book model, which isn’t considered to be the ideal solution for a decentralized exchange because it causes problems such as user experience issues, high costs and a shortage of liquidity. Uniswap takes the Automated Market Maker (AMM) approach, which provides liquidity through Liquidity Providers (LPs) who invest in Liquidity Pools, rather than placing orders.
- UNISWAP V2: In May 2020, Uniswap v2, the 2nd version, was launched as a proof-of-concept for the next-generation decentralized marketplace. Its initial success served as a signal for the team to revive their efforts for an even better solution. Uniswap v2 corrected the main flaw of v1. It did not include ERC20-ERC20 token pools, which was the main complaint of v1. In this scenario, users would incur higher costs and slippage when they swapped ERC20 tokens. In addition, ERC20-ERC20 liquidity pools were introduced in Uniswap v2 to address the “ETH bridging” issue. They used wrapped ETH in the core contracts instead of native ETH, but end users could still access ETH through helper contracts.
- Uniswap V3: Uniswap V3 is the the latest and greatest version of Uniswap with major improvements that benefit all participatns of Uniswap ecosystem. here is a video explaining Uniswap V3.
Fees in Uniswap
Gas Fees: Gas fees are the costs of computing a transaction using Ethereum’s blockchain. In order to process transactions in the network, miners are paid an amount of Ether (in a small unit called gwei), and even if the transaction fails, there is still a gas fee paid to the miners.
Fees for Liquidity Providers: Token swapping requires a 0.3% fee. It is split proportional to the lenders’ contributions to liquidity reserves. By immediately depositing switching fees into liquidity reserves, each liquidity provider receives their share of the pool. This increases the value of liquidity tokens.Using a proportional share of the underlaying reserves, fees are collected by burning liquidity tokens. Liquidity pools are subject to fees, so the invariant increases at the end of each trade. Specifically, the invariant represents token0_pool / token1_pool at the end of the previous trade.
Swap Fee: Swap fees are specific amounts charged by the automated exchange system that determines whether an exchange of tokens has been successful. In both Uniswap v1 and v2, there is a fixed rate of 0.3% for all exchanges.
Protocol Fees: A protocol fee was used in Uniswap V2 to redirect liquidity providers’ trading fee to holders of UNI tokens. Uniswap v3 will follow some of the same principles; however, the protocol fee will vary instead of being fixed.
Flexible Fees: UniSwap v3 offers three fee tiers: 0.05%, 0.30%, and 1.00%. Users of stablecoins can have a fee of 0.05%. These options allow liquidity providers to choose the level of risk they are comfortable with.
Non Compounding Fees: Non-compounded fees are those fees that are not added back to the pool reserves, a new feature in Uniswap v3. UniSwap has created a smart contract to manage swap fees called the Periphery Contract.
Uniswap v3, non-fungible liquidity is the non-dividend share of funds that participants deposit into Uniswap v3.Uniswap v3 accounts for fees to Liquidity Providers using Non-Fungible Tokens that follow the ERC-721 specification.
In the following dashboard, we will discuss about the Uniswap’s gas fees and the impact gas price has on Uniswap, as well as the impact of gas prices on Uniswap. We are also analyzing this in terms of overall metrics like the number of transactions, volumes, and sizes of trades, as well as in-depth analyses of the types of users affected.
Ethereum Gas Trends
This section explains in detail how the Ethereum gas trend is following on the Ethereum network. We are able to see here the totals for the gas fees (USD) that are collected on a weekly basis from the below graphs for past 6 months.During Nov 28-Dec 4, 2021, a maximum Total Gas Fee(usd) of 1.85M was observed. The Total Gas Fee(usd) has been declining. Here the total gas fees are showing high initially. But later they become very low .
If we examine the total month-by-month gas fees over the past six months, initially they were 2M on November 2021, but they had been reduced almost three times by the end of April 2022.
There is a lot of total gas price was dropped during Jan and Feb 2022 by comparing with the previous weeks .
We are able to see here the average of the gas fees (USD) that are collected on a weekly basis from the below graphs for past 6 months. Maximum average gas fees (USD) of $150.26 were observed in W2(Jan2-9), 2022, and minimum average gas fees (USD) of $27.9 were observed in W21(May22-28), 2022. Average Gas Fees (USD) are decreasing. . Here the average gas fees are showing high initially. But later they become very low .
The chart below shows the average gas fees (USD) by month for the past six months. The trend is downward. Our average gas fee was initially $149.29 in Nov 2021, but it dropped to around $50 later during March and April 2022. That means the average fee has been cut by almost three times.
There is a lot of Average gas price was dropped during Jan and Feb 2022 by comparing with the previous weeks .
Number Of Swapped Users on Uniswap vs. Gas Fees
This session shows how gas fees for the past 6 months have been categorized according to swapped amounts and their percentages.In terms of total Users, 8K (more than $100K of swaps) have the lowest total and 27K ($1K – 10K swaps) have the highest number. Overall Users trend is increasing.
Here we can see that a category Upto $100 amount swapped users are not showing much up front. They increased, however, during the months of March and April 2022. The reason may be the decrease in the price of gas. Again, we can see on May 1st, 2nd, and 3rd that there is a sudden drop in users. The cause was the sudden rise in ethereum’s gas prices, as we discussed in our previous section about the ethereum gas prices and their changes .
We can see from the below graph that the average gas fee paid in USD has decreased over the past 6 months, while the number of users paying less than $100 for gas has increased. In this case, we can see that when the price of gas is around $50 we see a greater number of users swapping up to $100. However, we can also see a decreasing number of users if gas prices are suddenly increased during May 1,2022 from $50 to $270. Once again, we are seeing an increasing number of users after gas fees were reduced on May 15,2022.
On the graph below, you can see which users are doing more than $100K worth of swaps, as well as the number of swappers who changed when the gas fees were changed. May 15, 2022 was the day when the maximum number of users reached 221 and May 2, 2022 was the day when the minimum number of users reached 7. The number of users is increasing. On May 1, 2022, the average Gas Fee ($270.24) reached its highest level. The average Gas Fee (usd) is declining. In addition, an increasing number of users is evident here.
On the graph below, you can see which users are doing $1K-$10K, $10K-100K and $100-$1K worth of swaps, as well as the number of swappers who changed when the gas fees were changed. There were the most users during the week of May 8-14, 2022, and the fewest users during the week of May 1-7, 2022. This indicates that the number of users is increasing. However, the average Gas Fee (USD) is declining. Also, we can see here that there is an increasing number of users.
Number Of Transactions on Uniswap vs. Gas Fees
As seen in the graph below, we can see how many transactions there were in relation to the amount of money swapped and their percentages in the past six months period. In this section we see the number of transactions were increased a lot by the time of gas price dropping for the categories of amounts swapped ‘Upto $100 swaps’ , ‘$1K-$10K swaps’ and ‘$10K-$100K swaps’. Transactions in the category of more than $100K swap amounts did not increase very much.
A total Transaction of 142.93K (more than $100K Swaps) is the lowest, and a total Transaction of 4.12M ($1K – 10K Swaps) is the highest. The minimum number of transactions was 43 on May 2, 2022. After the gas price was lowered, the number of transactions increased. May 1, 2022 and May 17, 2022 had lower total transactions than normal, while May 4, 2022 and January 10, 2022 had higher transactions than usual. Here we can see that a category Upto $100 amount swapped transactions are not showing much up front. They increased, however, during the months of March and April 2022. The reason may be the decrease in the price of gas. Again, we can see on May 1st, 2nd, and 3rd that there is a sudden drop in number of transactions. The cause was the sudden rise in ethereum’s gas prices, as we discussed in our previous section about the ethereum gas prices and their changes .
We can see from the below graph that the average gas fee paid in USD has decreased over the past 6 months, while the number of transactions paying upto $100 for gas has increased. In this case, we can see that when the price of gas is around $50 we see a greater number of transactions with swapping amount up to $100. However, we can also see a decreasing number of transactions if gas prices are suddenly increased during May 1,2022 from $50 to $270. Once again, we are seeing an increasing number of transactions after gas fees were reduced on May 15,2022.
On the graph below, you can see the number of transactions which are done with more than $100K worth of swaps, as well as the number of transactions which changed when the gas fees were changed. The number of transactions were in increasing trend . On May 1, 2022, the average Gas Fee ($270.24) reached its highest level. The average Gas Fee (usd) is declining. In addition, an increasing number of transaction is evident here.
On the graph below, you can see the number of transactions which are doing $1K-$10K, $10K-100K and $100-$1K worth of swaps, as well as the number of transactions which are changed when the gas fees were changed. There were the most transactions on Dec 25, 2022, and the fewest number of transactions on May 1st, 2022. This indicates that the number of transactions is increasing. However, the average Gas Fee (USD) is declining. Also, we can see here that there is an increasing number of transactions.
Introduce Uniswap on non-L1 chains
The Uniswap is shown on non-L1 chains Optimism, Arbitrum, and Polygon. These chains offered users the option to trade on Uniswap for significantly lower gas fees. Let’s begin with a brief introduction to each of them.
Define About Optimism, Arbitrum, and Polygon
Optimistic Ethereum (OE) :The goal is to make Ethereum look, feel, and behave like Optimistic Ethereum but with a faster and cheaper price tag. Ethereum applications utilize the Optimistic Ethereum (OE) scaling protocol at Layer 2. This enables cheap transactions. Our goal is to make Ethereum affordable and accessible for everyone. From the below tweet we see the launch of this one .
1/— Uniswap Labs (@Uniswap) July 13, 2021
We are thrilled to announce the Alpha launch of Uniswap v3 on Optimistic Ethereum (OΞ) mainnet in partnership w/ @OptimismPBC!
This is a critical step in scaling DeFi applications and delivering user experience that rivals traditional web apps.https://t.co/Of3QmubFth
Arbitrum: The highly anticipated Arbitrum One mainnet was officially launched by Offchain Labs on Aug. 31, 2021. Ethereum smart contracts can be improved with Arbitrum – boosting their speed, scalability, and privacy while simultaneously adding in the needed features. Developers can run Ethereum transactions and EVM contracts seamlessly onto a second layer using the platform, while still enjoying the excellent security of Ethereum’s layer 1.
Polygon : Anurag Arjun, Jaynti Kanani, and Sandeep Nailwal founded Polygon in India in October 2017 after it was previously known as Matic. With Polygon, you combine the best of Ethereum and sovereign blockchains into a powerful multi-chain platform. This enables you to solve the limitations associated with Blockchain technology, such as high gas prices and slow speeds, without sacrificing security. It is also provides advantages like Polkadot, Cosmos, Avalanche etc . Blockchain technologies provide a variety of benefits, including Ethereum’s network effects, its inherent security, and its ability to be more open and powerful.
According to the above Ethereum gas trend section, the average gas price dropped a lot during March and April, 2022. It is possible that users who opted to trade on Uniswap for the much lower gas fees may have been able to do so due to the introduction of Uniswap on non-L1 chains (Optimism, Arbitrum & Polygon). We can see, all these non – 1 chains were launched with the aim of reducing gas prices and providing speed, security and scalability similar to Ethereum. This can be identified as the reason for the decline in average gas prices over time. As an example, Optimistic Ethereum (OE) aims to make Ethereum behave, look, and feel like Optimistic Ethereum for a much lower price than its counterpart. Therefore, we can say that the goal has been achieved based on the decrease in gas prices.
- According to the above analysis, we can see that the Ethereum gas fees are decreasing. Initially, the total gas fees are high. Later, the total gas fees become very low.
- By March and April 2022, ethereum gas prices reduced from $149 to $50 on average. Again, we can expect a sudden rise in gas prices on May 1st 2022.
- The number of swapped users on a particular period can be compared to the swapped amount and the price of gas, and we can see that a very small number of users were swapped when the gas price was higher. We can also observe that the number of swapped users is higher when gas prices are lower. Therefore, we can say that the gas price impact is there for Uniswap swapped users.
- If we consider the swapped users by their amount swapped, we see that the ‘upto $100 swaps’ were most impacted by the gas price changes compared with other categories of amount swapped. Especially those of the ‘more than $100K swaps’. Therefore, we can say the whales are not much impacted by gas price changes if we consider the ‘upto $100 swaps’ as regular users.
- Additionally, if we look at the number of transactions by different categories of amount swapped, we can observe that “upto $100 swaps” were impacted more by gas price changes than other categories. Particularly the ‘More than $100K swaps’.
- Hence, based on the above analysis, we can conclude that the ethereum gas price is having an impact on a lot of users and transactions.
- The gas price also affected the normal users more than the whale users. In other words, if gas prices were to drop, normal users would be inclined to do more transactions.