# Details

swaped\_tokens : list all tokens that have liquidity with MID token&#x20;

All pools are created with $MID as first token.

The swap function will allow to swap in both way&#x20;

MID <-> MEX or MEX <-> MID

first\_fee from a pool is applied on tokens sent by the user and used to increase liquidity.

second\_fee is applied on amount of tokens that the user receive and added as $MID staking rewards.

MID to MEX : MID are added to liquidity and MEX added as staking rewards

Dualswap function can use 2 pools position in one time . eg wegld to mex will be done in one time doing WEGLD <-> MID <-> MEX takin the fees only one time instead of two.

WEGLD to MEX : WEGLD are added to liquidity and MEX added as staking rewards.


---

# 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://docs.middlestaking.fr/contracts/swap-contract/details.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.
