Add liquidity to Enabled trading pair, or add provision to Provisioning trading pair.
Add liquidity success will issue shares in current price which decided by the liquidity scale. Shares are temporarily not allowed to transfer and trade, it represents the proportion of assets in liquidity pool.
Add provision success will record the provision, issue shares to caller in the initial price when trading pair convert to Enabled.
Creates and enables TradingPair LP token if it does not exist for trading pair.
Fails to add liquidity for NotEnabled
trading pair.
token_a
: Asset id A.
token_b
: Asset id B.
amount_a_desired
: amount a desired to add.
amount_b_desired
: amount b desired to add.
amount_a_min
: amount a minimum willing to add.
amount_b_min
: amount b minimum willing to add.
to
: The recipient of the LP token. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Disable an Enabled
trading pair.
Requires LP token to be created and in the Enabled
status
Only root can disable trading pair
token_a
: Asset id A.
token_b
: Asset id B.
Namespace
Type
Re enable a NotEnabled
trading pair.
Requires LP token to be created and in the NotEnabled
status
Only root can enable a disabled trading pair
token_a
: Asset id A.
token_b
: Asset id B.
Namespace
Type
Remove liquidity from specific liquidity pool in the form of burning shares, and withdrawing currencies in trading pairs from liquidity pool in proportion, and withdraw liquidity incentive interest.
note: liquidity can still be withdrawn for NotEnabled
trading pairs.
token_a
: Asset id A.
token_b
: Asset id B.
liquidity
: liquidity amount to remove.
amount_a_min
: minimum amount of asset A to be withdrawn from LP token.
amount_b_min
: minimum amount of asset B to be withdrawn from LP token.
to
: The recipient of the withdrawn token assets. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Set the FeeTo
account. This operation requires root access.
note: analogous to Uniswapv2 setFeeTo
fee_to
: the new account or None assigned to FeeTo.
Namespace
Type
Trading with DEX, swap with exact supply amount. Specify your input; retrieve variable output.
note: analogous to Uniswapv2 swapExactTokensForTokens
path
: trading path.
amount_in
: exact supply amount.
amount_out_min
: acceptable minimum target amount.
to
: The recipient of the swapped token asset. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
Trading with DEX, swap with exact target amount. Specify your output; supply variable input.
note: analogous to Uniswapv2 swapTokensForExactTokens
amount_out
: exact target amount.
amount_in_max
: acceptable maximum supply amount.
path
: trading path.
to
: The recipient of the swapped token asset. The caller is the default recipient if it is set to None.
deadline
: The deadline of executing this extrinsic. The deadline won't be checked if it is set to None
Namespace
Type
FeeTo account where network fees are deposited
Namespace
Type
Namespace
Type
Namespace
Type
Namespace
Type
Namespace
Type
Add liquidity success. [who, asset_id_0, reserve_0_increment, asset_id_1, reserve_1_increment, share_increment, to]
Namespace
Type
Add provision success. [who, asset_id_0, contribution_0, asset_id_1, contribution_1]
Namespace
Type
Disable trading pair. [trading_pair]
Namespace
Type
Enable trading pair. [trading_pair]
Namespace
Type
Set FeeTo account success. [fee_to]
Namespace
Type
Provisioning trading pair convert to Enabled. [trading_pair, pool_0_amount, pool_1_amount, total_share_amount]
Namespace
Type
Remove liquidity from the trading pool success. [who, asset_id_0, reserve_0_decrement, asset_id_1, reserve_1_decrement, share_decrement, to]
Namespace