Skip to main content

pyra_margin/
error.rs

1/// Errors from margin/balance math operations.
2#[derive(Debug, thiserror::Error)]
3pub enum MathError {
4    #[error("arithmetic overflow in margin calculation")]
5    Overflow,
6    #[error("liquidation threshold is 0")]
7    NotBorrowCollateral,
8}
9
10pub type MathResult<T> = Result<T, MathError>;