pyra-margin 0.4.2

Margin weight, balance, and price calculations for Drift spot positions
Documentation
1
2
3
4
5
6
7
8
/// Errors from margin/balance math operations.
#[derive(Debug, thiserror::Error)]
pub enum MathError {
    #[error("arithmetic overflow in margin calculation")]
    Overflow,
}

pub type MathResult<T> = Result<T, MathError>;