Emergency withdraw
Being prepared for urgent cases is essential in order to be able to recover your funds, e.g. when the website is not accessible anymore.
In this article you will learn how you can withdraw your funds by direct interaction with the MasterChef contract. This is an essential step you should be prepared for before you enter a farm, as you will not have much time when you will need it.
You will find the list of masterchef farms & pool pid at the bottom of the article
When executing an emergency withdraw, you get back your funds immediately but with this function, you don't received any rewards from farms & pools

Step 1: Know the MasterChef address

In order to use the emergencyWithdraw function you need to know the address of the Masterchef contract and your pool number.

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: https://rugdoc.io/emergency/

Step 2b: Navigate to the contract

It’s always good to learn how to do it the old fashioned way, so here’s the rest of the tutorial:
Navigate to the contract via Polygonscan—a blockchain explorer– then double check the contract address and select the “Write Contract” button in the “Contract” tab.

Step 3: Connect your Wallet to the explorer

Click on the “Connect to Web3” Link..
..and choose your Wallet.
If you have multiple addresses in your MetaMask wallet choose the right one and click on “Next” in the MetaMask window.
Then connect your wallet by clicking “Connect”.
Maybe you have to refresh the page and click again on the “Connect to Web3” in order to get receive the connected status.
Now you are connected with the MasterChef and you can call the emergencyWithdraw function.

Step 4: Call the emergencyWithdraw function

Within the “Write Contract” section you’ll find a section called “emergencyWithdraw”.
Enter the pool ID (PID) of the pool you want to remove your funds from and click on “Write”. Remember to note down the pool ID in case of emergencies, as you will not have much time when you really need the emergencyWithdraw function.
Sign the transaction and you should get a confirmation that the emergency withdraw transaction was successful. If you were fast enough and the developer of the farm has not added some hard rug code in the emergency withdraw function you should now have your funds back in your wallet.
Now you know how to use the emergency withdrawal function by directly interacting with the contract. Being prepared for urgent cases is essential in order to be able to recover your funds, e.g. when the website is not accessible anymore.

List of Farms & Pools

Pid
Symbol
0
PEAR-WMATIC LP
LP 0x51BEffd36EB8c81a9b440B7ee51f98ba9eFda707
1
PEAR-USDC LP
LP 0xa1d88Ce0d030B51342a05f9Dcc10AC4214592DAc
2
PEAR
3
WMATIC
4
WETH
5
WBTC
6
WEXPoly
7
USDT
8
USDC
9
bscPEAR
This pool is used for the Polygon-BSC bridge. As long as this bridge is not active, all the tokens of this pool are burned. Update: Pool is disabled
10
LINK
11
BNB
Last modified 2mo ago