Ultimate Guide to Farming on PancakeSwap

DCV - October 14, 2021


This article will provide some background on concepts revolving crypto farming and detail step by step how farming can be done on the PancakeSwap decentralized exchange (DEX). The article will be kept as simple as possible so that it is easy to understand. If you're too lazy to read through the article, a YouTube tutorial is at the end of this page.

Here is a list of acronyms used in this article for reference:


  • dapp = decentralized application
  • DEX = decentralized exchange
  • CEX = centralized exchange
  • ETH = Ethereum
  • BTC = Bitcoin
  • BNB = Binance coin
  • CAKE = PancakeSwap coin
  • BSC = Binance Smart Chain
  • LP = liquidity provider (ie people wanting to farm)
  • APR = annual percentage rate

What Is Farming AKA Liquidity Mining?

Essentially, farming is using a pair of cryptocurrencies, depositing it to a DEX for other people to trade, and profiting off of the trading fees. The thing that people deposit their pairs of crypto in are called liquidity pools, and the people that do the depositing are called liquidity providers or LPs for short.

For example, LP John has $10 worth of ETH and $10 worth of BTC. John deposits (AKA stakes) the pair, with a total value of $20, into a ETH-BTC pool. Now, his crypto is working for him as traders with ETH will swap for BTC in the pool and, similarly, traders with BTC will swap for ETH in the pool. Therefore, John is add liquidity to the pool. Liquidity means how easy it is to trade one thing for another. Cash is very liquid. Single family homes are not.

As traders swap, they must pay fees to verify the transactions on the blockchain. Some of those fees that they pay goes to LP John.

Whenever John wants, he can pull his ETH and BTC out of the pool. At the time he pulls his crypto out, if the value of ETH and BTC did not change, his profit will be all the trading fees that were paid to him from the pool. In total, he will have $20 worth of ETH and BTC plus the trading fees. The rate at which the trading fees are paid out are defined by the APR or the annual percentage rate.

Risks Of Farming

1. Impermanent Loss

The biggest risk of farming is a concept called impermanent loss. It is the "paper" loss when a LP's crypto pair is in the pool and one currency's value changes drastically with respect to the other. The loss is real when the LP pulls their crypto out of the pool.

For example, John stakes his ETH-BTC pair and during his stake, ETH jumps 20% with respect to BTC. If he pulls his crypto out at this time, he incurs impermanent loss. The mechanism behind the loss is better explained by this video:

Another example, say John participates in a ETH-BETH pool where BETH is the "wrapped" ETH pegged token on the Binance Smart Chain (BSC). BETH's value follows ETH at a 1 to 1 ratio. Because the ratio is always 1 to 1, impermanent loss is minimized.

The takeaway here is: to avoid permanent loss, the ratio of the value between the crypto pair needs to be the same when the LP stakes it and when the LP pulls it out of the pool. Otherwise, impermanent loss is incurred. And yes, if the values of the pairs BOTH increase but at different rates, impermanent loss is still possible.

Not all it lost though because if the value ratio changes only slightly, the trading fees that the LP was paid can make up for the impermanent loss.

2. Other Risks

The liquidity pools and DEXs are coded by developers and some may be malicious or scammers. Also, the code my have bugs in the them as they might not be audited by a credible third party.

Generally, sticking with DEXs on the Binance Smart Chain like PancakeSwap are safe.

(D)apps Needed To Farm On PancakeSwap

Here are the 3 (d)apps needed to start yield farming:


  1. Binance (which is a centralized exchange or CEX)
  2. Metamask Wallet
  3. PancakeSwap (obviously)

If you don't have Binance installed, please use my promo link to support decryptoverse: https://accounts.binance.us/en/register?ref=57344078.

Metamask is a browser extension and a mobile app that acts as a cryptocurrency wallet. It supports both Ethereum and ERC20 tokens and BEP20 tokens for running smart contracts on the BSC. Watch this video to setup a Metamask wallet and connecting it to the BSC:

For PancakeSwap, you don't need to install anything. Metamask connects directly to the PancakeSwap website.

Getting Started Farming on PancakeSwap: Step-By-Step Tutorial

This process is an example using a web browser. Prior to starting, accounts on Binance and Metamask are needed. Also, Metamask needs to be connected to the BSC. You can check out how to do that in this article, by following Binance's official docs, or following the YouTube video above.

The crypto pair I stake is BNB-CAKE. Other crypto pairs can be used but that's what I am using. CAKE is the cryptocurrency associated with the PancakeSwap dapp.

The full YouTube video of this tutorial can be found at the end of this article.

Step 1. Buy BNB on Binance US

The easiest way to do this (besides using the mobile app) is to go to https://www.binance.us/en/buy-sell-crypto and search for BNB.

