Module serai_dex_pallet::pallet::dispatchables
source · Expand description
Functions§
- Provide liquidity into the pool of
coin1
andcoin2
. NOTE: an optimal amount of coin1 and coin2 will be calculated and might be different than the providedamount1_desired
/amount2_desired
thus you should provide the min amount you’re happy to provide. Paramsamount1_min
/amount2_min
represent that.mint_to
will be sent the liquidity tokens that represent this share of the pool. - Allows you to remove liquidity by providing the
lp_token_burn
tokens that will be burned in the process. With the usage ofamount1_min_receive
/amount2_min_receive
it’s possible to control the min amount of returned tokens you’re happy with. - Swap the exact amount of
coin1
intocoin2
.amount_out_min
param allows you to specify the min amount of thecoin2
you’re happy to receive. - Swap any amount of
coin1
to get the exact amount ofcoin2
.amount_in_max
param allows to specify the max amount of thecoin1
you’re happy to provide.