How to withdraw from rugpulled Polygon DeFi pool

Aggy Erlangga
3 min readJun 30, 2021

How to do emergencyWithdraw your funds from DeFi pool.

Photo by Andre Taissin on Unsplash

Polygon is one of rising project adopted by many DeFi or Dexswap. With this current speed, there are many high risk projects associated with this. One of them is PolyYield Finance https://polyyield.finance/ which is impersonating PolyYeld Finance. You can check it is listed as High Risk project in Rugdoc https://rugdoc.io/.

https://rugdoc.io/

Firstly, I invested in this project after reading some reviews from Cryptozoa https://medium.com/cryptozoa/make-6-000-month-for-9-000-invested-945bc4de215c. My bad, not double checking and researching further towards some projects involved. ALWAYS DO YOUR OWN RESEARCH.

I have staked 75 $WMATIC and 0.048 $WETH (Polygon) to earn some $YIELD token. Of course, now the web pool is not accessible, I can’t screenshot the APY there. And, so how do I get out from rugpulled Pool ?

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 ID number. You can go into Rugdoc and find Masterchef here.

And then, I got helped from the community members from Yeld Finance telegram group.

PID in PolyYield contract

Step 2: Navigate to the contract. 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.

https://polygonscan.com/address/0x9eaacd7d41fdde61314eeeb61326c06402b9bfe3#writeContract

Step 3: Connect your Wallet to the explorer. Connect your wallet as usual to Metamask or where you keep the funds.

After connected, now you are connected with the MasterChef and you can call the emergencyWithdraw function.

Step 4: emergencyWithdraw. 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”. 2 is $WMATIC pool in PolyYield as in above PID.

Emergency Withdraw

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.

And done….my $MATIC and $WETH is back into my 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.

Malicious, scam, and rugpull projects will not stop me from investing in crypto or DeFi. Curiosity, risk appetite and well preparation are the key.

HAPPY INVESTING!

--

--

Aggy Erlangga

Digital hustler on crypto, tech and money making enthusiast.