# surfaces

Each token page surfaces three lists, all backed by the indexer.

## Holders

* Derived from `Transfer` events on the token contract.
* Updates incrementally on every transfer (idempotent — same `(txHash, logIndex)` never applied twice).
* Sorted by current balance, descending.
* Shows wallet, balance (raw token amount and % of circulating).

The curve itself appears as a holder until it's drained (pre-grad it holds the 757.5M unsold supply; post-grad the residual 242.5M leftover is burned).

## Trades

* Every `Bought` / `Sold` (pre-grad) and Uni V2 `Swap` (post-grad) lands in the `Trade` table.
* Sorted by block, descending.
* Each row shows: side (BUY/SELL), trader, USDC amount, token amount, block time, tx hash.

Click any tx hash to jump straight to BaseScan.

## Earnings

This panel sums the creator's accumulated take from the swap fee:

* Pre-grad: 0.5% of `usdcAmount` for every `Bought` / `Sold` row.
* Post-grad: 0.5% × token amount on every Uni V2 swap, valued in USDC at the swap price.

Note that post-grad earnings are paid out by the keeper after it sweeps token → USDC and dispatches 50/50. The earnings number is "earned, sweep pending" — not necessarily already in the creator's wallet at the instant of display. See [Keeper bot](broken://pages/ab2e04f2e1a5e5bc6e904c617917bb21b3319dd9).

## Your positions sidebar

If you connect a wallet, the right-hand sidebar shows:

* **Portfolio value** — sum of `balance × spot price` across every basefun token you hold.
* **Per-token row** — symbol, leverage × direction, balance, USDC value.
* **Recent trades** — global feed across every token (last 30 trades, refresh every 5s).

The portfolio value treats post-grad tokens at their Uni V2 spot, and pre-grad tokens at their curve spot.


---

# 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://basefun.gitbook.io/basefun-docs/surfaces.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.
