# Emergency Whitdraw

MasterChef provides a method named *emergencyWithdraw* that you can use in case of any technical issue with our dApp (like a failure, a cyber attack -eg. DDOS- or a prolonged downtime).\
In order to perform an emergency withdrawal, follow these steps:

1\. Find the ID of the farm or pool you want to withdraw all your funds from\
(Look for [PIDS ](https://caramelswap.gitbook.io/caramelswap/farm-and-pool/farm)on tab [FARM ](https://caramelswap.gitbook.io/caramelswap/farm-and-pool/farm)AND [POOL](https://caramelswap.gitbook.io/caramelswap/farm-and-pool/pool))

2\. Go to the Masterchef contract on Bscscan

3\. Connect to Web3 (Eg. using your MetaMask wallet plugin)

![](/files/-MXLTKbFy2fO-njwpxRN)

4\. Scroll the page down to the emergencyWithdraw method

![](/files/-MXLTNdZn0KymaFuGm0U)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://caramelswap.gitbook.io/caramelswap/safe/emergency-whitdraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
