Function pallet_asset_conversion::pallet::dispatchables::add_liquidity
source · pub fn add_liquidity<T: Config>(
asset1: T::MultiAssetId,
asset2: T::MultiAssetId,
amount1_desired: T::AssetBalance,
amount2_desired: T::AssetBalance,
amount1_min: T::AssetBalance,
amount2_min: T::AssetBalance,
mint_to: T::AccountId
)
Expand description
Provide liquidity into the pool of asset1
and asset2
.
NOTE: an optimal amount of asset1 and asset2 will be calculated and
might be different than the provided amount1_desired
/amount2_desired
thus you should provide the min amount you’re happy to provide.
Params amount1_min
/amount2_min
represent that.
mint_to
will be sent the liquidity tokens that represent this share of the pool.
Once liquidity is added, someone may successfully call
Pallet::swap_exact_tokens_for_tokens
successfully.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::add_liquidity
.