How to Manually Harvest Rewards from the Masterchef Contract (Binance Smart Chain)

chuddle
3 min readJun 8, 2021

When the UI is down on a Yield Farm because of a technical issue you can still harvest your rewards by interacting directly with the Masterchef contract on bscscan.com.

  1. The first thing you will need is the Masterchef contract. If your farm was reviewed by the RugDoc at RugDoc Farms List, a link to the Masterchef will be included in the details.
Click the “Masterchef” link

2. The second thing you will need is the PID for your LP or token. You can get this by going to bscscan.com and searching for your wallet address. Your address page will contain every transaction that you have made with that particular wallet. If you can find any transaction where you made a deposit to the pool in question, you can find the PID and even the Masterchef contract (if it’s not listed on the RugDoc site). Here is an example page containing the information we are looking for: Binance Transaction Hash (Txhash) Details | BscScan

3. The first thing to note on the Transaction Details page is the “Interacted With (To)”. This is the Masterchef Contract where you will be doing your harvesting.

4. At this point, we want to get the PID for the liquidity pool (in this case DOT) . Click the “Click to see More” link at the bottom of the page and scroll down to “Input Data”. Now this is where you might see differences depending on the Masterchef. Sometimes, you may see a “Decode Input Data” button. In this case, all you need to do is click that button and you will see the PID for the transaction. Note that this number is actually in hexidecimal format and can sometimes be a letter.

Click the Decode Input Data button
And there is your PID on the top row

5. If you do not see a Decode Input Data button with you will need to manually convert the hexadecimal character to a decimal which you can do here: Decimal to Hexadecimal Converter (rapidtables.com).

6. With the Masterchef contract address and PID in hand, you are now ready to manually harvest. Here is an example Masterchef page: Contract Address 0x78d443d733ca32d108d906275bd04507dd119bae | BscScan

7. Next, scroll down to the Transactions section and click the “Contract” tab.

8. At this point, you’ll need to click the “Connect to Web3” link which will prompt you to connect to your wallet.

Click “Connect to Web3”
You are now connected to your wallet

9. Once you’re connected, click “Write Contract” and scroll down to “Deposit”. Finally, enter your PID (in this case 20), enter a 0 for Amount and click the Write button. You funds should now appear in your wallet.

10. Shortcut method: If you don’t know your PID, just start at zero and work your way up numerically, checking your wallet each time.

--

--