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

# How Sidepit Works

The technical model behind Sidepit's fair exchange and Bitcoin account boundary.

Sidepit is a Bitcoin-margined forwards exchange with a public signed-message protocol. It combines a central exchange engine with transparent inputs, deterministic auction timing, observable outcomes, and owner-controlled Bitcoin account actions.

## DLOB market structure

**DLOB — one-second deterministic auctions** divide trading into one-second epochs. Signed transactions accepted for an epoch are deterministically sequenced, then matched by a central limit order book.

Within the same epoch, an earlier arrival does not gain priority over a better price. This removes the race for the shortest cable or fastest processor from the matching rule. It does not guarantee a fill or a particular price; liquidity and order instructions still determine the result.

DLOB creates a free market for the speed advantage on top of the free market for the asset, once each second. In this protocol, MEV and HFT do not determine matching priority.

## Signed public protocol

Clients communicate with `api.sidepit.com` over NNG using protobuf messages. Orders and account actions are secp256k1-signed. Market data, auction clocks, orders, fills, rejects, positions, margins, and account-operation records are available through public protocol surfaces.

The canonical public contract is [`sidepit_api.proto`](https://github.com/sidepit/Public-API-Data/blob/main/sidepit_api.proto). Client builders should describe only fields present in that public file.

## Bitcoin account boundary

The connected Native SegWit address is the account. A LOCK transaction must spend from that Sidepit ID so the exchange can recover the account's public identity from the input and credit the correct account.

The owner key controls money movement and agent permissions. A separate delegated key may trade for the account, but cannot perform owner actions. This is enforced when signed transactions are verified, not merely by a user-interface role.

## Account truth

Clients should use server-published state instead of reconstructing balances or positions from memory:

* request/reply provides point-in-time account and market reads;
* feeds provide continuous market, order, fill, rejection, and margin events while the exchange is open;
* deterministic public IDs join each submitted intent to later observations; and
* terminal records override an older pending receipt.

Read [Public API and SDKs](/users-and-agents/api.md) for the current surface.


---

# 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://docs.sidepit.com/use-sidepit/beta/l2-overview.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.
