This article was published as a part of the Data Science Blogathon.
We as users require a platform to trade; buy and sell our assets. Traditionally, we use a centralized exchange to trade our assets. These centralized exchanges are the middlemen. Our crypto assets are stored on these exchanges, and the exchanges have control over our keys. If these exchanges decide to suspend withdrawals or any features on the exchange, our assets will be stuck on the exchange. This was a similar case that happened to exchanges such as Celsius, Voyager, and Vauld. Due to this, many users’ funds to date are stuck in these exchanges.
Blockchain resolves the above issues by introducing the concept of decentralization. Blockchain technology eliminates the middlemen, giving users control of their assets.
In this guide, I will walk you through how to use one of the most popular decentralized exchanges in the space – PancakeSwap.
Decentralization brings power into the hands of the people. A decentralized exchange is a decentralized application (dapp) built on a blockchain that allows users to trade their assets in a decentralized manner. As a result, a user does not have to deposit their funds on the exchange. A DEX places control in the hands of the user. All the transactions that a user wants to perform take place via a crypto wallet, and for these transactions to take place, a user must pay fees which is very little compared to a centralized exchange. Hence, users can trade assets without actually depositing these assets on the exchange.
Every DEX is built on a blockchain. For example, UniSwap is a DEX built on the Ethereum blockchain, Raydium is a DEX built on the Solana blockchain, and PancakeSwap is a DEX built on the balance smart chain network. For interacting with a DEX, some fees are required. These fees are in very small amounts as compared to a CEX. The fees are paid in the underlying blockchain native token.
For example, to interact with UniSwap, a user is supposed to pay fees in ETH. For Raydium a user is supposed to pay fees in SOL and for PancakeSwap, a user is supposed to pay fees in BNB.
PancakeSwap is a decentralized exchange that is built on the Binance Smart Chain Network (BSC). PancakeSwap allows users to easily swap, stake, farm their crypto assets, participate in contests, and offer many more features.
To access PancakeSwap, a user must use a wallet connected to the Binance Smart Chain Network.
Furthermore, Users are supposed to pay fees in the form of BNB tokens, to perform any transaction on the dapp.
As specified above, we are supposed to use a crypto wallet to interact with a decentralized application. In this guide, I will use the MetaMask web extension wallet to perform any transactions with the DEX.
MetaMask is a crypto wallet where users can send, receive, swap, store, and buy digital assets easily and securely.
To learn how to connect your MetaMask with the Binance Smart Chain Network, click here.
The first step to accessing a DEX is to connect your crypto wallet; here, in our case, the MetaMask wallet. You can connect your crypto wallet by following the steps below:
Click here to go to the PancakeSwap application directly.
Your wallet is now connected to the DEX. Hence you can now interact with the DEX features.
Swapping refers to the process of converting one token to another. For example, converting BNB to ETH.
Users can swap their tokens the following way:
Once the swap is complete, in your wallet, you will notice a decrease in the quantity of the tokens you swapped with and an increase in the quantity of the tokens you swapped it for.
The limit option in pancake swap is the same as in trading. Limit here refers to a particular price you want to swap the respective token. You can set the price you want to perform the swap in the limit option. Only if the price is met then will the transaction get executed.
For example, you can set the limit price to $200 to swap BNB for BUSD. Only if the price of BNB reaches $200 will the transaction take place.
Used can swap their tokens using the limit option in the following way:
Once the limit price is met, the swap will be executed, and in your wallet, you will notice a decrease in the quantity of the tokens you swapped with and an increase in the quantity of the tokens you swapped for.
Liquidity refers to lending your crypto to the exchange to increase the liquidity of the protocol. A protocol having high liquidity will be able to execute transactions (swap) very easily.
Users are required to provide liquidity in the form of two tokens. Both tokens are required to be in 50-50 weightage.
For example, if you are providing liquidity to the USDT-BUSD pair, you are required to supply the same quantity of BUSD and USDT.
For liquidity, users have rewarded LP tokens that they can stake and earn a good yield. Furthermore, users are also rewarded 0.17% of the fees generated by the respective trading pair.
Users can provide liquidity by following the steps below:
Once the transaction is processed, you will notice the number of tokens you used to supply liquidity is decreased, and you will notice a new token in your wallet, the LP token.
Lets us now put our crypto to work. In the Earn section, we can earn yield for staking our tokens or LP tokens. This is similar to the concept of dividends in the stock market. Users are required to stake their tokens for a particular time (fixed) or flexible time and, depending on the yield rates, will earn the respective returns.
The farm option is similar to the pool option. The only difference is that users are required to stake their LP tokens in the farm option. By staking their LP tokens, users can earn a good additional yield on their tokens.
Users can stake their LP tokens by following the steps below:
To calculate your ROI follow the steps below:
Whatever returns are shown are not guaranteed. The APR fluctuates from day to day. So you can expect your results to be higher or lower.
Your LP tokens will now be earning you yield. Click on the harvest option after selecting your token to withdraw your yield.
The pool section is used to stake your tokens to earn yield. You can stake your tokens for a fixed amount of time or variable time. The yield rates for fixed staking are much higher than flexible staking.
Users can stake their tokens by following the steps below:
Follow the steps below for staking via locked or flexible method.
Flexible:
In flexible staking, users can withdraw their staked tokens whenever they please.
Locked:
In locked staking, users stake their tokens for a fixed time. Users will not be able to withdraw their tokens until maturity (similar to FD). Locked staking provides higher rates.
Once the transaction has been confirmed, you will notice the number of tokens you allocated to staking has been decreased in your wallet. Once the duration of your staking is complete, the tokens, along with interest will be automatically transferred to your wallet.
To calculate your ROI follow the steps below:
Whatever returns are shown are not guaranteed. The APR fluctuates from day to day. So you can expect your results to be higher or lower.
The prediction section is like gambling. Users can bet whether the price of $CAKE or $BNB will go up or down in 5 minutes. If the user predicts the right answer, they will receive their investment x the payout. If the user bets the wrong way, they will lose the entire investment.
For example, if a user invests $10, the payout is 2, and the user’s prediction is UP. If, after 5 minutes, the asset price goes up from the price the user entered, the user will earn 3*10 = $20.
Users can predict by following the steps below:
If you win, you will receive the payout and your initial investment directly in your wallet.
You must have noticed a slippage option when performing any transaction, such as swapping or adding liquidity.
Slippage refers to the price change between the expected order price and the executed order price.
For example, if your slippage is 10% and you wish to swap an asset, the asset may get swapped when the asset price is +10% or -10%.
To edit the slippage, follow the steps below:
There you go, you know now how to use a PancakeSwap Decentralized Exchange. Each blockchain (Ethereum, Avalanche, Solana) has its own DEX having various features. There are several risks associated with a DEX. Therefore, please conduct intensive research before connecting your wallet to a DEX. Many of these risks are related to smart contract hacks. But DEXs such as Pancake Swap, UniSwap, and DEXs in general, which have high liquidity and are very popular, are smart contracts audited. This means the DEX has a small chance of getting hacked. Furthermore, there are risks related to staking as well. A piece of advice to you is – to avoid investing in something too good to be true.
For example, neither invest nor stake coins that offer returns having huge numbers (APR /APY>1000). Normally these tokens end up being a Ponzi scheme and often go to zero. All the content in this article is purely for educational purposes and does not provide any financial advice.
Also, before visiting any dapp site, ensure that the URL is correct. You may do this by visiting the protocol’s social media profiles, such as Twitter, and using the links in the bio. There have been several scams as a result of phishing links.
If you have enjoyed this guide, please let me know in the comments and consider following. Thank you for your time.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.