Announcing CW900-lv: the First-ever Vote Escrowed Token Implementation for Cosmwasm, Plus a Twist
CW900-lv is a landmark cosmwasm contract that will supercharge DeFi innovation across Terra ⚡
- It’s the first vote escrowed token contract for Terra and will bring on a Cambrian explosion of DeFi innovation just like veCRV did for Ethereum 🚀
- It unveils a novel linear vesting strategy that enables users to manage their ve token risk like never before possible on any blockchain 👀
To learn more, read on!
The Problem Vote Escrowed Tokens Solve
Protocols face an ongoing problem of being taken advantage of by mercenary capital. By default they have no way of differentiating long-term believers in a project from mercenaries, and are therefore helpless to protect themselves. Here are two strong examples showcasing this problem.
With liquidity mining, for example, it is difficult for protocols to protect themselves from yield farmers who provide liquidity, farm token emissions, and then dump everything on the protocol. At the end of the day, the protocol is left with little to show for the decrease in their token price.
Similarly, when an important governance proposal is proposed, there is little stopping a mercenary from purchasing a lot of tokens, voting in their own favor, and then dumping all the tokens afterward to avoid the bulk of the consequences on the token price.
The Key Insight
Vote escrowed tokens were popularized by Curve with the release of veCRV (vote escrowed CRV).
The key insight Curve had was that you could measure the long-term commitment of users to a protocol by giving them the option to lock up their tokens for a period of time. And so veCRV was born!
This allowed Curve to solve the problem of farming mercenaries by requiring farmers to lock up CRV and demonstrate a long-term commitment to the protocol in order to get access to the bulk of the farming rewards. These farmers are disincentivized from selling because doing so would negatively affect the value of their locked tokens.
Similarly, Curve solved the problem of governance takeovers by requiring voters to lock up CRV and demonstrate a long-term commitment to the project in order to gain significant voting power. This disincentivizes voters from voting in their own best interest over the best interest of the protocol because it would negatively affect the value of their locked tokens.
These are two examples of the use cases for vote escrowed tokens, but the possibilities are endless. They are applicable anywhere you want to apply the primitive of differentiating long-term believers in a project from mercenaries.
veCRV is quite a complicated smart contract (you can check it out here).
The publishing of the veCRV contract caused an explosion of other ve tokens across Ethereum which would have never gotten off the ground if it weren’t for the veCRV code being available and open source.
You can see a bunch of ve tokens here, almost every one of which forked the initial veCRV code (GLOW to be listed soon ;))
Thus far Terra has been held back by the lack of veCRV equivalent written in cosmwasm, but this ends today with the release of CW900-lv! The publishing of CW900-lv will lead to a new wave of DeFi explosion across Terra and we can’t wait to see the exciting things people use it for.
For context, CW900-lv gets its name from EIP 900, an Ethereum standard for a staking interface. The “-lv” indicates that this isn’t an interface, but an actual implementation where “lv” stands for “linear vesting”.
Innovating on veCRV: Linear Vesting
Here comes the fun part. While CW900-lv takes great inspiration from veCRV 🙏, it is majorly different in the vesting strategy.
veCRV uses the cliff vesting strategy. This means that if you lock up your tokens for 4 years, you can’t get any of them back until the 4 years have passed! This coupled with the fact that you can only have one lock at a time makes it difficult to manage risk. It’s all or nothing.
CW900-lv solves this problem by implementing the linear vesting strategy. This means that if you lock up your tokens for 1 year, you will have 1/4 of your tokens available for withdrawal at the 1/4 year mark for example.
The cool thing is that this unlock process happens on a block-by-block basis, 24 hours per day! The joy of blockchain. It never sleeps and you can manage your ve token risk like never before.
Some other benefits of linear unlock include:
- In the veCRV model unlocks happen at weekly intervals where everybody unlocks at once. This can lead to a rush to sell in an attempt to get out before the selling pressure materializes. In the linear unlock model this isn’t a problem because you can unlock your linear portion of your deposit at any time.
- You can think of a linear unlock as being equivalent to a bunch of tiny locks with end lock times evenly distributed between the start lock time and the end lock time. This is a more natural way of locking than having to pick a single end lock time and put all of your eggs into that basket.
The implementation of linear vesting was a bit trickier than cliff vesting (quadratic equations 👀), but we hope to see Ethereum borrow some of the implementation details for their own ve token contracts ;)
veGLOW will be deployed off of CW900-lv. More info on that coming soon! For now a bit of alpha.
Calling all Devs
While fully functional, CW900-lv is not completely finalized and is still subject to change. We encourage you to fork and innovate upon the code. Together we can make Terra the new hub for DeFi innovation 🤝🙂
- The cw900-lv ve token contract
- A fee distributor contract for distributing fees to ve token holders proportional to their balances
- A governance contract for performing on-chain governance using ve token balances as voting power
- Helper functions for calculating ve boost multipliers
Note: The CW900 spec is yet to be well defined on Cosmwasm. CW900-lv will update over time to match the spec as it evolves. Also, while this post focuses on Terra, being written in cosmwasm means the logic can be used across the Cosmos ecosystem.
Enough chit-chat, check out the code here!
GitHub - glow-protocol/cw900-lv
This monorepository contains the source code for the core smart contracts implementing ve token contracts in Cosmwasm.
To close we’d like to mention that we’re hiring across all roles. At Glow we’re bringing to life a world of dApps that leverage DeFi yield to unlock new and exciting user experiences, accessible to everyone, and onboarding the next million users to Terra. Reach out in the Discord!