Skip to content

ribbon-finance/curve-veBoost

 
 

Repository files navigation

Curve Voting Escrow Boost Delegation

The Curve DAO Token is the utility token of the Curve Finance ecosystem, primarily created to incentivise liquidity providers on the platform. However, when staked the CRV token becomes veCRV, a non-transferable, linearly decaying, governance token with 2 special abilities. The first is holders of veCRV receive boosted rewards on provided liquidity (up to a maximum of 2.5x), and the second is holders receive 50% of all the trading fees collected across all Curve Finance pools (including factory pools + altchains) in the form of 3CRV.

With the release of the Curve veBoost, veCRV holders can now delegate a fixed allotment of their veCRV boost to third-party accounts in the form of an NFT. These veBoost tokens, are wrapped packages of boost which eligible gauges (currently only factory gauges) use to determine boosted rewards on provided liquidity. This means any account can receive boosted rewards on provided liquidity, without holding veCRV.

For eligible gauges, the equation for determining your adjusted veCRV balance is:

Adjusted veCRV Balance = veCRV Balance - delegated veBoost + received veBoost

Restrictions:

  • Minimum delegation period is 1 Week
  • Maximum delegation period is the delegator's veCRV lock end
  • Delegators can't delegate more than their veCRV balance - any outstanding veBoosts
  • Delegators can't newly delegate (or extend a delegation) with any outstanding negative veBoosts
  • Delegators can't cancel a veBoost before it's cancel time
  • Receivers can cancel a received veBoost at any time
  • Third parties can't cancel a veboost unless it is expired
  • Delegated boost is internally equal to, abs(sum(delegated veboost)), meaning an accounts veCRV balance can never get inflated due to negative outstanding boosts
  • Received boost is internally equal to, max(received veboost, 0), meaning an accounts received boost balance will never result in decreasing their vanilla veCRV balance

The adjusted formula on chain therefore is:

Adjusted veCRV Balance = veCRV Balance - abs(delegated veBoost) + max(received veBoost, 0)

In fact, if an account does not participate in delegating veBoost, their adjusted veCRV balance will never be below their vanilla veCRV balance.

Deployments

Dependencies

Also check the requirements.txt

Testing

Testing is performed in a local development environment

To run the unit tests:

brownie test --stateful false

To run the state tests:

brownie test --stateful true

Deployment

To deploy the contracts, first modify the deployment script to unlock the account you wish to deploy from. Then:

brownie run deploy --network mainnet

License

(c) Curve.Fi, 2021 - All rights reserved.

About

Curve veCRV Boost Delegation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%