Build1 distinct publisher3 min readPublished
A logarithm replaces both the payment table and the timer that would rewrite every row of it. The concurrency bug it does not remove is the more useful half of the writeup.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
Ranking needs order, not values. The decay here is multiplicative and shared: in log space, advancing the clock subtracts the same number from every row at once [5][6]. A uniform translation of a column cannot change which entry is on top. What a timer would be doing, a million times a tick, is moving every row by an identical amount and then discovering nothing changed places [3].
That symmetry is the load-bearing assumption, not a convenience. The term you throw away is -k*t, and it is common to all rows only because k is common to all rows [6]. Give tiles individual half-lives and it becomes -k_i*t, which varies per row, and an index on ln(P) + k_i*t_P quietly returns the wrong order with no query error to tell you [6].
The constants check out. At a three-day half-life, k = ln2/3 = 0.2310 per day [2][1], and the seconds-domain figure quoted in the post, 2.674e-6, times 86,400 is that same 0.231 [9][2]. The twenty-year number needs a footnote: at 0.231 per day the key gains about 84 a year, so 1687 is twenty years measured from the epoch, not twenty years past a present value of 55, which itself puts the epoch roughly 238 days back [10][3]. Either reading is far outside a double's exponent range anyway, which is the author's point about never calling exp on rank_key directly [10].
Display still needs a number, and that is where the discipline shows up. You exponentiate only after shifting the domain to now, and the author reports the shifted value sitting in the 6 to 10 range in log terms [10], which is a heat of about 400 to 22,000 [5]. Additions stay in log space too, using a log1p-based log-add so a small payment landing on top of a large one does not round away [8].
The second half of the writeup is less tidy and worth more. Having removed the scheduled job, the author still had to build a lock by hand [13]. All 1,000 tiles live in one Cloudflare Durable Object, which gives a single JS execution stack with one thing running at a time [11], and that reads like free mutual exclusion. It is not. Every await is a yield point, and the input gate only holds delivery across storage operations, not across a D1 query or an outbound fetch [12]. A SELECT that checks for existing locks lets two callers both see zero locks and both proceed [12]. The fix is to do the check and stake the claim in a block containing no await at all, against a plain in-memory Set, where the single thread genuinely guarantees no interruption [13].
Both halves come from the same accounting. State that changes on its own has to be recomputed, and state that changes only when money moves does not. The algebra pushes the decay into a constant so nothing has to run; the in-memory Set pulls the claim out of the database so nothing has to be trusted across a yield. Neither one was bought with more infrastructure.
Ranked by verification strength, evidence, and original report placement.
The author built a board of 1,000 tiles where anyone can pay to take a tile away from its current holder; tiles are sorted by a decaying 'heat' value, so the board reorders itself continuously.
Heat is the sum of every payment a tile has received, each decaying exponentially: heat(t) = sum of A_i * 2^(-(t - t_i)/H), with half-life H of 3 days in the author's case.
The obvious implementation is a scheduled job recomputing every row on a timer; the author notes that with a million rows the timer stops being a detail and becomes the whole system.
Individual payments never need to be stored: the entire sum is representable by a single pair (P, t_P), updated on a new payment A as P' = P * 2^(-(t_new - t_P)/H) and t_P' = t_new, giving one row and two columns regardless of how many payments a tile has taken.
With k = ln2/H, ln(heat(t)) = ln(P) - k*(t - t_P) = [ln(P) + k*t_P] - k*t.
The -k*t term depends only on current time and is therefore identical for every row in the table, so it cannot affect relative order and can be dropped.
Follow any of these and your For You feed starts watching them — no settings page required.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Self-verifying math, no external corroboration
The central result is auditable on the page: the log decomposition, the row-invariance argument, and the runnable log-add and reserve() code can be checked without trusting the author, and the stated decay constants reconcile exactly with a 3-day half-life. Evidence stops short of high because everything comes from one self-published post by the system's builder, the million-row cron framing and the 12-digit precision headroom are asserted rather than measured, and one internal figure pair (55 today versus 1687 in twenty years) is inconsistent with the article's own constant.
One self-reported deployment
Adoption evidence is limited to the author's own live board at tilesquat.com: 1,000 tiles, $5 per steal, one Durable Object. No usage, traffic, revenue, or third-party adoption of the technique is disclosed anywhere in the cluster, and the million-row scenario that motivates the design is hypothetical.
Slightly overstated
The post is unusually disciplined for a builder writeup - it shows its work, flags the overflow trap, and explicitly warns that the DO's single stack does not make critical sections free. The mild overstatement is in 'permanently correct': correctness depends on a single global half-life across rows, which is never stated, and on double precision holding over the linear growth of rank_key, argued only by arithmetic. The closing pointer to the author's paid board also pushes a general technique through a promotional frame.
Self-published launch note for own paid product
The author is the builder of the system, publishes on a self-service developer platform with no editorial gate, and closes by directing readers to his own commercial board at $5 per tile with an invitation to evict him. That is a clear promotional incentive to present the architecture favourably. It is partially offset by the fact that the substantive claims are derivations and code a reader can falsify directly, and by the author volunteering a design failure mode (inherited heat compounding into an untouchable 'iron throne') against his own system.
Moderate: checkable math, unverified operations
Confidence in the algebra and the concurrency lesson is high because both are reproducible from the text alone. Confidence in scale, durability, and operational claims is low: one publisher, one self-interested author, no benchmarks, no independent corroboration, and one unreconciled numeric inconsistency. The blended result sits just above the midpoint.
build
Allow-list the closed set, block-list the open one: 193 thin geo pages, one gate1 distinct publisher
build
Three ways to ask who embedded your iframe, and only one the host cannot switch off1 distinct publisher
build
The third answer: a dead-code tool allowed to say "not traced yet"1 distinct publisher
build
A 20-digit ID went into a JSON repair tool and a different number came out1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 24, 2026