> For the complete documentation index, see [llms.txt](https://docs.mesprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mesprotocol.com/overview/how-does-mes-work.md).

# How does MES work

1\. User deposits asset from source chain to MES’s smart contract

2\. Once the fund is received by the smart contract, MES’s node will execute a swap, the price is determined by Stableswap AMM algorithm, i.e. the price deduced will be based on liquidity of the input/output chain

3\. After the order is settled, the node will call the transfer function at destination chain and transfer asset to the user’s address on destination chain


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mesprotocol.com/overview/how-does-mes-work.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
