When the UI is down on a Yield Farm, either because of a technical issue or a deliberate rugpull, you can still withdraw your funds by interacting directly with the Masterchef contract on bscscan.com. Please keep in mind that this will not work if the liquidity has already been drained from the pool.
Step1: Find the MasterChef contract #
How to find a MasterChef contract – RugDoc Wiki
Step 2a: Use Our Brand New Emergency Withdraw Tool #
As an alternative, we have a brand new tool available for you to use that will automate the rest of this process. Please check it out here:
Step 2b: Find the Pool ID (PID) for your pool #
If you are in a hurry, you can skip this step and conduct a series of Emergency Withdrawals starting with a PID value of zero and working your way up numerically. Eventually, you will hit the PID that corresponds to your pool.
How to Find the Pool ID (BSC) – Rug Doc Wiki
Step 3: Connect to your wallet #
At this point, you should be on the Masterchef page and will need to connect your wallet. Scroll down to the Transactions section and click the “Contract” tab.
Click the “Connect to Web3” link which will prompt you to connect to your wallet.
Step 4: Emergency Withdraw #
Once you’re connected, click “Write Contract” and scroll down to ” emergencyWithdraw”. Enter your PID (in this case 8) and click the Write button.
Unless the funds have already been drained from the pool, your crypto should now be back in your wallet.
Now you know how to use the emergencyWithdraw function to withdraw your funds without using the farm interface. Be sure to bookmark this guide and even try it out so you are ready for when you really need to withdraw in a hurry!