Uniswap v3 Gas ⛽️

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 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:

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.

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.

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.

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.

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.

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.

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.


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%.
Subscribe to fknmarqu
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.