Skip to content

feat: accelerator fees by pool, on the bitcoin post - #39

Merged
37ng merged 10 commits into
mainfrom
claude/bitcoin-mempool-diagram-b3f97f
Sep 8, 2026
Merged

37ng merged 10 commits into
mainfrom
claude/bitcoin-mempool-diagram-b3f97f

Conversation

@37ng

@37ng 37ng commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Adds a diagram at the top of the bitcoin post: mempool.space accelerator fees per month, split by the pool that took them, from the mempool-space-by-month.json file already in the repo.

What it draws

One stacked column per month. Figures are BTC to three significant digits; the exact sats stay in the readout's second line and in every hover title — rounded BTC to read, sats to check.

Interactions, as asked:

  • Hover a pool, in the legend or on a band, and the other thirteen drop back.
  • Click a pool to keep it alone.
  • Moving across the plot sets a month cursor that rewrites the readout and every legend figure to that month.

The axis, and why it is linear

Months run from 0.004 BTC to 2.89, so most columns are short next to jan 2024 and jun 2026. A log axis fixes that but breaks the figure: stacking on a log scale plots the running total, so the line between two colors is the cumulative sum and a band's height stops meaning anything. It was tried and dropped. No caption repairs a figure the eye reads wrong.

So the scale stays linear and the reader zooms instead. axisMax fits the ceiling to whatever is on screen and rounds it to an even tick step, so clicking a pool refits the axis to that pool's own months — OCEAN alone gets a 0–0.003 BTC plot where its eleven months are readable, where in the full stack it is invisible. That is honest: it is 0.03% of the total.

Bands get no minimum height either, so they stay exactly proportional. A pool too small to see in the stack is still reachable from the legend. Two tests pin this down: position is the plain ratio, and a month's drawn bands sum to exactly that month's own height.

Palette

One color per pool needs fourteen slots. Rather than add a second palette, --pool-1..4 are now aliases onto a merged --series-1..14, so a pool keeps one color across every figure on the site. --pool-5 stays its own neutral — it is the residual bucket that .pool-rest hatches, not a series. Existing figures render unchanged.

Reviewer notes

  • A pool that took nothing in a month gets no band, not a zero-height one, and the legend prints —. A month with no data is not a month with zero.
  • Two things about the data itself are worth a look, though this PR does not touch it. The months before September 2024 list one to seven pools with the top pool at 83–100%, which is partial coverage rather than a real monopoly — yet 2024 is 63% of the grand total and 2024-01 is the tallest column in the chart. Separately, jun 2026 is 25% of all 33 months, with every pool up 24–200× together and a normal pool mix; that is either a real congestion event or a pipeline fault, and this file cannot tell which.
  • npm run verify passes: prettier clean, 0 type errors, build succeeds, 58 tests (18 new).
  • Checked in both themes and at 375px.

🤖 Generated with Claude Code

37ng and others added 10 commits September 8, 2026 11:38
One stacked column per month of mempool.space accelerator fees, split by
the pool that took them, from mempool-space-by-month.json. Figures are BTC
to three significant digits; the exact sats stay in the readout and in
every hover title.

The axis is linear and stays linear. A band's height is the amount that
pool took and the top of a column is the month's total. A log axis reads
better -- months run from 0.004 BTC to 2.9 -- but stacking on a log scale
plots the running total, which leaves band heights meaning nothing. The
reader zooms instead: clicking a pool refits the axis to that pool's own
months, which is the only way a pool worth a tenth of a percent gets a
readable plot. Bands get no minimum height either, so they stay exactly
proportional; a pool too small to see is still reachable from the legend.

Hovering a pool drops the other thirteen, clicking keeps it alone, and
moving across the plot sets a month cursor that rewrites the readout and
every legend figure to that month.

Pools rank by lifetime total and take palette slots in that order, so the
biggest is always the floor of the stack and a pool keeps one color
everywhere. That needed fourteen slots, so --pool-1..4 are now aliases
onto a merged --series-1..14 rather than a second palette; --pool-5 stays
its own neutral because it is the residual bucket, not a series. Existing
figures render unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Clicking a pool snapped to the isolated chart. The bands of the other
thirteen pools were filtered out of the tree, and a node React unmounts
cannot be tweened.

Every band now stays mounted. The ones not chosen are driven to zero
height and zero opacity, so the stack drops to the floor while the chosen
pool slides down and grows into the refitted axis. Axis labels and
gridlines are keyed by slot rather than by tick value, so they survive a
rescale and slide instead of swapping.

.chart-move carries the timing: geometry eases over 320ms, opacity over
140ms, and the inline transitionDelay staggers geometry by column while
leaving opacity at zero delay -- a hover has to dim now, not a third of a
second later. Reduced motion keeps the opacity and drops the rest.

Also drops the sats line under the BTC figure in the readout. The line
keeps its height so selecting a pool does not shift the chart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Title reads "BTC offchain fee published by mempool.space" instead of
  "accelerator fees paid, by pool" -- names the source and the figure
  the way the rest of the post does.
- Readout and legend rows use ₿ instead of the "BTC"/"sats" text --
  bigger in the readout, dim and inline in the legend rows. The sats
  line under the big figure is dropped; the readout keeps its own
  height (min-h) so picking a pool does not shift the chart.
- Legend header row ("pool · every month") is dropped -- "show all"
  keeps its slot on the right so removing it does not shift the grid.
- Legend goes to a fixed two-column grid; the three-column layout on
  wide viewports was clipping pool names once the ₿ mark landed after
  the figure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Escape now clears `selected`, same effect as the "show all" button,
so a keyboard user can back out of a one-pool view without a mouse.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The share line and the legend's "show all" row used min-h with no
line-height, so their box grew past the reserved minimum once text
appeared, shifting the legend down. Pin height and line-height instead.

Also drop mempool-space-by-pool.json, reconstructible from
mempool-space-by-month.json, and remove the Escape-key handler for
the isolated pool view (not needed).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@37ng
37ng merged commit 3796aa0 into main Sep 8, 2026
1 check passed
@37ng
37ng deleted the claude/bitcoin-mempool-diagram-b3f97f branch September 8, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant