startBonusRatio = minLockBonusRatio + (((maxLockBonusRatio - minLockBonusRatio) * durationRatio) / UNIT);
durationRatio
is: ((lockDuration - MIN_LOCK_DURATION) * UNIT) / (MAX_LOCK_DURATION - MIN_LOCK_DURATION);
lockDuration
id the duration of the new Lock in seconds)userBonusRatioDecrease = (startBonusRatio - baseLockBonusRatio) / lockDuration
newCurrentBonusRatio = lastBonusRatio - (userBonusRatioDecrease * secondsSinceLastUpdate)
newCurrentBonusRatio + ((userBonusRatioDecrease + (userBonusRatioDecrease * secondsSinceLastUpdate)) / 2);
: (newCurrentBonusRatio + lastBonusRatio + userBonusRatioDecrease) / 2
is added since the new multiplier that was calculated is to be used for the next time, and not be counted for the rewards to be accrued during this update)