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

# Dolomite Margin - Overview

[![GitHub](https://img.shields.io/badge/GitHub-dolomite--exchange%2Fdolomite--margin-lightgrey)](https://github.com/dolomite-exchange/dolomite-margin)[![GitHub](https://camo.githubusercontent.com/5dceaa06a5fa717da42e823e815c8a0b3a96310bc412c471d2d95ca4648707fe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d646f6c6f6d6974652d2d65786368616e6765253246646f6c6f6d6974652d2d6d617267696e2d2d6d6f64756c65732d6c6967687467726579)](https://github.com/dolomite-exchange/dolomite-margin-modules)

The Dolomite Margin protocol (A.K.A. `Dolomite Margin`) consists of smart contracts that run on various networks. These contracts support margin trading, borrowing, and lending.

Dolomite Margin is used by [app.dolomite.io](https://app.dolomite.io/) and [markets.worldlibertyfinancial.com](https://markets.worldlibertyfinancial.com/).

Dolomite was built to be as modular as possible while preserving the ethos of DeFi with immutable smart contracts. This is well exemplified below with Dolomite's architecture diagram:

<figure><img src="/files/y8Wmrn3Ljo6iJHlUKzoU" alt=""><figcaption></figcaption></figure>

A more in-depth explanation of the above diagram can be seen on the home page of the docs [here](/dolomite.md).


---

# 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:

```
GET https://docs.dolomite.io/developer-documentation/dolomite-margin-overview.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.
