Skip to main content

compute_amount_out

Function compute_amount_out 

Source
pub fn compute_amount_out(amount_in: U256) -> Result<U256>
Expand description

Computes the output amount for a fee swap: amount_in * M / SCALE.

§Errors

  • UnderOverflow — multiplication of amount_in * M overflows