> For the complete documentation index, see [llms.txt](https://dexible.gitbook.io/dexible-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexible.gitbook.io/dexible-sdk/overview/how-dexible-works.md).

# How Dexible Works

The Dexible infrastructure receives orders from traders via an API endpoint and continuously evaluates market conditions to determine if orders can be settled. In its current form, Dexible evaluates token swap orders by checking many DEX platforms for current pricing, etc.  When it determines that market conditions match order criteria, it submits transactions to Dexible's settlement smart contract, which then calls out to one or more DEX contracts to execute the actual trades.

### Privacy

The first thing to note about Dexible is that all orders are private. They are maintained in Dexible's order book which is not exposed to the public. Only order owners can query their order details--and ownership is established through digital signatures that are passed along in each API request. This alleviates concerns presented by other DeFi order books that tend to expose orders publicly or on-chain. Uniswap V3's limit order capability, for example, requires on-chain order exposure and cannot be used practically by professionals or institutional investors. Dexible's privacy feature allows for large orders with the additional benefit of automated order segmentation.

### Order Segmentation

Large orders are very risky in DeFi. Namely because of front-running and market impact. A key to minimizing these risks is to size and time the market based on active market monitoring. Dexible does this for its traders and optimizes input volume for each trade by breaking orders into smaller segments or "rounds". Each round submits a small portion of an order to minimize price impact, and thus losses. This is what makes Dexible different from simple limit or other automated order schemes in DeFi--it actively watches the market to yield the highest output on every round.

{% hint style="info" %}
The recommended number of rounds for any order quote is determined by comparing several input amounts and picking the one that yields the highest net output after removing fees. This can be adjusted using the "maxRounds" settings discussed later--but doing so may result in less overall token output.
{% endhint %}


---

# 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://dexible.gitbook.io/dexible-sdk/overview/how-dexible-works.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.
