# MEV Protect

MEV (Maximal Extractable Value) refers to the maximum profit that can be extracted from the block production process on a blockchain, beyond the standard block reward and gas fees, through the inclusion, exclusion, and reordering of transactions in a block.

In the context of trading, this can manifest in tactics such as:

* **Front-running:** A bot detects your pending transaction (e.g., a large buy) and submits its own transaction (buy) with a higher fee to be executed first, profiting from the price increase caused by your transaction.
* **Sandwich Attack:** A bot places a buy order before your large purchase (front-running) and a sell order immediately after your purchase, profiting from the price difference created by your transaction.

The "MEV Protect" feature in HunterBot aims to mitigate these risks, typically by routing your transactions through private services or relays that prevent them from being visible in the public mempool before execution, or using other strategies to make front-running more difficult or less profitable.

***

**How to Set Up:**

1. Go to the `/settings` menu.
2. Select the "MEV Protect" option.
3. The options may include:
   * **Enable/Disable:** A simple button to turn MEV protection on or off.
   * **Select Provider (Optional):** Some bots may allow you to choose between different MEV protection services (e.g., Jito, Flashbots – although Flashbots is more associated with Ethereum).
   * **Protection Level (Optional):** There may be different levels of aggressiveness in the protection.

***

**Benefits:**

* Reduces the risk of getting a worse execution price due to front-running or sandwich attacks.
* Can lead to better trading outcomes, especially for volatile tokens.

***

**Considerations:**

* **Possible Latency:** Routing transactions through private relays may, in some cases, introduce slight latency compared to sending directly to the network.
* **No Absolute Guarantee:** While MEV protection significantly reduces the risk, no solution is 100% foolproof against all forms of MEV.

It is generally recommended to keep MEV protection enabled unless you have a specific reason to disable it (e.g., absolute speed requirements in a transaction where the risk of MEV is considered low).


---

# 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://hunterbot-docs.gitbook.io/hunter-bot/settings/mev-protect.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.
