Function hydra_dx_math::xyk::calculate_shares
source · pub fn calculate_shares(
asset_reserve: u128,
asset_amount: u128,
share_issuance: u128
) -> Option<u128>
Expand description
Calculating amount of shares given to LP for added liquidity shares = issuance * amount / reserve
asset_reserve
- asset reserveasset_b_reserve
- amount added by LPshare_issuance
- total issuance of share asset