Skip to content

How does TVL on Curve correlate to TVL on Convex?

Select a time period of your choosing to answer this question and observe any changes in the trend over time.


1 hidden cell

Background

I have recently fallen down the crypto/ defi/ DAO/ web3 rabbit hole. While I am not, by any stretch, an expert on the various protocols, pools and providers, it was impossible not to notice the Curve protocol and the subsequent rise of the Convex empire in the legendary Curve Wars. Currently Curve leads the universe in TVL with Convex checking in at third.

As such, I was delighted to discover this MetricDao bounty is on this very topic! (I am even more delighted to have discovered MetricDAO)

I'm no expert on this whole curve-convex thing, although I did listen to a Bankless podcast which I would call "recent", except in crypto and (spoiler alert) especially in the world of the "Curve Wars", but it was recorded in the last week of January, which is ALMOST A WHOLE MONTH !!,

so of course the information may already be obsolete. The other soon-to-be-obsolete source of my knowledge (published a week and a half ago) is this Field Guide to the Curve Wars: Defi's Fight for Liquidity

Curve, Convex, Llamas, Butterflies, Token Reactors, and a Big Bag of Stablecoins

The key points are worth recapping, but check those sources as I won't do this justice:

Curve

  • Curve showed up on the scene with a solution to a problem with the Uniswap protocol, namely that it didn't work well when the pools were two similar tokens. Version 1 pretty much focused on stable coins.
  • The CRV token provides revenue sharing and voting priveledges.
  • To get the best returns you must lock up your Curve for FOUR YEARS!!. Remember this is Crypto so four years is like a lifetime and a half.
  • Voting priveledges are a big deal !! This is because your veCRV (what you get when you lock CRV ) can be used to determine which side pool gets extra "emissions". Which leads to my final Curve bullet point...
  • People bribe people to vote for their pool!

Convex

NEWS FLASH:

CONVEX DECLARED WINNER OF WAR

So apparently convex has locked up voting control. Their description from defillama.com says

"Curve is a decentralized exchange liquidity pool on Ethereum designed for extremely efficient stablecoin trading"

This is getting long winded and I am here to analyze two different protocols. Regardless of what the protocols do, the analysis remains the same. Suffice it to say that a convex token gives you veCRV that isn't locked AND they automatically handle the bribing for you.

It's complicated. I haven't done it justice, but I am here to answer questions and then tell a story with data. There is just one more point: Even though Convex has a TVL that is 80% of Curve's TVL, it is not a parasitic relationship — it is a symbiotic one.

The Plan:

We are looking at

  1. Correlation of TVL : (Total Value Locked -- everyone's favorite liquidity benchmark). I will compare the correlation of the percent change in TVL over daily, weekly and monthly time frames.
  1. Correlation of volume : Volume could be construed as the transaction value of the token either in a centralized or decentralized exchange, and depending on one's interpretation of "correlation" and "volume" you could consider comparing TVL with token volume or just use those metrics to compare CVX and CRV. I want to calculate the daily/weekly/monthly volume of transactions which either add to or subtract from the protocol's TVL.
My workflow:
Collect -> Munge -> Visualize <-> Analyze -> Report.

Total Value Locked

For the first part of my study, I am using defillama.com's public API. There were two endpoints of interest.

The protocols endpoint.

I needed to query the protocols json object, mainly because my searches for convex were failing.

  • I needed to know the 'slug' so as to be able to query the main dataset of interest. curve-finance it is.
  • I got some context and a snapshot of the almost current (Feb 13,2022) TVL and market cap statistics.

Almost Current Curve/ Convex Snapshot

Hidden code
Key Takeaways:
  1. Convex TVL is 80% of Curve TVL !!! — Not bad for an 8 month old!

  2. While Convex's presence (at least as far as Mr. Llama is concerned) is limited to the Ethernet Mainnet, (including staking) Curve has a presence on several alt-L1s and L2 platforms. It is likely that Defillama does not have a comprehensive list (Terra, Near and zkSync come to mind), but at any rate, most of the liquidity (81% eth mainet and additional 6% on eth staking, again according to the defillama data) is still on the mainnet.We will only use data from the Ethereum Mainnet for our analysis.

  3. Given that convex is basically built on top of Curve and has a TVL 80% the size of Curve, it certainly seems intuitive that there would be a very strong correlation, with a more relative question being "How close to 1 are Curve and Convex correlated?". But one of the metrics I snagged while slug hunting was the 7 day change in TVL. I still expect correlation but this minor divergence in the only stat we have must give us pause.

Historical TVL

If you're going to determine the TVL correlation your going to need this! I had to wrestle with the llama as the API didn't serve up a nice JSON for me but the two API calls I made didn't neatly fit into a dataframe for me like it's supposed to. Par for the course.

With a little copy and paste and a very large list assignment and a little tweaking of the time

(for some reason the llama decided to make the dates at 22:00 instead of 00:00, so I had to push the day forward, since I'd rather the data be off by two hours than 22. 17 observations later the cvx data switched back over to the standard midnight, which has a nice advantage that when all the data is midnight, you don't have to look at the useless time portion of the datetime object, so i pushed the hours back two hours save for those nasty first 17 rows. None of this information is important, but I thought I'd throw it in there so as to give the general audience an understanding of the thankless, unglamorous work of the data-munger and to hint to the bounty graders that I did a detailed inspection of the data)

After merging the CRV and CVX data, the first few lines of each dataframe look like this.

Hidden code
Hidden code

We are still a few steps away as far as correlation goes, but, even though it wasn't explicitly requested, I would be remiss not to visually convey the rapid growth of CVX.

Hidden code

Or maybe not!!

Ah the joys of EDA (Exploratory Data Analysis). I thought I was plotting to see the dramatic growth of CVX vs CRV, and while that is kind of impressive, this graph doesn't do justice to the rather impressive relative growth. We do see though that CVX spots Curve, basically a 1.3 billion dollar head start and actually almost eclipses it in early January. But the real surprise is that the graph totally answers our question!

"You don't need a weatherman to know which way the wind blows"

-Bob Dylan (Subterranean Homesick Blues)