hopper-lending
Lending protocol math for Hopper programs: collateral ratios, health checks,
liquidation limits, seize amounts, utilization, and simple interest. Pure
functions, no_std, no_alloc, and BPF-safe.
Part of the Hopper framework.
Pass the current collateral value, debt value, and protocol thresholds. The
crate returns basis-point ratios or rejects the position with a concrete
ProgramError. There is no hidden state and no heap allocation.
use ;
check_healthy?;
let max_repay = max_liquidation_amount?;
let seized = liquidation_seize_amount?;
Docs: https://docs.rs/crate/hopper-lending/0.1.0
License: Apache-2.0.