Borrowing and Swapping Currencies (DEX)
Let’s talk about in real life situation when you needed to borrow some money from someone you know, first you have to know if he or she has the amount or the currency that you want with them or not.
If the lender does not have that amount of money or specific currency you need this situation equals to the lacking of liquidity.
In fact it is similar to the decentralized exchange where, this exchange is well known in the title “swap” hence the swap protocol on many DeFi platforms for example Uniswap, PancakeSwap, SushiSwap, etc.
The sub-section of DEX is swapping which originally occurred on the Ethereum chain. It allows users to seamlessly exchange or swap tokens in hosted pools and offers yield farming incentives to liquidity providers.
This is the advantage of practicing decentralized exchange in cryptocurrency where users do not have to worry about the liquidity of the currency in which they need for an exchange. The currencies are stored on the respective pool and blockchain of each platform ready to be used in the exchange activities.
Usually, users are attracted to be the liquidity provider with beneficial returns. By providing the cryptocurrencies to the pool users “sell” the currency they own and receive yield as a return.
In the exchange under a decentralized network, users are able to swap the pairs of tokens supported in the specific chain (e.i. ERC-20: DAI for ETH). The key benefit of swapping in DeFi is that it is noncustodial.
The assets can be customized in a smart contract with the rights of asset owners that can be exercised at any time and is only complete when the exchange conditions are agreed to and met by all parties. If any condition is not met, the entire transaction is canceled.