> For the complete documentation index, see [llms.txt](https://remusdex.gitbook.io/remusdex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://remusdex.gitbook.io/remusdex-docs/architecture-and-concepts.md).

# Architecture & Concepts

## Mechanics & Architecture

RemusDEX matches buy and sell orders through an on-chain orderbook. Every interaction—from placing orders to confirming executions—happens within the Starknet framework. As trading activity rises, Starknet’s high throughput can handle the surge. This not only benefits RemusDEX users but also highlights Starknet’s ability to support elevated transactions per second (TPS), potentially enhancing its valuation and ecosystem traction.

<figure><img src="https://4035147079-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRVgLSrotDSeRUD3ctrup%2Fuploads%2F5A2fcvknRj0GPdwpCGck%2F20250115%20RemusDEX_%20Bringing%20On-Chain%20Orderbook%20Trading%20to%20Starknet.png?alt=media&amp;token=f2b08a9c-90d7-4013-aa68-6302ea4db391" alt=""><figcaption></figcaption></figure>

**Key** **Points**

* **Precision** **and** **Control**: Limit orders let you specify exact prices, appealing to traders used to centralized exchanges.
* **Full** **Transparency**: On-chain execution ensures that all trades remain auditable.

Ecosystem Growth: RemusDEX activity boosts Starknet’s composability and total transaction volume.

## Concepts

### Market Creation

* A **MarketConfig** is defined by base token, quote token, tick size, lot size, trading status, and fee settings.
* Only the contract owner can add or update market configurations.

### Order Types & Flow

* **Maker Orders**: Placed into the orderbook if not immediately filled.
* **Taker Behavior**: If a new order crosses the spread, it executes as a taker.
* **IOC**: Immediate fill or partial fill, then cancel leftover.
* **Post**: Reverts if the order would match on submission.
* **Basic**: Partial fill if crossing, then rest is posted as a maker.

### User Orders & Limitations

* A user can hold **up to 200 active orders** across all markets. Once fully or partially filled and closed, the slot is freed.

### Claiming Matched Funds

* Proceeds for matched orders are tracked in the DEX contract.
* Users must explicitly call `claim(token, amount)` to withdraw.
