> For the complete documentation index, see [llms.txt](https://docs.trybasket.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trybasket.live/built-on-b20/architecture-overview.md).

# Architecture overview

This page shows the moving parts of Basket, the trust boundaries, and the addresses that should be public.

### System diagram

```mermaid
flowchart LR
    A[B20 basket token precompile] <--> B[Basket pool]
    B <--> C[Basket router]
    C <--> D[DEX liquidity on Base]
    B <--> E[Keeper or operator flow]
    F[Creator identity via Privy and X] --> C
    F --> B
```

### Components

* B20 basket token — the native token investors hold
* Pool — holds assets and controls mint and burn rights
* Router — handles deposit, redemption, and swap routing
* Keeper or operator flow — supports rebalancing where applicable
* Creator identity layer — ties the basket to a public X identity

### Address table

| Component              | Address                                      | Status                        |
| ---------------------- | -------------------------------------------- | ----------------------------- |
| B20 factory precompile | `0xB20f000000000000000000000000000000000000` | Known                         |
| Basket router          | `TBD`                                        | Pending deployment disclosure |
| Basket pool template   | `TBD`                                        | Pending deployment disclosure |
| Example basket token   | `TBD`                                        | Pending launch                |
| Example basket pool    | `TBD`                                        | Pending launch                |

### Responsibility map

| Component               | Main responsibility                    | Trust question                   |
| ----------------------- | -------------------------------------- | -------------------------------- |
| Basket token            | Represent basket ownership             | Who can mint or burn it?         |
| Pool                    | Hold backing and process redemption    | Can assets leave incorrectly?    |
| Router                  | Assemble and unwind positions          | Are routes safe and clear?       |
| Keeper or operator flow | Maintain target state where applicable | What can be changed and by whom? |
| Identity layer          | Attribute baskets to creators          | Who stands behind the strategy?  |

### Roles and security posture

| Role                 | Typical holder               | Purpose                                       |
| -------------------- | ---------------------------- | --------------------------------------------- |
| `MINT_ROLE`          | Basket pool                  | Mint supply when new backing enters           |
| `BURN_ROLE`          | Basket pool                  | Burn supply during redemption                 |
| `OPERATOR_ROLE`      | Managed basket operator flow | Support operational changes where applicable  |
| `DEFAULT_ADMIN_ROLE` | `TBD`                        | Final admin model depends on deployment       |
| `PAUSE_ROLE`         | `TBD`                        | Emergency control model depends on deployment |

Fixed baskets should minimize discretionary control after launch.

Managed baskets need a clear operator and admin model.

### Trust boundary

Non-custodial does not mean zero trust.

It means the trust is narrower and more inspectable.

| Component            | What you trust it for            | What you do not trust it for |
| -------------------- | -------------------------------- | ---------------------------- |
| Creator              | Strategy judgment and disclosure | Custody of funds             |
| Basket product layer | Clear routing and presentation   | Off-chain custody            |
| Pool                 | Backing and redemption logic     | Strategy authorship          |
| B20 layer            | Native token behavior            | Strategy quality             |

### Notes

Basket token addresses are deterministic B20 factory outputs.

Per-basket token and pool addresses should be published on each basket page.

{% hint style="warning" %}
Audit status is still pending.

Do not treat unpublished components as audited or finalized.
{% endhint %}

Read [Audits](/built-on-b20/audits.md) for the current audit status.

### What a technical reviewer should verify

<details>

<summary>Verification checklist</summary>

Check that the pool, not the creator, holds the backing.

Check that the pool holds `MINT_ROLE` and `BURN_ROLE`.

Check whether any operational roles remain after launch.

Check whether managed baskets disclose that the recipe can change.

Check whether memo usage is documented for supply events.

</details>

### What a full deployment page should add later

* Router address
* Pool implementation address
* Any operator or keeper address
* Published permissions model
* Audit report links once available


---

# 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.trybasket.live/built-on-b20/architecture-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.
