Parallel offers two distinct types of Automatic Market Makers to provide a wider range of possibilities to its users. More specifically, "Stable" is a low slippage AMM suitable for stable 1:1 ratio assets while "Dynamic" is a general-purpose AMM for any kind of asset combination with a higher slippage.
To have a better understating on each type of AMM, take a look at the sub-categories of this chapter.
The nomenclature chose for internal swaps is the old buy and sell operations used on the Stock market, Forex market, crypto CEXs or any other order-book based entity.
Given a [X, Y] asset pair, buying X (base) means swapping Y (quote) for X (base) while the opposite (selling) means swapping X (base) for Y (quote). Therefore, for any [X, Y] asset pair, base is X and quote is Y.
All with that said, accounts buy or sell base assets and pay or charge quote assets.
View Data Storage
ExchangeRate
The exchange rate from the underlying to the internal collateral.
Code
View Method
1
pub type ExchangeRate<T: Config> = StorageValue<_, Rate, ValueQuery>;
Copied!
1
ExchangeRate::<T>::get();
Copied!
LiquidityProviders
Accounts that deposits and withdraw assets in one or more pools.
Code
View Method
1
pub type LiquidityProviders<T: Config> = StorageDoubleMap<