Varve
Docs

Everything here can be added up.

Varve is a measuring engine with a website attached. This page is the engine: what weight is, how a settlement is decided, what the measurement cannot see, and the endpoints that expose all three.

01Weight

An area under a curve.

Your balance over an epoch is a step function. Weight is the area beneath it — every token multiplied by every second you held it. A snapshot samples that function once; this integrates it.

All arithmetic is bigint. Base units times seconds, for a nine-decimal token over a month, leaves the safe integer range behind before the first day is out.

weight = Σ balance × (t[i+1] − t[i])

1,000 for 30 days   30,000.00 token-days
2,000 for 15 days   30,000.00 token-days
                    ────────────
identical           yes
02The dust cascade

A claim costs 0.00203928 SOL in token-account rent, so a share below that is worth less than the act of taking it. Those shares are dropped and the pot is divided again among the rest.

Dropping everyone below the floor at once is wrong. Once the smallest leave, the pot spreads further, and some of those swept out alongside them would have cleared the floor. Dropping one at a time cannot make that mistake: removing a holder only raises the others, so nobody who qualifies is ever removed.

paid + carried = pot
nothing paid below the floor
maximal payable set
pot 30, floor 10, weights 5 4 3 2 1

  drop all at once    1 paid
  drop one at a time  2 paid
                      ────────────
  passes              4
  carried             0
  maximal             yes / no
03What it cannot see
From attachment onward. The epoch begins when a token is attached. A year of prior holding is not visible and is not counted.
Sampled, not indexed. Balances are read at a fixed interval. A balance that rises and falls entirely between two readings is never seen. A transfer-level indexer is the upgrade; this is not that.
Twenty accounts. The chain returns the twenty largest. Coverage against real supply is published per reading rather than assumed, and it is never 100%.
Left-hand intervals. The balance at the start of an interval earns it. The reading you were not in does not pay you — a deliberate bias against arriving late.
Programs excluded. Accounts owned by a program — AMM vaults, bonding curves, escrows — are marked and dropped before anything is divided.
Nothing is transferred. There is no program deployed. Settlements are dry runs over live weights: no signature, no transfer, nothing written.
04The API

No key, no account. Everything the pages show is read through these, so anything you can see you can also check from a terminal.

GET/api/live

What the service is measuring, and — under limits — exactly what it cannot see. Served, not buried in a document.

{
  "reachable": true,
  "projects": 3,
  "sampleSeconds": 60,
  "limits": { "sampled": "...", "topAccounts": "...",
              "leftRiemann": "...", "fromAttachment": "..." },
  "list": [ { "symbol": "BONK", "samples": 41,
              "holders": 20, "payableHolders": 18,
              "coverageBps": 5369 } ]
}
GET/api/bands?mint=…

One band per closed interval — what the core column is drawn from. The newest reading has no band, because an interval needs two.

{
  "samples": 41, "closedIntervals": 40,
  "bands": [ { "spanSeconds": 62, "holders": 20,
               "area": "29295305609408…",
               "coverageBps": 5369 } ]
}
POST/api/settle

A dry run over live weights, in either mode. The response reports all three invariants rather than assuming them — an endpoint that cannot say whether its own books balance is asking to be trusted.

// body
{ "mint": "Dez…263", "potLamports": "40000000",
  "mode": "cascade" }

// response
{ "paid": [ … ], "dropped": [ … ],
  "carryLamports": "0", "passes": 8,
  "conserves": true,
  "everyPaidClearsFloor": true,
  "maximal": true }
Errors

A bad address is a 400. A service that did not answer is a 502 carrying reachable: false — never an empty list. An empty list from a failed read looks exactly like an empty ledger, and those are different claims.

Break the settlement →Weigh a history yourself