# Architecture overview

FastTrack is two pieces working together: a Chrome extension running in your browser, and a backend service that holds your custodial Solana wallet and signs transactions on your behalf.

## High-level flow

1. You install the extension. It overlays trading controls on every axiom.trade token page.
2. You generate a custodial wallet through the extension. The private key is encrypted and stored on our backend — never in the browser, never on disk.
3. You click a buy or sell preset.
4. The extension sends an authenticated request to our backend describing what you want to trade.
5. The backend builds a Solana transaction, signs it with your wallet, and submits it to the network.
6. On confirmation, cashback and referral rewards are credited to your account.

## Components

```
┌─────────────────────────┐         ┌──────────────────────────┐
│  FastTrack extension    │ ─────►  │  api.willet.cc           │
│  (Chrome / Brave / Edge)│  HTTPS  │  Rust backend (Axum)     │
└─────────────────────────┘         │                          │
                                    │  - Custodial signer      │
                                    │  - Routing engine        │
                                    │  - Ledger + rewards      │
                                    └──────┬───────────────────┘
                                           │
                                           ▼
                                    ┌──────────────────────────┐
                                    │  Solana RPC + landing    │
                                    │  services                │
                                    └──────────────────────────┘
```

## What the extension does

* Renders the trading overlay on axiom.trade.
* Detects which token page you are on.
* Sends authenticated requests to our backend.
* Displays your balance, tier, rewards, and claim history.
* **Never** holds your private key. **Never** signs transactions in-browser.

## What the backend does

* Holds the encrypted private key for your custodial wallet.
* Resolves which DEX a token trades on.
* Builds, signs, and submits trade transactions.
* Tracks your lifetime volume and tier.
* Accrues cashback and referral rewards on every confirmed trade.
* Pays out claims when you request them.

## What the backend does not do

* Make trading decisions on your behalf. You initiate every trade.
* Auto-sell, auto-stop-loss, or any form of automation.
* Hold your funds beyond the custodial wallet. Trading capital is in your wallet, on chain, at all times.

## Read more

* [Trade flow](/how-it-works/trade-flow.md) — what happens between click and confirmation.
* [Routing and execution](/how-it-works/routing.md) — how we pick the path for each trade.
* [Security model](/how-it-works/security-model.md) — threats, mitigations, and what's left to do.
* [Wallet custody](/how-it-works/custody.md) — the custodial model and how keys are protected.


---

# Agent Instructions: 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.willet.cc/how-it-works/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.
