QuickSwap uses an AMM model to provide token pools for users to swap, stake and supply liquidity for token assets.
The following key features of QuickSwap make up its DEX infrastructure:
Liquidity pools
Liquidity pools are a collection of digital assets that enable trading on a DEX. They are a crucial component in DeFi since they supply the much-needed liquidity required for traders to operate on DEXs.
To create liquidity pools on QuickSwap, users lock their cryptocurrency into the protocol’s smart contracts, enabling others to use the locked assets. Consider it akin to a publicly accessible cryptocurrency reservoir. Those who fund this reservoir — aka liquidity providers — receive a portion of the transaction costs for each user interaction in exchange for supplying liquidity.
On QuickSwap, liquidity providers receive 0.25% of the trade fees proportional to their share of the pool.
Another interesting feature of QuickSwap is the change from the order book trade method. Traditionally, exchanges used order books for swap trades. Order books are a real-time collection of buy and sell orders where buyers decide the price that they are willing to pay, place their order price, and then wait for their order to be fulfilled. When a seller matches that price, the order is executed.
This order book method often creates a sub-optimal user experience with sometimes long wait times, low liquidity or lack of order execution, reliance on a third party to help fulfill orders, and higher chances of scams and hacks.
QuickSwap automates this through smart contracts allowing users to swap ERC-20 tokens. When a user wants to exchange one token with another, they send their chosen tokens to the QuickSwap smart contract. The smart contract then calculates the amount of the second token that the user will receive based on the current market price without relying on third-party buy/sell requests for the token being traded. The price determination is done by QuickSwap’s AMM model.
Automated market maker
The QuickSwap AMM model determines the asset prices and provides instant liquidity. It essentially democratizes access to liquidity through its algorithmic code. The QuickSwap AMM is like a financial robot or code that can propose a price between two assets. Instead of the traditional order book, it uses the assets in the liquidity pool to determine the price based on the percentage of tokens in the pool at that time.
This process is programmatic, allowing rapid access to liquidity since the algorithm can always quote a price for a user. With this approach, a transaction can be completed without waiting for the other side to show up. As long as there is sufficient liquidity in the specific pool, trades can be executed.
The formula for calculating each token’s price is x*y=k, where “x” represents the financial quantity of Token A and “y” represents the financial quantity of Token B, with “k” being a constant value. QuickSwap uses an AMM called constant product market maker where “x” and “y” multiply to create “k,” which cannot change in value.
For example, Alice wants to trade Dai (DAI) for Ether (ETH) using the QuickSwap DAI-ETH pool. She added her Dai tokens to the pool for ETH. This increases the ratio of Dai in the pool, resulting in a rise in the price of ETH. But why? Because there is now less ETH in the pool after the transaction, and as per QuickSwap’s AMM formula above, the total pool liquidity (k) must remain constant. To maintain “k,” ETH’s price will rise.
This mechanism is what determines the pricing. So, the more Dai Alice puts in, the less ETH she gets in return because the price of ETH increases. Ultimately, the price paid for this ETH is based on how much a given trade shifts the ratio between the token pool.
Token swapping
Without the need for a crypto-to-fiat exchange, cryptocurrency swapping enables users to instantaneously exchange one cryptocurrency for another. While saving time and money are clear advantages, they are by no means the only reasons users swap.
Sometimes, traders exchange tokens in an effort to profit from a market movement they anticipate. Other times, swaps are occasionally required to pay transaction fees that can only be paid in a particular blockchain’s native coin. As a result, a user of The Sandbox (SAND) may need to make a swap for ETH or Polygon (MATIC) to access the Polygon network.
QuickSwap charges a small transaction fee of 0.3% for every trade that takes place on the platform and near-zero gas fees. The liquidity providers receive payments from the swap-generated fees.
Impermanent loss
Impermanent loss is a possible risk faced by liquidity providers of AMMs like QuickSwap, Uniswap and other such DeFi platforms. Impermanent loss happens when a liquidity provider provides tokens to a liquidity pool, and the price of the deposited token changes compared to when they deposited them.
Liquidity providers are required to place both assets of the trading pair into a liquidity pool. For instance, in an ETH-DAI pool, when trades lower the amount of ETH in the pool and its price rises, the liquidity provider suffers an impermanent loss, as they now hold less ETH since its value went up.
The loss is called impermanent, as the price of ETH may move back up to the original deposited value, and trading fees received may even outstrip the loss. Therefore, it is not permanent. However, it is a risk to be considered.
Read More: cointelegraph.com