Skip to main content

add_slippage

Function add_slippage 

Source
pub fn add_slippage(value: u64, bps: u16) -> u64
Expand description

value * (10_000 + bps) / 10_000. Saturates on the rare case the multiplication itself overflows u64.