Expand description
§jiminy-finance
AMM math, slippage guards, price impact, economic bounds.
This is the DeFi math crate. Integer square root, constant-product swap
formulas, K-invariant verification, LP token minting, and every slippage
check you need so your users don’t get sandwich-attacked into oblivion.
All u128 intermediates, all overflow-checked, all #[inline(always)].
ⓘ
use jiminy_finance::prelude::*;Re-exports§
pub use amm::isqrt;pub use amm::constant_product_out;pub use amm::constant_product_in;pub use amm::check_k_invariant;pub use amm::price_impact_bps;pub use amm::initial_lp_amount;pub use amm::proportional_lp_amount;pub use slippage::check_max_amount;pub use slippage::check_max_input;pub use slippage::check_min_amount;pub use slippage::check_nonzero;pub use slippage::check_price_bounds;pub use slippage::check_slippage;pub use slippage::check_within_bps;pub use pinocchio;