# Swap Modes

City Protocol's swap client supports multiple execution modes that reflect different user intents and execution guarantees:

{% tabs %}
{% tab title="exactIn Mode" %} <mark style="color:$primary;">**exactIn Mode:**</mark>&#x20;

The user specifies an exact input amount, and the aggregator returns the best achievable output for that input under the given slippage tolerance.
{% endtab %}

{% tab title="exactOut Mode" %} <mark style="color:$primary;">**exactOut Mode**</mark>

The user specifies an exact desired output amount, and the aggregator calculates the required input needed to meet it.
{% endtab %}

{% tab title="MEV-Protected Swaps" %} <mark style="color:$primary;">**MEV-Protected Swaps**</mark>

Available on Solana through the optional `jitoUnsignedTx` field in the execution response, enabling bundled transaction submission via Jito's block-building infrastructure for protection against sandwich attacks and front-running.
{% endtab %}
{% endtabs %}


---

# 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://city-protocol.gitbook.io/docs/neofinance-as-a-service/swap-module/swap-modes.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.
