Build log · 12 August 2026
One currency: why everything costs credits
Written up in November 2026 from our engineering log · 2 min read
Dr Urls does several kinds of work that cost us something to run. On 12 August they settled into one model: credits, from one monthly allowance per organization, then a purchased balance.
One gate, in one order
Every metered action goes through the same gate: check first, so a refusal costs nothing; do the work; charge last, so nobody pays for work that failed. The balance is decremented with a conditional update that only succeeds if the balance is still high enough — the write is the lock, so two concurrent actions cannot overdraw.
The refund that would have minted credits
A failed scan is refunded. But the free monthly allowance resets on the first of the month, so refunding it would hand back credits that were going to reappear anyway — a quiet way of minting them. Refunds now return only what came from the purchased balance, and a timestamp on the ledger row makes each refund happen once.