# Intents - How orders work

Most centralized exchanges work like this: you send the exchange a plaintext request like "buy 100 BTC at $60k", the exchange matches it, and you trust them. If they go rogue, you have no recourse.

MoveX uses **signed intents** instead. Every order you place is a structured message that you sign with your wallet, and that signature is verified on-chain before any settlement happens.

#### What's in an intent?

```
TradeIntent {
  trader:      0xYourAddress
  market:      0xBTC_MOVE_WEEKLY_address
  isBuy:       true
  maxSize:     1.25  ← max contracts you're willing to take
  priceLimit:  $2,500 ← worst price you'll accept
  collateral:  $150  ← how much margin you're committing
  leverage:    2.00x
  deadline:    timestamp after which this expires
  nonce:       monotonic counter to prevent replay
}
```

You sign this with EIP-712, which produces a 65-byte signature. The intent + signature travels to the sequencer, which forwards it to `BatchSettler.batchSettle()` on-chain.

#### What the contract guarantees

When the on-chain `Market.settleTrade` runs against your intent, the contract verifies:

* **Your signature is valid** and matches the intent's `trader` address.
* **The nonce hasn't been used before** (anti-replay).
* **The deadline hasn't passed**.
* **The fill price respects your `priceLimit`** - buys can't be settled above the limit, sells can't be settled below.
* **The fill size respects your `maxSize`** - at the fill price, the implied size is within what your collateral and leverage support.

If any of these checks fail, the entire settlement reverts. **You cannot be filled on terms you didn't sign.**

#### Why intents are powerful

1. **No trust required.** The sequencer can't make up fills. Whatever settles on-chain is provably what you authorized.
2. **No custody.** Your collateral never leaves the Hub contract except via a signed deposit/withdrawal you authorized.
3. **Atomic batches.** Multiple intents settle together or not at all - no half-finished trades.
4. **Predictable risk.** You know exactly the worst execution you can get, because you signed the limits yourself.

***


---

# 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.movex.market/architecture/intents-how-orders-work.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.
