When the UI is down on a Yield Farm, either because of a technical issue or a deliberate rug pull, you can still withdraw your funds by interacting directly with the Masterchef contract on Fantom. Please keep in mind that this will not work if the liquidity has already been drained from the pool.
Step 1. Find the MasterChef contract address #
First of all, we need to find the MasterChef contract address. In this example, we will use AutoBotDefi (Fantom)’s MasterChef.
You can find a farm’s MasterChef contract address either by looking at our reviewed farms list on our website rugdoc.io or by looking on the docs page of the farm. If you’re still confused, check out this guide.
Step 2a: Use Our Emergency Withdraw Tool #
We have a 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.
Step 3: Connect to your wallet #
You now should be on the Masterchef page and will need to connect your wallet. Scroll down to the Transactions section and click “write contract” under the “Contract” tab.
Click the “Connect to Web3” link which will prompt you to connect to your wallet.
Then you will connect to your wallet.
Step 4: Emergency Withdraw #
Once you are connected, click “Write contract” and scroll down to “emergencyWithdraw”. Enter your PIF and click the Write button.
Unless the funds have been drained from the pool, your crypto should now be back in your wallet.
Now you know how to use the emergency withdraw function to withdraw your funds without using the farm interface. Please share this article if you found this guide helpful!