Skip to main content

Crate jiminy_distribute

Crate jiminy_distribute 

Source
Expand description

§jiminy-distribute

Weighted splits and basis-point fee extraction.

Split a token amount N ways by weight, extract protocol fees, and guarantee that sum(parts) == total – no dust left behind. If you’ve ever had a distribution that silently loses 1 lamport per split, this crate is why you don’t have to debug that again.

Re-exports§

pub use pinocchio;

Functions§

extract_fee
Extract a fee from amount and return (net, fee).
proportional_split
Split total proportionally by shares, writing results to out.