# Slippage and Gas

Properly configuring slippage tolerance and gas settings in JuiceBot is crucial for successful, cost-effective, and secure cryptocurrency trading. Misconfigurations can lead to failed transactions, higher costs, or exposure to MEV (Miner Extractable Value) attacks.

This guide explains these concepts and how to adjust them safely.

### Slippage

#### What Is Slippage?

Slippage is the difference between the expected price of a trade and the actual execution price, often due to market volatility or low liquidity.

#### Why It Matters

* **Price Protection:** Prevents significant price deviations by canceling trades if the market moves beyond your tolerance.
* **Trade Execution:** Too low a tolerance may cause failures; too high exposes you to unfavorable prices and MEV attacks.

#### MEV Attacks and High Slippage

* **MEV (Miner Extractable Value):** Profit miners or validators can gain by manipulating transaction order, leading to front-running and sandwich attacks.
* **Risk with High Slippage:** Signals you’re willing to accept wide price variations, making you a target for attackers who exploit this to profit at your expense.

#### Setting Slippage Safely in JuiceBot

{% stepper %}
{% step %}

### Access Settings

Navigate to slippage settings in JuiceBot by clicking the Settings button in the Main Menu or typing `/settings`.
{% endstep %}

{% step %}

### Adjust Tolerance

* **Stable Markets:** Set between 0.1% – 1%.
* **Volatile Markets:** Upwards of 1%, but be cautious.
  {% endstep %}
  {% endstepper %}

***

### Gas Fees

#### What Are Gas Fees?

Gas fees compensate miners or validators for processing transactions on networks like Ethereum. Fees fluctuate with network demand.

#### Components of Gas Fees

* **Base Fee (Gas):** Minimum per-unit gas price, adjusts with network congestion.
* **Priority Fee (Tip):** Extra amount to incentivize miners to prioritize your transaction.

#### Importance of Gas Settings

* **Transaction Speed:** Higher priority fees can expedite confirmations.
* **Cost Control:** Appropriate gas limits prevent overpayment or failed transactions due to insufficient gas.

#### Setting Gas and Priority Fee in JuiceBot

{% stepper %}
{% step %}

### Check current Gas prices

{% endstep %}

{% step %}

### Access Gas Settings

In JuiceBot’s **Settings** or **Token View** menus.
{% endstep %}

{% step %}

### Adjust Fees

* **Gas (Base Fee):** Auto-adjusted.
* **Tip (Priority Fee):**
  * Standard Transactions: Use NONE.
  * Urgent Transactions: Increase the tip **LOW, MED,** or **HIGH** to expedite.
    {% endstep %}
    {% endstepper %}


---

# 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://juicebot.gitbook.io/juicebot/settings/slippage-and-gas.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.
