Compiling Enthusiasm

Share this post
Curve Unpacked: Introduction
blockenthusiast.substack.com

Curve Unpacked: Introduction

An attempt to explain the magic behind the Curve Wars

Block Enthusiast
Jan 20
2
Share this post
Curve Unpacked: Introduction
blockenthusiast.substack.com

(note, this is probably way longer than it needs to be,
but I have great love for Curve so gonna just say a lot.
There’s just so much world building!)

Prologue: The Rise of the DEX

Order Books

Decentralized Exchanges started off as order books with things like EtherDelta. However these have a lot of interaction which costs a lot of gas. Its also harder for smart contracts to execute dependent on an order book in the case liquidity isn’t available.

These improved existing Centralized Markets by allowing anyone to add an order matching engine as a server and tap into one market of liquidity. However, it relied on price feeds, and other off chain components.

Automated Market Makers

Constant Product

This led to the rise of AMMs or Automated Market Makers. These tools allowed users to trade any asset along a price curve automatically. No order books. No oracles. Low interaction. Relatively cheap in regard to gas used on onchain order books.

sell DAI for ETH, it sells ETH for MKR, you get MKR. Two pools, one swap.

This pricing curve model was optimized for diverging price pairs.

X * Y = K

This type of Bonding Curve is known as Constant Product.

This was great for most tokens, but was very inefficient for like peg tokens such as swapping between DAI and USDC since the pools deep liquidity is reserved for larger price movements not expected for two assets anchored to the same price point.

Constant Sum

There was an attempt to bridge stable swaps via a constant sum which adjusted the formula to:

X + Y = K

While this does maintain price parity of 1x = 1y at any quantity of each, it is not able to price events where the prices do diverge slightly. This often resulted in the pool running out of liquidity of the highest priced of the set making it an unreliable destination for swaps.

We needed better.



1. Intro to the Dynamic Peg

The Rise of Curve Finance

Dynamic Pegs were a bold entry into the AMM game which made two major advancements.

  1. Manipulated the price curve to keep more of the pools liquidity reserved for expected pricing of like assets.

  2. Added underlying opportunities (initially in the form of ycrv a lending yield bouncer.)

A New Bonding Curve with a Dynamic Peg

Curve Finance introduced a new invariant which was had a flatter pricing model for most of the balance but then sharp spikes at the ends when the pool begins to run low on liquidity for one of the assets.

In a way using a Dynamic Peg allowed the Constant Sum and Constant Product models to be combined, getting the the lower price shifts of Constant Sum, while getting the divergence recognition of Constant Product. We can see the Curve Variant falls squarely inbetween the two approaches while adding significant mathematical complexity.

How flat and where the steep ends begin is dependent on the variable Amplification Coefficient, referred to as `A`. This means that the pool parameters (managed by the Pool Manager) have the ability to rate how strong a peg is and set a value for `A` which matches with their confidence in peg parity. When A is 0 it acts like Constant Product, when A is infinite it acts like Constant Sum.

This is pretty freaking huge, as it allows governance to be quite expressive, and influence the structure of the bonding curve setting pricing on the market and signaling belief in the strength of the peg.

If you want to play with the curve a calculator can be found here:

Twitter avatar for @0xdef10xDΞF1 @0xdef1
@transmissions11 @alexangelj here:
Desmos | Graphing Calculatordesmos.com

January 15th 2022

5 Likes

Underling Opportunities

Curve also introduced utilizing deep liquidity for other opportunities. This was initially demonstrated with the launch of `y pool`. This used the original IEarn as a yield bouncer to lend the underlying assets of the pool (DAI, USDC, USDT, sUSD) across multiple markets, optimizing for best lending rate.

This allowed users to earn both Lending fees and Swap fees, in a stacked opportunity product. The Y Pool was mindblowing to me at the time in the way in composed so many opportunities into a single product.

However, this isn’t limited to just IEarn. Many pools have spun up with access additional opportunities to swaps.

While we don’t see much trading of aTokens or cTokens on Uniswap, Curve has allowed LPs to stack these opportunities for years while allowing users to trade with the raw token. Balancer has recently added the ability to lend on AAVE for deep liquidity showing that there is value for this trend.

From Balancer v2 article but similar concept

Meta Pools

Curve pools were initially permissionless, but this fragmented liquidity. Metapools were created as bridge assets to provide multi route support and share liquidity in a single pool that can be used as an asset across many pools.

Metapool is LP made of 3pool (containing DAI, USDC, USDT) Basepool is alUSD + Metapool, where the Base asset is alUSD

