Function pallet_xyk::pallet::dispatchables::multiswap_sell_asset
source · pub fn multiswap_sell_asset<T: Config>(
swap_token_list: Vec<CurrencyIdOf<T>>,
sold_asset_amount: BalanceOf<T>,
min_amount_out: BalanceOf<T>
)
Expand description
Executes a multiswap sell asset in a series of sell asset atomic swaps.
Multiswaps must fee lock instead of paying transaction fees.
First the multiswap is prevalidated, if it is successful then the extrinsic is accepted and the exchange commission will be charged upon execution on the first swap using sold_asset_amount.
Upon failure of an atomic swap or bad slippage, all the atomic swaps are reverted and the exchange commission is charged. Upon such a failure, the extrinsic is marked “successful”, but an event for the failure is emitted
Args:
swap_token_list
- This list of tokens is the route of the atomic swaps, starting with the asset sold and ends with the asset finally boughtsold_asset_amount
: The amount of the first asset soldmin_amount_out
- The minimum amount of last asset that must be bought in order to not fail on slippage. Slippage failures still charge exchange commission.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::multiswap_sell_asset
.