On-chain analysis: Stablecoin users on Convex

Rafael Ugolini
mStable
Published in
7 min readOct 28, 2022

Key Insights

  • Most of the addresses stay in the pools for a maximum of 60 days.
  • Our yield simulation showed that most addresses lose yield while administrating their position.
  • The 3 dominant variables that influence your net yield in Convex are: how much you are depositing(TVL), how many times you are compounding(claims) and for how long you will stay in the pool(time).
  • There is a massive opportunity for automation and gas socialization products to create a positive-sum vault.

Introduction

Over this year, mStable has been looking into various yield sources to create a vault that will bring a good and trustful yield.

After analyzing stablecoins, we concluded that Convex would be a good source of yield for them.

In this article, we will cover 3 stable pools. Based on this analysis, we can point out behaviours that increase or decrease the net yield and how specific personas a different approach is more viable. We will also classify the depositors into personas according to their TVL size, calculate how long they stay in the pool, and show what yield they are getting.

Curve

Convex is built on top of Curve, which is an AMM that provides high liquidity, low slippage, and low fee transactions among ERC-20 tokens. Curve also introduced the veToken(vote-escrowed) model. The longer you lock CRV, the more veCRV you receive.

For us, the most important part is the Boosting system behind it. You can earn a boost of up to 2.5x when providing liquidity to Curve.

If you are interested in Curve, you can find more details in their documentation.

Convex

Convex allows Curve.fi liquidity providers to earn trading fees and claim boosted CRV without locking CRV themselves. Liquidity providers can receive boosted CRV and liquidity mining rewards with minimal effort.

Once a user deposits CRV into Convex, the user gets back cvxCRV(1-way conversation) and that CRV is locked forever on the platform as veCRV.

Convex currently holds around 47.9% of the veCRV, the essential part for us here is the boosting rewards that this generates.

Once you provide liquidity via Convex, you continue to earn trading fees and claim boosted CRV without locking CRV yourself, plus CVX rewards.

Convex currently has USD 4B in TVL.

If you are interested in Convex, you can find more details on their documentation or in this thread from tokenomics dao

Analysis

ℹ️ From the FRAX analysis, we removed the FRAX Convex AMO contract 0x49ee75278820f409ecd67063d8d717b38d66bd71 which is protocol-owned liquidity because it is an outlier (both in size and behaviour) that was complicating the reading and understanding of our findings.

General

TVL Growth

The graph below shows that FRAX is the winner in the Curve Wars, maintaining a huge TVL in billions for months.

In May, it’s very easy to spot The fall of Terra and how UST affected other stablecoins in the ecosystem.

The FRAX TVL looks like it’s decreasing, but it’s because we are only looking at the 3crv-FRAX pool. They created a new liquidity pool, FRAXBP, where they are incentivizing, and the TVL is going there.

Distribution

It’s very interesting to visualize in this graph that most TVL comes from dolphins, sharks and whales, but they represent a small number of addresses. If you look at shrimps, there are 97, but their TVL is USD 170k, while you have 12 whales with USD 66M of TVL.

Per pool

Balance

In these graphs, you can see how well FRAX played the Curve wars.

Amount and days spent in a position

ℹ️ We removed contracts from these graphs to focus on users and multi-sigs

In this graph, we aggregate the amount by summing it to understand better how much liquidity stays in the position.

This is important for our analysis because we want to understand the behaviour of the users better, and staying longer in the pool means their gas cost(swap token, get the Curve pool token and stake in Convex) is diluted over the yield earned.

We can see here that in all 3 pools, most users stay in their position for 1–30 days, regardless of position size. If you count from 1–60 days, you get more than 80% of the TVL.

Claims

ℹ️ We removed contracts from these graphs to focus on users and multi-sigs

Claiming rewards costs around 1_090_276(182_263 + 594_009 + 314_004) gwei, and if you want to compound frequently, this will heavily affect your APY.

We can see here that whales tend to claim more often, and it makes sense for them to do it because their volume makes the cost compared to the cost of claiming very efficient.

Yield simulation

ℹ️ Shrimps visualization is unselected by default to have a better visualization.

To create a simulation, we follow the farm-dump strategy where we would farm the CVX and CRV tokens, swap for the native token and deposit them back in the pool.

