Open Analytics Bounty: Optimism (October 8)
Rubicon DEX Analysis
Rubicon is an order book protocol for Ethereum, which makes it an order book protocol for the world! It can be used to swap tokens, trade with limit orders, or earn by providing liquidity in Rubicon Pools.
Rubicon is built on Ethereum L2 networks to give traders cheap transactions and instant trade confirmations.
In this Dashboard, we’ll analyze the available data for this protocol in two parts:
- Swap Activity
- Liquidity Providing Activity

Methodology
Swap activities:
After looking at the protocol’s docs and example transactions, we’ve found that the Rubicon Router address is responsible for handling swap transactions. Each transaction contains an event named LogTrade
which saves the swap information and token address, and raw amount in the event_inputs
column.
Then, it’s only a matter of adjusting decimals to amount and estimating the USD value of the swap using optimism.core.fact_hourly_token_prices
table to reach the rubicon_ez_swaps table, which can be used to chart the standard metrics for swap activities.
- Number of swaps: count of distinct
tx_hash
- Unique Wallets: count of distinct
origin_from_address
- USD Volume: sum of USD amount
We will find and chart top assets and swap pairs based on these 3 metrics.
LP actions:
There are 7 pools (baths) mentioned in the protocol’s docs and we’ll find what we want in the transactions made to these baths’ addresses.
In deposit transactions, there is an event named Deposit accompanied by a Transfer event from the user to the bath’s address.
In Withdrawal transactions, there are Withdraw events and two Transfer events. both from the bath to the user, one returning the deposited assets, and one paying the user the earned rewards in Optimism. we only consider the Transfer of deposited assets here and later on, we’ll use the RewardsPaid event accompanied by Withdraw events to measure paid rewards.
Having the deposits and withdrawals data, we can chart the changes in the protocol’s TVL, assuming TVL = Deposits USD Amount - Withdrawals USD Amount.
Across all three metrics, USD volume, Unique Wallets, and the number of swaps, the top 3 popular pairs are the same.
- WETH → USDC
- USDC → OP
- USDC → WETH
The breakdown of all 3 metrics is the same for top assets swapped to.
USDC, WETH, and OP are at the top of all charts, and SNX and WBTC are sticking to the bottom.
The breakdown of all 3 metrics is the same for top assets swapped from.
USDC, WETH, and OP are at the top of all charts, and SNX and WBTC are sticking to the bottom.
We can see a downward trend in both deposits and withdrawals in the last month.
A Total of 4.79M$ was deposited, and 6.87M$ was withdrawn from the Rubicon baths leaving a -2.08M$ change in the TVL.
Here we can see a stable trend in the daily rewards paid by the protocols, considering the downwards trend of LP activities.
In the last month, a total of 73.3K$ were paid to the Liquidity Providers.
The top baths in terms of rewards paid are bathUSDC, bathOP, and bathUSDT.
Conclusion
-
The daily charts of swap activities show a general downwards trend, although with a few spikes here and there, in all 3 metrics, USD volume, Unique Wallets, and number of swaps.
-
The most popular swap pair on Rubicon protocol is WETH → USDC, closely followed by USDC → OP and USDC → WETH. the results are similar across USD volume, Unique Wallets, and number of swaps metrics.
-
The most popular asset on Rubicon protocol both From and To is USDC in all 3 metrics, USD volume, Unique Wallets, and number of swaps.
-
a Total of 4.79M$ deposited into, and 6.87M$ was withdrawn from Rubicon protocol.
-
Rubicon has seen a 2.09M$ negative change to their TVL in the last month.
\