use crate::constants::MAX_LOCK_PERIODS;
use cosmwasm_std::{Decimal, StdResult, Uint128};
pub fn calc_coefficient(interval: u64) -> Decimal {
Decimal::from_ratio(90_u64 * interval, MAX_LOCK_PERIODS * 10)
}
pub fn adjust_vp_and_slope(vp: &mut Uint128, dt: u64) -> StdResult<Uint128> {
let slope = vp.checked_div(Uint128::from(dt))?;
*vp = slope * Uint128::from(dt);
Ok(slope)
}