Function hydra_dx_math::stableswap::calculate_withdraw_one_asset
source · pub fn calculate_withdraw_one_asset<const N: u8, const N_Y: u8>(
reserves: &[Balance],
shares: Balance,
asset_index: usize,
share_asset_issuance: Balance,
amplification: Balance,
fee: Permill
) -> Option<(Balance, Balance)>
Expand description
Given amount of shares and asset reserves, calculate corresponding amount of selected asset to be withdrawn.