Andrew Fribush

fig. 2.6.3: a prepaid wallet as stacked credit lots over 84 days: six debits, oldest lot first, and one reap

fig. 2.6.3 · a prepaid wallet as stacked credit lots over 84 days: six debits, oldest lot first, and one reap.
OLDEST LOT FIRST; A LAPSED REMAINDER IS REAPED, NOT SPENTONE BAND IS ONE CREDIT LOT, OLDEST AT THE BOTTOM, THE TOP EDGE THE BALANCE;ACCENT: A LAPSED LOT’S REMAINDER.0¢500¢1,000¢1,500¢LOT 1 · GRANT 500¢LOT 2 · TOP-UP 1,000¢ · LAPSES DAY 70LOT 3 · TOP-UP 600¢BALANCE−120¢−200¢−100¢−300¢−900¢: THE LAST 700¢OF LOT 2, THEN 200¢ OFLOT 3−250¢REAPED:80¢ LEFTWHEN LOT1 LAPSEDDAY 01020304050607080AMOUNTS ARE INTEGER MICROCENTS (1¢ = 1,000,000 µ¢); THE ACCOUNT BALANCE IS A CACHEOF THE LIVE-LOT SUM, UPDATED IN THE SAME TRANSACTION UNDER THE ACCOUNT ROW LOCK.

source: Mechanism from creelshed apps/web/server/credit.ts: header invariants 4-19, debit() 498-559 (FIFO lot query 508-519), expireLapsed() 586-631; amounts and days are a synthetic sequence

View in context: Spending limits for autonomous agents → · All figures

Andrew Fribush, software and computer engineer in Austin. I build consequential systems where software meets institutions: finance, healthcare, commerce, government data, and the mechanisms that govern AI agents. Taking new engagements: hello@andrewfribush.com.