# Uniswap v3 Gas ⛽️

By [fknmarqu](https://paragraph.com/@fknmarqu) · 2022-05-04

---

When using a smart contract blockchain, users have to pay a fee to miners/validators so they include their transaction into the next block to get executed. The fee is called `gas` and how much of it you need to pay depends on the complexity of the transaction. But while the amount of gas needed for a contract remains constant over time, the price of gas does not, being subject to market forces of supply and demand.

\*_While there is more to say on the subject of gas,_ [_Etherscan_](https://info.etherscan.com/what-is-gas-fee/) _says it better._

In this report we will have a closer look at the gas fees paid for interacting with Uniswap v3 in 2022, and how that compares to the overall gas paid on the Ethereum blockchain.

* * *

Where’s all the data?
---------------------

On the blockchain, of course. But it’s nice to have a curated data source you can query and build your visualizations with, so I used Dune to build a **live** dashboard containing all the data presented below, _plus much more_:

[https://dune.com/k2rbpz/df12g3h4j3](https://dune.com/k2rbpz/df12g3h4j3)

All `gas fees` and `gas prices` are conveniently stashed in the `ethereum.”transactions”` table. As gas fees and prices are all expressed in ETH, they need a bit of transformation and a USD conversion with the aid of the `prices."layer1_usd"` table.

Although primarily known as a Decentralized Exchange (DEX), Uniswap v3 interactions include supplying and withdrawing liquidity, LP position management, swap pair creation or Governance voting. We will be collecting gas fees paid for interactions with **all** Uniswap v3 contracts.

From that point onward, we can aggregate and display the data in such a way that helps us make sense of the gas costs of interacting with Uniswap v3 in 2022.

* * *

Results
-------

Up until `May 04, 2022`, a total of 74k ETH or 223M USD has been paid in gas fees.

![](https://storage.googleapis.com/papyrus_images/ae7a614f0bae1540903fb5c5ebf0e113a6b780969dd29a3ea5f733c04a393ee2.png)

Below we can see the daily amount of fees paid over the observed period in `ETH` and `USD`. The amounts vary by a lot day to day, but we can see a general decrease in fees since mid January. This trend reached the bottom and then stabilized in March, after which it remained under 500 ETH per day, with the exception of a few days when it spiked to around 1k ETH.

![](https://storage.googleapis.com/papyrus_images/149e5d7b5211f05bb2cfa22dffbfa0a46a5e83cabc95659d47722e6141b34056.png)

As long as contracts remain unchanged, so does the amount of gas required to execute them. The `gas price` however, does not. This comes to show that the protocol itself has little influence over the costs of using it on the Ethereum network.

An interesting aspect of the gas price is the divergence between the average and the maximum daily prices. The average closely follows the trend of the minimum amounts, which have been on a general downtrend over the year, but the maximum gas prices paid have constantly increased.

![](https://storage.googleapis.com/papyrus_images/0db2d8ca108de516acd1152f2bea5de0f2dc7b4d9b5c52b261e1990f859dd3e2.png)

Throughout the entire observed period, the most fees were paid to the `SwapRouter02` contract, responsible for executing swaps. This is unsurprising given that swapping is the main purpose of Uniswap.

Other significant fee amounts have been paid by interacting with the other Router contract, as well as with the `UniswapV3Staker` contract.

![](https://storage.googleapis.com/papyrus_images/8ec02ea21575a72f0983e04009ba21c6376d65f2711b8a30a6d2423e2b1a8d80.png)

In the graph below we can see the daily share of the total gas paid by users on the Ethereum blockchain. Since the start of the observed period, Uniswap v3 fees have fluctuated between `5%` and `11%` of the daily gas. This range remained constant and there does not seem to be any trend forming in a different direction.

![](https://storage.googleapis.com/papyrus_images/e190608c45093e557dd4a66f670f77cdeef43586ab13483a09eef301fd737bdb.png)

Below we can see how the daily fees paid change by the number of transactions with Uniswap in a day. We can observe a slight correlation, with amounts increasing along with the number of transactions, but they definitely don’t move 1:1.

With daily fees representing on average around 9% of the total daily fees of Ethereum, it is safe to say that the number of transactions might be in a similar range. The number of transactions on Uniswap v3 alone are not enough to significantly influence the gas prices of the entire network, hence the weak correlation.

![](https://storage.googleapis.com/papyrus_images/43a43b31b75eaebcfa7d3dfedac50c30bf5c80ba9a33bb21d0ffbf58ae8b5650.png)

On the contract level we can see the majority of the fees are paid while interacting with the `SwapRouter02` contract. Furthermore, the percentage of fees increased from around `80%` at the start of the year, to about `90%` in the last month.

_All contracts of swap pairs are aggregated under the_ `Pair` _label. All other labels represent individual contracts._

While there are 11 contracts (10 + Pair label) being tracked, many of them don’t have any significant activity on a daily basis. We can spot however increased fee amounts being paid by transactions with `GovernorBravoDelegator` around the time of proposals going live. Some of these can be seen on `March 03` or `April 24`.

![](https://storage.googleapis.com/papyrus_images/3b7c6e0c6a52338e83037e989941c765bac66998f945fc55a8e613fcb4bb5129.png)

* * *

Conclusions
-----------

*   Using the Uniswap v3 protocol has generated over 74k ETH of fees paid to the Ethereum blockchain miners.
    
*   The gas necessary for executing the Uniswap v3 contracts has not changed over the observed period as it only changes with the complexity of the contracts. The fluctuating price of gas has a big role in the amount of fees paid by users of the protocol.
    
*   Over the observed period, Uniswap v3 gas represented between 5% and 11% of the total gas used on the Ethereum blockchain and continues to stay within that range.
    
*   On a contract level, most fees are paid when interacting with the Router contracts, with the `SwapRouter02` contract in particular increasing its share of the fees over time up to 90%.

---

*Originally published on [fknmarqu](https://paragraph.com/@fknmarqu/uniswap-v3-gas)*