We are only considering the yield generated by the farming tokens and not the one generated by the pool.

Here are some assumptions.

  • 6% APY
  • All the wallets have a first deposit cost: (594_009 + 49_335 + 314_004 + 46_458) = 1_003_806
  • For each claim, we liquidate and deposit back: (182_263 + (100_000 * 2) + 594_009 + 314_004) = 1_290_276 # we assumed 100_000 to swap tokens
  • ETH Price: 2_000
  • GAS Price: 40

In the graphs below, we use the number of claims from the “Claims” section and TVL/Days Spent from the “Amount and days spent in a position” section to visualize the impact on the simulation yield.

Insights

  • Small players: (shrimp, crab, octopus: 0–500_000) have a smaller part of the total addressable market while they have the biggest number of addresses.
  • Medium players: (fish, dolphin, shark: 500_000–10_000_000) can deliver a big TVL with a good distribution of addresses.
  • Big players: (whales: +10_000_000) are a different market and are the exact opposite of the small players, and they offer a massive amount of TVL with a small number of addresses.
  • Days in the position: Most users don’t stay more than 60 days in the position. Building a product focusing on users that stay less than 60 days already targets around 80% of the market.
  • Claims: Timing the right moment to claim rewards significantly affects your yield, and finding the balance is tricky. Most users have smaller returns on their APY, and in some extreme cases, they even lose money.

The majority of the TVL in Convex comes from bigger players(dolphins, sharks and whales), and there could be a couple of reasons for this:

  • Complexity: the minimum requirement is not straightforward, requires you to go to a different protocol website and is also error-prone
  • Expensive: transactions(staking, claim rewards, …) on Convex are very expensive. It could be a limiting factor.
  • Market: the current DeFi ecosystem is dominated by bigger players.

Appendix: Methodology

Contracts

For our analysis, we used the following contracts

Convex Finance: Booster

We use the Booster contract to retrieve information about the pools.

  • poolLength() to get the number of pools
  • poolInfo(uint256) to get more information about the pool_id

https://etherscan.io/address/0xf403c135812408bfbe8713b5a23a04b3d48aae31

Convex Finance: BaseRewardPool

For each pool, we look into Staked, RewardPaid and Withdrawn events. Using these events, we can calculate when the user started staking, claimed rewards and removed liquidity from the pool.

mUSD: https://etherscan.io/address/0xdbfa6187c79f4fe4cda20609e75760c5aae88e52

BUSD: https://etherscan.io/address/0xbd223812d360c9587921292d0644d18adb6a2ad0

FRAX: https://etherscan.io/address/0xb900ef131301b307db5efcbed9dbb50a3e209b2e

Stablecoins

This analysis will cover a subset of the stablecoins mentioned in the A Stablecoin Framework article.

We will look into mUSD, BUSD and FRAX

Personas

To better analyze wallets, we wanted to follow some market standards, but it’s hard to use existing definitions properly.

Here is how we are splitting the users:

Address type

In this analysis, we also create separation on the wallets by:

Position details

When looking at wallet positions, 2 things are super important for us.

How long does a user stay in the pool?

A vital metric to consider when looking at the yield is that the longer a user stays in the pool, the more rewards it accumulates, and the gas cost gets diluted.

This calculation is not trivial, and we decided to take an approach with a FIFO(first in, first out) logic to calculate and examples better describe this:

Example A

2022-09-01 Alice deposits 10_000

2022-09-15 Alice withdrawals 5_000

2022-09-30 Alice withdrawals 5_000

Example B

2022-09-01 Alice deposits 10_000

2022-09-15 Alice deposits 5_000

2022-09-30 Alice withdrawals 15_000

How many times has the user claimed the rewards?

Another piece of information we wanted to know is how many times a user claims the rewards of the positions.

We used this metric to understand how many times a user claims over their position time. If the user claims too many times, the gas cost affects the APY, but if the user doesn’t claim at the right moment, it loses the compound benefit of the rewards.

Example

2022–09–01 Alice deposits 10_000

2022–09–05 Alice claims

2022–09–15 Alice withdrawals 5_000

2022–09–30 Alice withdrawals 5_000

We add this because when we take an average, it shows 1 claim on positions of 15 days instead of 0.5.

--

--