hopper-finance
DeFi math primitives for Hopper programs: constant-product swaps, LP math,
slippage checks, and price bounds. Pure functions, no_std, no_alloc, and
BPF-safe.
Part of the Hopper framework.
Every public helper uses checked u128 intermediates and returns an explicit
ProgramError on overflow or invalid bounds. Use it when the protocol logic
needs predictable math without pulling in an allocator.
use ;
let amount_out = constant_product_out?;
check_slippage?;
Docs: https://docs.rs/crate/hopper-finance/0.2.0
Support: solanadevdao.sol / F42ZovBoRJZU4av5MiESVwJWnEx8ZQVFkc1RM29zMxNT.
License: Apache-2.0.