✨ Curve V2 notes
Math k0 controls how flat the curve is, and gamma controls the concentration of the liquidity. price scale The way curve V2 concentrates liquidity for price other than equal to 1 is by what curve V2 calls price scale. the price scale determines where liquidity is concentrated (D/2). transformed balances = actual balances * price scale. D/2 represents the transtorm balances of each token when the pool is perfectly balanced. with transformed balances, we can swap near D/2, where the action is like constant sum. pool value how curve B2 compares different curve V2 AMMs that might have different price scale and that might also have different values for D? us the constant product amm to construct the pool value in curve V2, this equation represents the value L in a constant product AMM: Curve V2 repeg loss curve V2 makes a loss when it repegs to a different price scale. in practice, Curve V2 will not repegs to the spot price. It will make a decision to repeg the price scale or to keep it the same (This decision depends on whether Curve V2 has collected enough profit from swap fees so that it can cover the loss from repeg). So realistically , if it was to repeg to another price scale, it will be a new price scale that is in between the current price scale and the price scale at this spot price. Then the Curve V2 will recalculate the D(reduce). However, the only way that we can reach this point is by increasing the liquidity, and the only way to increase the liquidity is either to collect swap fees or to have liquidity providers deposit more tokens.

Math
k0 controls how flat the curve is, and gamma controls the concentration of the liquidity.
price scale
The way curve V2 concentrates liquidity for price other than equal to 1 is by what curve V2 calls price scale.
the price scale determines where liquidity is concentrated (D/2).
transformed balances = actual balances * price scale.
D/2 represents the transtorm balances of each token when the pool is perfectly balanced.
with transformed balances, we can swap near D/2, where the action is like constant sum.
pool value
how curve B2 compares different curve V2 AMMs that might have different price scale and that might also have different values for D?
us the constant product amm to construct the pool value in curve V2, this equation represents the value L in a constant product AMM:
Curve V2 repeg loss
curve V2 makes a loss when it repegs to a different price scale.
in practice, Curve V2 will not repegs to the spot price. It will make a decision to repeg the price scale or to keep it the same (This decision depends on whether Curve V2 has collected enough profit from swap fees so that it can cover the loss from repeg).
So realistically , if it was to repeg to another price scale, it will be a new price scale that is in between the current price scale and the price scale at this spot price. Then the Curve V2 will recalculate the D(reduce).
However, the only way that we can reach this point is by increasing the liquidity, and the only way to increase the liquidity is either to collect swap fees or to have liquidity providers deposit more tokens.