feat: how concentrated the balance is, once the treasury is set aside
deploy / build (push) Successful in 7m40s
deploy / deploy-api (push) Successful in 16s
deploy / deploy-web (push) Successful in 6s

The last piece of #17. It was specified as "the share of issuance held by the
top 1, 10 and 100" plus a Gini, and done literally that produces a number that
is true and says nothing — because the top account is the vesting pot holding
99.5% of the chain. The figure would sit near 1.000 and move only when the pot
paid out, describing an undistributed reserve rather than an economy.

So the pot is reported first and then excluded, by its own storage key rather
than by being the largest: "the biggest account" is a description that would
silently start meaning something else the day the pot drains. Everything else
is computed over what is left and labelled as being outside it.

The denominator is the counted balance, not issuance. The two differ, and in
the direction that matters: a wormhole exit credits its destination without
debiting the note's source, so balances summed across the chain exceed
issuance, and shares of issuance would add up to more than everything.

Measured on mainnet: 1,949 accounts, 27,245 QTC outside the pot, top 1 at
39.6%, top 10 at 72.2%, top 100 at 92.2%, Gini 0.965. That top holder is a
mining address — keyless, its balance a cumulative receipt that cannot fall
however much its operator pays out — so the panel says in its own words that
this is partly a statement about who mined most rather than who holds most.

The Gini lives in `blackbeard-core` with its own tests, per the rule about
statistics being easy to overstate and hard to notice: pinned against the
published coefficient for 1,2,3,4, and against a dust holder beside two whales,
which is the case an `f64` accumulator would round away and report as perfect
equality between the whales.

`RpcClient::storage_values` is new — `state_queryStorageAt`, which turns two
thousand round trips into four. Chunked at 500 rather than sent whole because
nothing documents a ceiling here, and an undocumented ceiling is one that gets
discovered in production.

Nothing renders unless the account walk reached the end of the map. Every share
divides by a total, and a partial sum makes all of them wrong while looking
entirely reasonable.

Closes #17

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-14 15:32:11 +03:00
co-authored by Claude Opus 5
parent 67e7b2ec24
commit da7f773564
11 changed files with 575 additions and 9 deletions
+62
View File
@@ -88,6 +88,13 @@ export function NetworkPanel({
// The vesting pot, which on this chain holds almost everything. Rendered as a
// percentage because two eighteen-digit strings do not compare at a glance,
// and 99.5% is the whole point.
// Only rendered when the account walk reached the end of the map: every share
// here divides by a total, and a partial sum would make all of them wrong
// while looking entirely reasonable.
const conc = summary.concentration
/** Parts per ten thousand as a percentage, or an em dash. */
const bps = (v: number | null) => (v === null ? '—' : `${(v / 100).toFixed(v > 9900 ? 2 : 1)}%`)
const pot = summary.vesting_pot
const potShare =
pot && pot.share_bps !== null
@@ -190,6 +197,61 @@ export function NetworkPanel({
</p>
</section>
{conc !== null && conc.complete && (
<section className="panel" style={{ marginBottom: 26 }}>
<div className="panel-head">
<h2 className="panel-title">Concentration</h2>
<span className="eyebrow">outside the vesting pot</span>
</div>
<div className="node-grid">
<Field
label="Accounts"
value={count(conc.accounts)}
note={`${count(conc.holders)} hold anything`}
/>
<Field
label="Largest holder"
value={bps(conc.top1_bps)}
note="of the balance outside the pot"
/>
<Field label="Largest ten" value={bps(conc.top10_bps)} />
<Field label="Largest hundred" value={bps(conc.top100_bps)} />
<Field
label="Gini"
value={conc.gini === null ? '—' : conc.gini.toFixed(3)}
note="0 even, 1 one holder"
/>
<Field
label="Outside the pot"
value={amount(conc.outside_pot)}
note="what the shares divide"
/>
</div>
<p className="panel-note">
<strong>The vesting pot is excluded from every figure above.</strong> It holds{' '}
{conc.pot?.share_bps === null || conc.pot === null
? 'almost all'
: bps(conc.pot.share_bps)}{' '}
of the chain&apos;s counted balance, and a concentration measure that included it would
describe an undistributed reserve — it would sit near 1.000 and move only when the pot
pays out. These figures divide by what is outside it.
</p>
<p className="panel-note">
The denominator is the <em>counted balance</em>, not total issuance. The two differ: a
wormhole exit credits its destination without debiting the note&apos;s source, so
balances summed across the chain exceed issuance by however much has ever been taken
out. Shares of issuance would add up to more than everything.
</p>
<p className="panel-note">
<strong>Read the tail carefully.</strong> A mining reward is paid to an address derived
from the miner&apos;s own preimage, which nothing can sign for — so those balances are
cumulative receipts that can only rise, and never fall however much their operator pays
out. Concentration across them is in part a statement about who has mined the most
rather than about who holds the most.
</p>
</section>
)}
<section className="panel" style={{ marginBottom: 26 }}>
<div className="panel-head">
<h2 className="panel-title">Capability</h2>