# General DeFi Settings

## 1. General Settings

### Monitor

* Which GRPC is used to monitor during the task

### Amount in SOL

* The amount of SOL to exchange for the token

### RPC

* Which RPC is used to execute the trade

### Buy Slippage

* The maximum amount of slippage allowed during the trade

### Max Open Positions

* The maximum amount of positions open at once
* When a token is sold, it is no longer an open position

### Min & Max Market Cap

* The range limits the token must be within to be purchased

### Mev Protection

* Enable to use Lunars custom MEV protection

### Block Timeout

* If a transaction is not successfully included within a specified number of blocks (X), it will be automatically canceled

### Test Mode

* Select to enable Test Mode

{% hint style="info" %}
No Tx will be sent, Lunar will mimic the trade and provide you real time information on the trade. More information can be found here
{% endhint %}

### Test Mode Block Difference

* The block difference for test mode transactions
* can be a range, e.g. 0-5&#x20;

### Custom Webhook URL

* Send all task notifications to a custom webhook
* If empty, they will be sent to the webhooks in [settings](https://guide.lunarlabs.gg/getting-started/general-settings)

<figure><img src="/files/U96g9nQOhuQZj5SvGkT6" alt=""><figcaption><p>Images are for illustrative purposes only</p></figcaption></figure>

## 2. Spam

### Buy & Sell Retry Tx Delay

* The delay between each tx sent (in ms)

### Min & Max Priority Fees Buy & Sell

* Priority fee sent for each tx buying or selling the token
* To used a fixed fee, set the min & max as equal

{% hint style="warning" %}
Priority fee's will be spent on every TX sent, including failed

It is recommended to set a lower priority fee and a higher bribe
{% endhint %}

### Buy & Sell Tx Amount & Retry

#### Amount

* Maximum amount of tx to send per attempt

#### Retry

* Maximum amount of attempts

{% hint style="info" %}
A tx amount of 3 & a retry of 10 would send up to 30 tx until a tx is confirmed
{% endhint %}

<figure><img src="/files/6al1avnIAqLW73ykiT5Y" alt=""><figcaption><p>Images are for illustrative purposes only</p></figcaption></figure>

## 3. External

### Buy & Sell Tip

* Amount of SOL used to bribe/tip a provider to increase your tx speed

{% hint style="info" %}
Only spent on successful Tx
{% endhint %}

### Services

* Select what providers you want to use
* You must select at least one for a tip to be used
* You don't need a tip, but is recommended

{% hint style="success" %}
You can use and select multiple providers simultaneously
{% endhint %}

{% hint style="warning" %}
You will only pay the tip on the successful TX, but you will still pay PRIO fees on the other TX
{% endhint %}

<figure><img src="/files/4F83QU4FACLMApTFWHeO" alt=""><figcaption><p>Images are for illustrative purposes only</p></figcaption></figure>

## 4. Take Profits

* Positions Lunar will execute sells at
* You can create an unlimited amount

### Field 1 **- Position %**

* How much of the position to sell

### Field 2 **- Profit %**

* How much profit % to trigger the sale

### Field 3 **- New SL (Optional)**

* The new SL for your position (will sell 100%)
* Only active once the sale is triggered

<figure><img src="/files/TdgX6bNWsJn0RDsCY4Dm" alt=""><figcaption><p>Images are for illustrative purposes only</p></figcaption></figure>

## 5. Sell

{% hint style="success" %}
You can find a detailed explanation of the SL's [here](/sls-explained.md)
{% endhint %}

### Trailing Stop

* A stop loss (%) that is adjusted according to your take profit positions

### Stop Loss

The stop loss as a fixed %

{% hint style="info" %}
Both of these stop losses will close your position (sell 100% of your holding)
{% endhint %}

<figure><img src="/files/2AtqsFxPOlOjMtGaTtNh" alt=""><figcaption><p>Images are for illustrative purposes only</p></figcaption></figure>


---

# 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://guide.lunar.trade/defi/general-defi-settings.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.
