> For the complete documentation index, see [llms.txt](https://docs.trac.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trac.network/documentation/developers/mainnet/dapp-developer-guide/introduction.md).

# Introduction

### What are MSB and `trac-peer`?

#### MSB (Main Settlement Bus)

**MSB is the base network** that provides:

* transaction ordering / global log
* fee + anti-spam rules
* “finality” (confirmed/signed state)

If you want anything to be considered “settled on Trac”, it must exist in MSB confirmed state.

#### `trac-peer`

`trac-peer` is the **application layer**.

Each `trac-peer` instance runs (and participates in) a **subnet**: a smaller P2P network that:

* replicates its own ordered log
* executes a deterministic Contract locally on each node
* exposes RPC so wallets/dApps can interact with that Contract

In short: **MSB settles**, and **trac-peers run the apps/contracts**.

***

### What is a subnet (in one paragraph)

`trac-peer` runs a **subnet**: a smaller peer-to-peer network that maintains an ordered log and derives a deterministic application state from it (a contract/state machine).

For economic finality and anti-spam rules, transactions are **settled on MSB** (Main Settlement Bus). Subnet nodes only execute contract operations locally once they can prove the referenced transaction exists in MSB confirmed state.

***

### Who are you? (choose your path)

#### “I just want to run it locally”

Start with:

* [Quickstart](/documentation/developers/mainnet/dapp-developer-guide/quickstart.md)
* [Bootstrap checklist](/documentation/developers/mainnet/dapp-developer-guide/bootstrap-checklist.md) (canonical step-by-step)

#### “I want to run an RPC endpoint for wallets/dApps”

Start with:

* [RPC](broken://pages/PX3IMNof4JZz5LvB71MB)
* [Production notes](/documentation/developers/mainnet/dapp-developer-guide/production-notes.md) (ops/security notes)

#### “I want to build an app/contract on trac-peer”

Start with:

* [App dev](/documentation/developers/mainnet/dapp-developer-guide/app-dev.md)
* [Intercom example](/documentation/developers/mainnet/dapp-developer-guide/references-examples/intercom.md) (real project example)

***

### Core concepts (minimal)

* **MSB (Main Settlement Bus)**: the settlement layer. Transactions become “real” when MSB confirms them.
* **Subnet**: the P2P application layer. A subnet has:
  * a discovery **channel** (`--subnet-channel`)
  * a bootstrap/join-code **bootstrap** (`--subnet-bootstrap`, 32-byte hex)
* **Protocol**: defines how user commands map into typed ops: `{ type, value }`.
* **Contract**: deterministic state machine that executes those typed ops and writes state under `app/...`.
* **Operator vs client**:
  * operator uses CLI (admin/writer/indexer/chat/deploy)
  * client (wallet/dApp) uses RPC (schema/context/state/tx submit when enabled)

***

### One “golden” mental model

When a user “calls a contract function” they are not invoking code remotely.

Instead:

1. a client prepares a typed command `{ type, value }`
2. the wallet signs the transaction hash (MSB operation `type = 12`)
3. the peer broadcasts it to MSB (fees apply)
4. once MSB confirms it, the subnet appends a reference op
5. every subnet node executes the same contract logic locally and derives the same state

***


---

# 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.trac.network/documentation/developers/mainnet/dapp-developer-guide/introduction.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.