I'm using BNB because that is what the Binance blockchain, and thusly, PancakeSwap, runs on. ETH would not work.

Step 2. Send BNB to Metamask address

In Binance, click "withdraw" in the wallet.

Enter the amount of BNB to withdraw and select "BEP20" in the "Network" dropdown menu. This is very important because the BSC runs on the BEP20 standard. Sending the BNB tokens to the BEP2 network would not work for this purpose.

Copy the Metamask wallet address making sure that the network is the Binance Smart Chain network. Paste the address into Binance and double check that the address is correct.

Click "Preview Withdrawal" and ensure everything looks right. Binance will charge a fee but it's usually very small. Then, click "Confirm Withdrawal".

Wait for the transaction to go through and confirm that the funds are in Metamask.

Step 3. Connect Metamask to PancakeSwap

Navigate to the PancakeSwap website and at the top right corner, there should be a button that says "Connect Wallet". Click it.

Select Metamask and as long as I'm logged into Metamask on my browser, PancakeSwap should automatically detect it and connect.

Step 4. Trade for some CAKE coin

Since I'm participating in the CAKE-BNB pool, and I only currently have BNB, I need to trade some BNB for some CAKE. At the top left, click "Trade".

The value ratio of my CAKE to BNB ratio should be roughly equal and I want to leave some BNB in my wallet to cover fees so I need to convert a little less than half of my BNB to CAKE. I'm going to stake about 0.1 BNB and whatever that equivalent is in CAKE.

After typing in the BNB amount, search for "CAKE" in the next field and click "Swap".

There's a small fee to required for this transaction. Click "Confirm Swap". Metamask will popup to prompt for confirmation. Click "Confirm". My total transaction fee was 41 cents.

Now I can see that I have both BNB and CAKE in my Metamask wallet.

Step 5. Create LP Token to add liquidity

Go to the "Trade" tab again but this time instead of selecting "Exchange", select "Liquidity".

Click on "Add Liquidity" and select the BNB for the first currency and CAKE for the second.

Input the amount for each currency. I used "Max" for each. Then, click "Enable CAKE".

Metamask will pop up to ask for confirmation, and this transaction also costs a fee (roughly 11 cents). Click "Confirm" in Metamask.

Then, click "Supply" and "Confirm Supply" after reviewing the info. Metamask will pop up again for confirmation. Another fee is required here (roughly 50 cents).

Add the CAKE-LP token to Metamask. Then, the balance can be seen on the Metamask wallet.

Step 6. Add the CAKE-LP token to the proper farm/liquidty pool

Once the CAKE-LP token is available on Metamask, head to the "Earn" tab and select "Farms".

Find the CAKE-BNB farm and expand the block to see the options. Click "Enable". This will pop up Metamask again to ask for confirmation and a fee is required here (10 cents). Click "Confirm".

Wait a few seconds for the blockchain to confirm the transaction. Then, a "Stake LP" button should be enabled. Click it and select the amount to stake. I used the max and click "Confirm".

The annual return on investment estimated is about $56, on a initial investment of about $93. That's pretty damn good relative to traditional investments like bonds or savings accounts (not investment advice).

Metamask will pop up one last time to ask for confirmation, and this incurs another fee (.001 BNB max). Click "Confirm" and wait for the confirmation to happen.

After it does, PancakeSwap should automatically detect this and notify you that "Your funds have been staked in the farm".

And that's it. Now, my crypto is working for me, passively generating more income.

Fee Summary:

At each step of this process, transaction fees were charged to validate the transactions on the blockchain. Let's take a look at those (keep in mind fees are changing all the time and this is what I paid):


  1. Transferring BNB from Binance to Metamask: 0.0005 BNB (~23 cents)
  2. Swapping BNB for some CAKE: .000672 BNB (~41 cents)
  3. Creating CAKE-LP token: .00022 (~11 cents)
  4. Supplying the LP token: .000698 (~50 cents)
  5. Staking to the CAKE-BNB farm, spending LP token : .00022 (~11 cents)
  6. Staking to the CAKE-BNB farm, contract interaction : .00037 BNB (~17 cents)

Total fees paid: ~.00268 BNB ($1.53)

Here is the YouTube video to follow along with this tutorial:



Disclaimer: decryptoverse.com does not provide tax, business, legal, investment, or accounting advice. This material has been prepared for entertainment purposes only, and is not intended to provide, and should not be relied on for, tax, business, legal, investment, or accounting advice. You should consult your own tax, business, legal, investment, and accounting advisors before engaging in any transaction. The information on this website should not be misinterpreted as an endorsement to buy, trade or sell a cryptocurrency, nonfungible token, or any specific product or service or application.