This helps to prevent dilution of major assets across many pairs. Coincidentally the MetaPools don’t really have to do as much work incentivizing as base pools. Those who find their Metapool well integrated will be well rewarded in lower operation costs. On this front I’m most fascinated by D3 pool by Alchemix, Frax, and Fei.

Twitter avatar for @CurveCapcrv.mktcap.eth @CurveCap
$CRV v2, Day 1 $CVX $SPELL $T $FXS $FRAX $BADGER $INV $DOLA $RAI $YFI $ETH $BTC $USDT
Image

January 20th 2022

46 Retweets109 Likes

Metapools act as bridges between pools that can concentrate liquidity between the most bridged assets.

Looking to the Future

A big question in my mind is if tying the stack of opportunities to the LP is optimal vs a potential Uniswap v3 approach using my Rolling Hills concept to farm deep liquidity while keeping liquidity contained to a less pools.

I see this being a highly contentious area going forward, but suffice to say, Curve provides the most lazy approach which is often very effective. Having led the way in integrating such opportunities if it proves that dividing the bonding curve into subsections has merit, they will be able to adapt to it.

Being able to manipulate the bonding curve itself, in my mind will provide better solutions for pooled approaches, than splitting the curve into parts. Curve Finance has so far proven to be the most adept at bonding curve manipulation to date, with Balancer as an honorable mention (i’m pretty obsessed with their LBP).

Furthermore, Bancor V3 poses an interesting single sided opportunity with reasonably short epochs of 7 days for full IL coverage that could find itself quite composible. While I don’t think protocols will prefer liquidity with less peg protection, for volatile pairings, will LPs prefer the single sided approach rather than curve’s v2? In my opinion this new phase is where Boost created stickiness really gets tested.

Recap

Curve enabled like peg swaps in such a way that they could take advantage of underlying opportunities and encouraged more liquidity when it ran low, while significantly dampening price divergence for a large portion of liquidity.

Meaning more liquidity could swap at a reasonable price, while the pool could guarantee it had liquidity on hand. This was quite the breakthrough for Liquidity Providers (users committing capital to these trading pools).

Additionally they were able to concentrate liquidity before it was cool in MetaPools.


2. Intro to Governance and Gauges

When Curve Finance launched its governance token CRV, it was heavily involved in Synthetix early yield farming play, and learned a lot from that dynamic which it then repurposed in what I consider to this day one of the strongest governance models built out.

veCRV

In order to participate in Governance with Curve token, you need to lock CRV as veCRV. This gives you access to an income stream in the form of 3pool tokens, natively earning swap fees between DAI, USDC, and USDT, with a majority of stable volume routed through that pool.

However unlike many governance staking methods, veCRV requires a timelock of up to four years, where the longer that you stake, the larger your influence and rewards.

Everyday this share of influence and rewards degrades as your lock expiration approaches, creating a scenario referred to as compulsive relocking. If you don’t extend your lock frequently, you lose access to rewards.

All veCRV per address shares a lock date.

Gauges

Gauges are modified single asset synthetix staking contracts that allow users to stake Curve LP tokens. These tokens earn rewards where those who have staked curve have the opportunity to earn more at a rate up to 2.5x more than non CRV stakers.

This allowed long term committed LPs to earn at a far higher rate than non committed LPs (and later spawned a whole industry of boost as service).

Here Tetranode simplifies the part of the complex math behind rewards.

Twitter avatar for @TetranodeTΞtranodΞ (💎, 💎) @Tetranode
@CurveFinance Q: If I LP $10,000 and have 1,000 veCRV each providing $2 of boost. $2,000 of my capital will be boosted 2.5x, while the remaining $8,000 will be at the unboosted floor? Will it be: $2,000 @ 2.5x? $8,000 @ 1x? Trying to understand the CRV boost math better...

March 2nd 2021

2 Retweets25 Likes

Each pool denotes a weight to your veCRV. In the above example its $2, but can be a different amount per pool. The corresponding dollar amount of boost you get per pool is the amount you earn 2.5x on, however anything beyond that rate earns 1x returns.

Because of this, Curve Stakers are encouraged to deposit into a broad set of pools, trying capture max boost on the most amount of liquidity through separating funds through the most number of pools.

From Liquidityfolio

This formula is calculated per pool. Note it is a factor of Assets provided to pool, Total Liquidity in the pool, and Voting Weight. This means its recalculated for each pool.

Gauge Weight Voting

One of the primary roles of Curve holders is voting on which pools receive emissions. While the total emissions rate is set, veCRV holders can vote on which pools receive rewards.

30/12/2021 proposed gauge weight changes

While earning weight calculated in the formula above determines what share of total rewards go to any staked LP, the gauge weight voting determines the total amount of rewards that earning weight claims from.

