Optimism DEXs (redux)
Let’s take a closer look at DEXs on Optimism. Make a dashboard that compares at least three DEXs based on: Total number of swaps by day over the last month, Total number of wallets swapping by day, What are the most popular asset pairs to swap from and too, Top 10 assets swapping from, Top 10 assets to swap to BONUS: Post your dashboard on Twitter and tag @flipsidecrypto and any relevant accounts!

Conclusion
- By analyzing the data and charts of this dashboard, we can conclude that the competition between Uniswap and Velodrome has been tough in the last 30 days. For example, in terms of the number of swaps, these 2 DEXs are slightly different, but in terms of the volume of swaps, Uniswap is very different from the other 2 DEXs and ranks first. Also, Sushiswap has experienced very low numbers, for example, only 1.42% of users make up the number of swappers.
- We also observed that during the last 30 days the number of swaps in Velodrome has always been more than Uniswap and Sushiswap. also Velodrome has surpassed Uniswap and has had a significant increased in trend of cumulative swaps.
- But in terms of the number of swappers and the volume of swaps in the last 30 days, Uniswap has surpassed its competitors.
- According to the charts of the top 5 pools in the 3 DEXs (Uniswap, Sushiswap and Velodrome), it can be said that WETH/USDC asset pairs is the most popular in all 3 DEXs and in all metrics.
- And finally, it can be said with certainty that the two assets USDC and WETH are the most popular among users in all three DEXs and in terms of the number of swaps, the number of swappers and the volume of swaps. (Both swap From and swap To)
Thanks for reading!
This analysis was created on 2022–10–27 for a bounty at Flipside Crypto by Hesam to answer the following questions: #Optimism - Let’s take a closer look at DEXs on Optimism. Make a dashboard that compares at least three DEXs based on: Total number of swaps by day over the last month, Total number of wallets swapping by day, What are the most popular asset pairs to swap from and too, Top 10 assets swapping from, Top 10 assets to swap to
BONUS: Post your dashboard on Twitter and tag @flipsidecrypto and any relevant accounts!
All data used are from Flipside Crypto.
Twitter:
Quick introduction
What Is Optimism?
Optimism is a fast, stable, and scalable L2 blockchain built by Ethereum developers, for Ethereum developers. Built as a minimal extension to existing Ethereum software, Optimism's EVM-equivalent architecture scales your Ethereum apps without surprises.
What Is DEX?
A decentralized exchange (DEX) is a peer-to-peer platform where users can trade cryptocurrencies directly with other users without relying on any intermediaries. Users trade directly from their own wallet without the requirement of KYC.29 May 2022
What Is Uniswap?
Uniswap is a decentralized exchange protocol built on Ethereum. To be more precise, it is an automated liquidity protocol. There is no order book or any centralized party required to make trades. Uniswap allows users to trade without intermediaries, with a high degree of decentralization and censorship-resistance.
What Is SushiSwap?
SushiSwap is a decentralized exchange (DEX) equipped with its own custom automated market maker (AMM) smart contracts. Created by Chef Nomi, SushiSwap runs on the Ethereum blockchain.
Decentralized exchanges offer a space for peer-to-peer transactions of cryptocurrencies to take place securely without the need for an intermediary, and being equipped with its own AMM means that a pricing algorithm is used to price assets instead of using an order book like traditional exchanges.
SushiSwap is a community-run DeFi project that aims to better align incentives for network participants through revenue-sharing and community-driven network effects.
What Is Velodrome?
Velodrome Finance, at its core, is a solution for protocols on Optimism to properly incentivize liquidity for their own use cases. Building on top of the groundwork laid out by Solidly, our team has addressed that first iteration's core issues to realize its full potential.
Methods
:ballot_box_with_check: My 3 DEXs of choice in this dashboard are Uniswap, Sushiswap and Velodrome and I challenged these DEXs on the optimism blockchain!
⚖️ For a fair and accurate comparison, all comparisons and data are for the :calendar:past 30 days until now. ==(block_timestamp >= CURRENT_DATE - 30)== and also all prices are in $USD.
🗨️ 3 important metrics of number of swaps, number of swappers and volume of swaps have been selected for comparison.
Also, 29 queries and about 67 charts are used in this dashboard❕
🔢 Tables used in this dashboard:
> - [ ] optimism.sushi.ez_swaps > - [ ] optimism.velodrome.ez_swaps > - [ ] optimism.core.fact_event_logs > - [ ] optimism.core.fact_token_transfers > - [ ] optimism.core.fact_hourly_token_prices > - [ ] optimism.core.dim_contracts
📝 Also, I have included parts of the codes of this dashboard below:
↘️ List of swap transactions in Uniswap on Optimism:
select
'Uniswap' as Protocol,
block_timestamp,
Logs.origin_from_address as wallet,
(
(Price.price * Transfers.raw_amount) / pow(10, Price.decimals)
) as Volume_USD,
Logs.tx_hash
from
optimism.core.fact_event_logs Logs
join optimism.core.fact_token_transfers Transfers using(tx_hash)
join optimism.core.fact_hourly_token_prices Price on (
Price.token_address = Transfers.contract_address
and date_trunc('hour', Transfers.block_timestamp) = Price.hour
)
where
Logs.event_name = 'Swap'
and Logs.origin_to_address in (
'0xe592427a0aece92de3edee1f18e0157c05861564', --Uniswap V3: Router
'0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' --Uniswap V3: Router 2
)
and Logs.block_timestamp >= CURRENT_DATE - 30
and Logs.tx_status = 'SUCCESS'
↘️ The list of Uniswap Asset Pairs on Optimism:
select
case
when (
CONTRACT_ADDRESS = '0xfc1f3296458f9b2a27a0b91dd7681c4020e09d05'
OR CONTRACT_ADDRESS = '0x68f5c0a2de713a54991e01858fd27a3832401849'
) then 'OP/WETH'
when CONTRACT_ADDRESS = '0x1c3140ab59d6caf9fa7459c6f83d4b52ba881d36' then 'OP/USDC'
when CONTRACT_ADDRESS = '0xf1f199342687a7d78bcc16fce79fa2665ef870e1' then 'USDC/USDT'
when CONTRACT_ADDRESS = '0xc858a329bf053be78d6239c4a4343b8fbd21472b' then 'WETH/USDT'
when CONTRACT_ADDRESS = '0x85149247691df622eaf1a8bd0cafd40bc45154a9' then 'WETH/USDC'
when CONTRACT_ADDRESS = '0x03af20bdaaffb4cc0a521796a223f7d85e2aac31' then 'WETH/DAI'
when CONTRACT_ADDRESS = '0xbf16ef186e715668aa29cef57e2fd7f9d48adfe6' then 'DAI/USDC'
when CONTRACT_ADDRESS = '0x95d9d28606ee55de7667f0f176ebfc3215cfd9c0' then 'DAI/WETH'
else CONTRACT_ADDRESS
end "Asset Pairs",
count(distinct origin_from_address) as "# Swappers"
from
optimism.core.fact_event_logs
where
event_name = 'Swap'
and origin_to_address in (
'0xe592427a0aece92de3edee1f18e0157c05861564', --Uniswap V3: Router
'0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' --Uniswap V3: Router 2
)
and block_timestamp >= CURRENT_DATE - 30
and tx_status = 'SUCCESS'
group by
1
order by
2 desc
limit
5
↘️ Top assets swapping from list in Uniswap on optimism
select
Symbol as "Asset (From)",
count(distinct origin_from_address) as "# Swappers"
from
optimism.core.fact_event_logs
join optimism.core.dim_contracts on (CONTRACT_ADDRESS = address)
where
event_name = 'Transfer'
and origin_to_address in (
'0xe592427a0aece92de3edee1f18e0157c05861564', --Uniswap V3: Router
'0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' --Uniswap V3: Router 2
)
and origin_from_address = event_inputs :to
and block_timestamp >= CURRENT_DATE - 30
and tx_status = 'SUCCESS'
group by
1
order by
2 desc
limit
10
↘️ Top assets to swap to list on Uniswap on optimism
select
Symbol as "Asset (To)",
count(distinct tx_hash) as "# Swaps"
from
optimism.core.fact_event_logs
join optimism.core.dim_contracts on (CONTRACT_ADDRESS = address)
where
event_name = 'Transfer'
and origin_to_address in (
'0xe592427a0aece92de3edee1f18e0157c05861564', --Uniswap V3: Router
'0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' --Uniswap V3: Router 2
)
and origin_from_address = event_inputs :from
and block_timestamp >= CURRENT_DATE - 30
and tx_status = 'SUCCESS'
group by
1
order by
2 desc
limit
10
:chart: Analyze
According to the charts and information above, it is very clear that the competition between Uniswap and Velodrome was tough. In terms of the number of swaps, these 2 DEXs have little difference. (55.7% vs. 43.8%)
But in terms of swap volume, ==Uniswap== has a big difference with the other 2 DEXs, with about $872M! Sushiswap has experienced very low numbers, accounting for only 1.42% of users in the number of swappers.
:chart: Analyze
The above charts are very telling and show the Top 10 assets swapping from in the last 30 days in 3 dex Uniswap, Sushiswap and Velodrome.
:information_source: All numbers and percentages of each asset pairs are given on the charts and are easily read and compared.
Number of Swaps:
Number of Swappers:
Swap Volume ($USD):
:chart: Analyze
In the charts above, you can see the number of swap transactions in all 3 DEXs. In the last 30 days, the number of swaps in Velodrome has always been more than Uniswap and Sushiswap.
If you pay attention to the line chart of the trend of cumulative swaps, you will clearly understand that Velodrome has surpassed Uniswap and has had a significant increase.:chart_with_upwards_trend:
You can also see the change in the share of each DEX in the normalized chart (middle chart) :heavy_check_mark:
:chart: Analyze
But in terms of the number of unique swappers, Uniswap has surpassed the competitors and even the trend of Cumulative Swappers tells the story! Especially in the last 10 days, according to the first and second charts, it has surpassed Velodrome.
The number of ==Sushiswap== users is also increasing slowly.
:chart: Analyze
Good! As expected, in terms of the daily swap volume metric, Uniswap has a big difference from Sushiswap and Velodrome. Of course, Velodrome has had good volumes in the last few days and has gained more share, but it still has a lot of work to do to compete with Uniswap!
Uniswap
Sushiswap
Velodrome
:chart: Analyze
The above charts are very telling and show the Top 5 assets pairs in the last 30 days in 3 dex Uniswap, Sushiswap and Velodrome.
:information_source: All numbers and percentages of each asset pairs are given on the charts and are easily read and compared.
:chart: Analyze
The above charts are very telling and show the Top 10 assets to swap to in the last 30 days in 3 dex Uniswap, Sushiswap and Velodrome.
:information_source: All numbers and percentages of each asset pairs are given on the charts and are easily read and compared.
Uniswap
Sushiswap
Velodrome
Uniswap
Sushiswap
Velodrome