pub fn evaluate_locked_balance_at_timestamp(&self, timestamp: u64) -> Uint128 {
        Uint128::try_from(
            // Floor
            (Uint256::from(1u128) * self.linear_coefficient / Uint256::from(2u128))
                // Subtracts a truncated value value
                .checked_sub(Uint256::from(timestamp) * self.quad_coefficient)
                // In the event of an underflow
                // which can happen because of truncation
                // default to 0
                .unwrap_or_default(),
        )
        .unwrap()
    }
// Notice that we can also express rla as a linear function and that:
// - the linear coefficient of this function is the negative quadratic coefficient for vp
// - the constant coefficient of this function is the negative linear coefficient over two for vp
// This means we can calculate the corresponding locked amount without storing more coefficients separately!
Notice that we can also express rla as a linear function and that:
the linear coefficient of this function is the negative quadratic coefficient for vp
the constant coefficient of this function is the negative linear coefficient over two for vp
This means we can calculate the corresponding locked amount without storing more coefficients separately!
Notice that we can also express rla as a linear function and that : the linear coefficient of this function is the negative quadratic coefficient for vp the constant coefficient of this function is the negative linear coefficient over two for vp This means we can calculate the corresponding locked amount without storing more coefficients separately!
pub fn evaluate_locked_balance_at_timestamp(&self, timestamp: u64) -> Uint128 {
        Uint128::try_from(
            // Floor
            (Uint256::from(1u128) * self.linear_coefficient / Uint256::from(2u128))
                // Subtracts a truncated value value
                .checked_sub(Uint256::from(timestamp) * self.quad_coefficient)
                // In the event of an underflow
                // which can happen because of truncation
                // default to 0
                .unwrap_or_default(),
        )
        .unwrap()
    }
pub fn evaluate_locked_balance_at_timestamp ( & self , timestamp : u64 ) -> Uint128 { Uint128 :: try_from ( // Floor ( Uint256 :: from ( 1u128 ) * self . linear_coefficient / Uint256 :: from ( 2u128 ) ) // Subtracts a truncated value value . checked_sub ( Uint256 :: from ( timestamp ) * self . quad_coefficient ) // In the event of an underflow // which can happen because of truncation // default to 0 . unwrap_or_default ( ) , ) . unwrap ( ) }
Notice that we can also express rla as a linear function and that:
 the linear coefficient of this function is the negative quadratic coefficient for vp
 the constant coefficient of this function is the negative linear coefficient over two for vp
This means we can calculate the corresponding locked amount without storing more coefficients separately!
Notice that we can also express rla as a linear function and that : the linear coefficient of this function is the negative quadratic coefficient for vp the constant coefficient of this function is the negative linear coefficient over two for vp This means we can calculate the corresponding locked amount without storing more coefficients separately!
&self
timestamp
u64