Gauge weights are updated weekly. This means that total reward rate for the same amount of liquidity can shift drastically. Its a game of musical chairs. Those who can afford to migrate pools most often win out over smaller fish.


3. Intro to Boost As Service

Well what if you have a lot of veCRV but not a lot of liquid assets?

If you can get whitelisted, you can offer your boost to smaller users via smart contract vaults, and charge those users a fee. This mechanism is brilliant in that it encourages apps who integrate them to invest long term in their success.

If Curve Finance is the best place to get like peg swap revenue, then any service which seeks to provide revenue on an asset will find like peg swap sto be the least complex opportunity to integrate. At least short of lending which Curve stacks on top of. This encourages dApps to work together as a loose aliance. If you farm here you must be aligned with our success, else those more aligned with us with perform better (natively, this can be compensated with more brrrrr of yield farm gov token).

veCRV Wrappers

If you offer yield as a service, and seek yield from Curve Finance, than you likely want your TLV to grow. However Boost is capped. You only get so much Boost per pool for your veCRV. To help allieviate this, dApps need to offer a way for users to help them grow their veCRV stash at a faster rate than their revenue.

To do this dApps offer veCRV wrapped derrivatives. In all cases so far these are one way deposits locked forever. In return you get a token which grants you access to a share of the fees captures from the dApp in addition to the 3CRV revenue earned from staking the CRV.

These tokens need to maintain their pegs since the only way to exit is to swap out rather than to withdraw. This requires incentives.

I have theories on how future models can compete on this front to reduce the relative cost of these incentives, but for now, they remain a high incentive game.

We’ve seen from Yearn’s yveBoost that traditional AMM’s don’t cut it. Unfortunately for them, Factory Pools were not available on launch so they could not take advantage of Curve’s peg stability mechanisms and had to rely on traditional XY=K curves.

The Yield Economy

In a world where anyone can spin up a token and fork some contracts, its a tough game on the shorthand. You need to compete with infinite BRRRR. dApps which align with Curve can earn at a higher rate than dApps that don’t. Earning first dibbs at fee revenue. While other dApps can make yield the same by offering their token on top, this is more costly, and long term will be a larger cost center.

Therefore dApps which align with Curve by holding governance tokens get access to better yield from the premier like peg swap venue, and thus reduced opperating costs to maintain a like product on the market. Long term these are the dApps that will be able to more easily grow, attract talent, and keep their community loyal.

As new forks arise, dApps would be burning their accumulated and locked governance value to adopt arising competitors, and thus are incentivized to improve the Curve Finance ecosystem.

Further, if you are an issuer and want those who use your product to have access to broader yield opportunities in DeFi, that often involves swaps. Take for instance gUSD, its pathway into the DeFi world is through Curve. Might this be the fate of the future walmart stablecoin? Who knows, but I think they’d have an easier time playing the game than fighting it.


4. Intro to Bribes

Curve votes move rewards via gauges. For this reason they have value to those seeking to have rewards pointed to any particular token. This has led to a stimulating bribe market where influence can be sold.

Global Bribes

Found here, these bribes are non discriminatory of protocol. They pay any curve voter, by native, derrivative, or otherwise. If rewards are not claimed each epoch, they roll over into next weeks pools and can no longer be claimed.

Votium

Found here, these bribes are for CVX voters. They pay any ivCVX voters and rewards are earned and can be claimed whenever.

Source


5. Recaping Roles

  • veCRV holder

    • Votes on Gauge votes

      • affects relative rate pools are rewards

      • Eligible for bribes

    • Boosts LP rewards

      • affects rate this holders LPs are rewarded

        • the more LPs spread in more pools the more profit

      • Eligible to lend Boost

    • Earns Curve Protocol Fees

      • 50% of swap fees

      • based on total usage of Curve Finance

    • Captures Airdrops

    • LP

      • Earns swap fees

      • Earns Gauge rewards (if staked)

        • Earns more rewards based on veCRV held

      • Earns External Yield

  • Pool Manager

    • Sets

“Earns more rewards based on veCRV held”

This is key.



5. Boost As Service: The Bigger OG Players

Yearn Finance

The OG of BaS providers, Yearn Finance offers yveCRV (yield earning) and yvBOOST (autocompounding) versions as their veCRV wrapper.

yveCRV earns 3pool tokens for staking as per usual, however it also earns 10% of boosted vault earnings.

yveCRV holders cannot vote. Instead the voting is programmatically determined to optimize vault yield.

yvBOOST is wrapped yveCRV which uses profits to buy more yveCRV and compound. This vault also earns external rewards like bribes, airdrops, etc.

