CVX Minting
CVX is minted whenever a user claims CRV from a pool in the Convex system.
This means that all LP pools, as well as the cvxCRV rewards pool, will mint CVX when claiming CRV rewards from the pool. Take note that the CVX staking pool does not mint more CVX, as rewards received there are cvxCRV and not vanilla CRV.
Mint formula
The amount of CVX minted is determined pro-rata to how much CRV was claimed, with the conversion rate decreasing as CVX supply increases (max 100 million) in the form of cliff drop-offs. The parameters live on the CVX token itself and are read through the CvxMining library:
//constants (read from the CVX token: cvx.reductionPerCliff(), cvx.totalCliffs(), cvx.maxSupply())
let cliffSize = 100000 * 1e18; //new cliff every 100,000 tokens (cvx.reductionPerCliff())
let cliffCount = 1000; // 1,000 cliffs (cvx.totalCliffs())
let maxSupply = 100000000 * 1e18; //100 mil max supply (cvx.maxSupply())
uint GetCVXMintAmount( uint crvEarned ){
//first get total supply
let cvxTotalSupply = await cvx.totalSupply();
//get current cliff
let currentCliff = cvxTotalSupply / cliffSize;
//if current cliff is under the max
if(currentCliff < cliffCount ){
//get remaining cliffs
let remaining = cliffCount - currentCliff;
//multiply ratio of remaining cliffs to total cliffs against amount CRV received
var cvxEarned = crvEarned * remaining / cliffCount;
//double check we have not gone over the max supply
var amountTillMax = maxSupply - cvxTotalSupply;
if(cvxEarned > amountTillMax){
cvxEarned = amountTillMax;
}
return cvxEarned;
}
return 0;
}In practice, integrate through the canonical library: CvxMining.ConvertCrvToCvx(_amount) returns the CVX that a given raw CRV amount would mint at the current supply. Because the conversion is supply-cliffed, the minted amount trends to zero as the CVX supply approaches max — always query the library rather than hard-coding a rate.
Last updated
Was this helpful?