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

# Trading

Libre has an on-chain orderbook — real bids and asks in a contract, not an automated market maker curve. Two pairs trade today: **BTC/USDT** and **LIBRE/BTC**.

[Trade →](https://defi.libre.org/dex)

## What's different about it

**There is no protocol trading fee.** Not a low fee — none. The `dex.libre` contract has no fee parameter, no fee recipient and no fee action; its entire configuration is a pause switch. What you bid is what you pay.

**Nobody approves you.** No KYC, no account application, no listing committee. An account is a keypair. If you can sign, you can quote.

**It's an orderbook, not an AMM.** You place a limit order at your price and it rests in the book until it fills or you cancel it. No slippage curve, no impermanent loss, no LP position to manage.

**Orders land in well under a second.** Libre produces a block every half second. Full irreversibility takes about three minutes, which matters if you're settling something on top of a trade, but not for placing and cancelling quotes.

## How an order works

Orders are placed by **sending tokens to the DEX contract with a structured memo**. The transfer is the order; the memo is its terms.

* **Buy BTC:** transfer USDT to `dex.libre` with memo `buy:<amount> BTC:<price> USDT`. The transfer locks amount × price of USDT.
* **Sell BTC:** transfer BTC to `dex.libre` with memo `sell:<amount> BTC:<price> USDT`. The transfer locks the BTC.
* **Cancel:** call `dex.libre::cancelorder` with the order id and pair. Locked funds return to you immediately.

Prices for `librebtc` carry **10 decimal places**, not the 8 that BTC itself uses — LIBRE is cheap enough in BTC terms to need them.

The live book is table `orderbook2` on `dex.libre`, scoped by pair; fills land in `history2`.

{% hint style="info" %}
You don't have to build memos by hand. The [MCP server](/libre-docs/for-developers/overview/mcp-server.md) composes orders, cancellations and everything else for you — as unsigned transactions you sign yourself.
{% endhint %}

## The state of the book

Being honest about this: **the book is thin and the spread is wide** — frequently several percent between best bid and best ask, with days passing between fills.

For anyone hoping to hit a tight market, that's a real limitation, and you should check [the live book](https://defi.libre.org/dex) before assuming you can trade size.

For a market maker it's the opportunity. There is no fee to earn back, no rebate scheme to game, and very little competition. A bot quoting both sides inside the current spread, hedged against the [oracle price](/libre-docs/understanding-the-platform/mechanics/price-oracle.md), is the most obvious unclaimed edge on the chain.

## Trading and borrowing compose

The thing Libre can do that a standalone DEX can't: **your collateral and your execution live on the same chain**.

You can lock BTC in a [vault](/libre-docs/core-features/overview.md), borrow USDT against it at up to 60% LTV, and trade that USDT on the same chain in the same transaction sequence — no bridge, no exchange deposit, no custodian in between. Repay whenever you like and withdraw the Bitcoin.

That also means leverage is available without a perp venue: deposit BTC, borrow, buy more BTC, redeposit. At 60% maximum LTV that tops out near 2.5× in theory, and realistically 1.5–2× before you're sitting at the liquidation threshold.

{% hint style="warning" %}
**Check the spread before you loop.** Every turn of that loop buys BTC on the book. While the spread is several percent, a single loop can cost you more than a year of borrow interest. The strategy is only as good as the price you actually fill at.
{% endhint %}

→ [Borrowing](/libre-docs/core-features/overview.md) · [Liquidation](/libre-docs/understanding-the-platform/mechanics/liquidation.md)

## For bots

Everything above is reachable programmatically, and the protocol makes no distinction between a person and an agent — there is no API key, because there is no API to be granted access to. There is a chain, and there are signatures.

→ [Building agents on Libre](/libre-docs/for-developers/overview/mcp-server.md)