This setup is optimized to maximize LP return for Yearn users, and to capture return through LP fees. Since Curve is set up so that most benefit is in maxing out available boost, this can serve as a strong optimized set up for LP generated revenue without subsidy

  • yvBOOST holder

    • Votes Automated:

      • Does not vote. Votes are granted to Yearn

      • Captures Bribes

    • Boosts LP Rewards

      • Not eligible to lend

    • Earns Curve Protocol Fees

      • 50% of swap fees

    • Yearn LP

      • Captures 10% of CRV yield from assets deployed in Curve via Yearn

Lose voting power, but super lazy. Let Yearn optimize yield for you and earn the LP rewards you’d have to farm yourself as Curve. This is ideal for those without use of governance powers.

deeper

Convex Finance

Convex came out during some infighting of veCRV holders related to dumping. They separate out rewards from principal and do not autocompound like Yearn.

Convex offers cvxCRV as their veCRV wrapper. cvxCRV can be staked to earn admin fees and a percent of performance fee.

Rather than optimize LPs to earn at maximum rates, Convex offers CVX holders the ability to weild yield governance power.

For this reason cvxCRV does not leverage its vote weight to optimize rewards, and simply takes what is given. 10% of Convex Protocol Revenue.

CVX does not optimize for LP rewards, despite earning them, it optimizes for Bribes, and lower restrictions to governance. 5% of Convex Protocol Revenue.

I feel the gap here is destructive as govenors do not adequately profit from LPs, and must derrive more revenue from bribes, perhaps at the cost of protocol revenue.

  • ivCVX holder

    • Votes by Snapshop or delegationt:

      • Eligible for Bribes

    • Boosts Convex’s LP Rewards

      • Not eligible to lend

    • No Curve Protocol Fees

      • 0% of swap fees

    • Convex LP

    • Captures 5% of CRV yield from assets deployed in Curve via Convex

  • CVX

    • Vote forfieted to ivCVX holders

      • Not eligible for bribes

    • Boosts LP Rewards

      • Captures 10% of CRV yield from Convex’s assets deployed in Curve LPs

    • Earns Curve Protocol Fees

      • 50% of swap fees

    • Convex LP

      • Captures 10% of CRV yield from assets deployed in Curve via Convex

[fees reference]

This approach separates governance from its CVX implementation which allows it to offer that as a separate product. CVX is issued based on CRV aquired by the system. So its somewhat pegged to its held veCRV voting power.

The ability to access veCRV voting power with less commitment is attractive for DAO’s and we see the pile in to CVX ownership.

https://www.coindesk.com/markets/2022/01/04/crv-extends-rally-as-curve-wars-intensify/

Brief comparison

I just wanted a chart to show the different sources of revenue pretty. The numbers on the left mean nothing
“data”. Note veCRV Local LP Performance Fees are not from protocol served liquidity like other assets, but from your own provided liquidity


6. Gauges, Boost, and Ownership

Gauges

Since the transition to permissionless factory pools, not every LP pair gets a gauge to receive CRV emissions. Instead they only earn swap fees and can be incentivized by the local pairing. Curve Governance votes on which pools have access to CRV incentives through a vote.

Curve has recently funded a Risk Assessment Team to provide deeper insight into projects applying for a gauge.

Once voted into existence, a pool manager must give up their control of the A factor though it can have a ramp up factor which projects changes over time.

There was an incident with a malicious pool voted in via bribes where it was demonstrated gauges can be removed by vote. Since then Votium has established a policy where they will not vote on new Gauges.

Liquidity

Liquidity benefits from boost, and must constantly move around to capture the benefits. Bribes are said to offer 4+ : 1 returns per dollar spent on incentives. This means that for every $1 captured in bribes, that same dollar value could capture $4 worth of interest as an LP.

While bribes have trouble influencing individual large LPs who capture 100% of LP boosted revenue, they do more easily court second layer governance whom are less tied directly to LPs. These actors are only capturing 5 - 10% of yield, and 0.4 : 1 makes the choice for bribes less aligned with improving their provided service.

Ownership

While veCRV with its four year locks has limited opportunity seeking, it retains ownership of its Boost and its Vote. New markets are forming to collectively claim bribes to reduce costs, as well as to lend out Boost to protocols. veCRV is the only option that retains the ability to optimally switch between markets if such markets become competitive. However CVX always being 16 weeks away from being swapped into 4 year veCRV, I do wonder how markets will rate that ownership of all opportunities vs the selective choices of derivatives.

Share this post
Curve Unpacked: Introduction
blockenthusiast.substack.com
Comments

Create your profile

0 subscriptions will be displayed on your profile (edit)

Skip for now

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.

TopNew

No posts

Ready for more?

© 2022 Block Enthusiast
Privacy ∙ Terms ∙ Collection notice
Publish on Substack Get the app
Substack is the home for great writing