Submitted by cmichel, also found by tabish
The veCVXStrategy.manualRebalance function computes two ratios currentLockRatio and newLockRatio and compares them.
However, these ratios compute different things and are not comparable:
The comparison that follows does not make sense:
The rebalancing is broken and does not correctly rebalance. It usually leads to locking nearly everything if totalCVXBalance is high.
Judging from the cvxToLock = newLockRatio.sub(currentLockRatio) it seems the desired computation is that the ratios should actually be in CVX amounts and not in percentages. Therefore, currentLockRatio should just be balanceInLock. (The variables should be renamed as they arent really ratios but absolute CVX balance amounts.)
GalloDaSballo (BadgerDAO) acknowledged:
GalloDaSballo (BadgerDAO) confirmed:
GalloDaSballo (BadgerDAO) patched:
