Controls
Presets
Parameters
Quality
Camera
Model checks
The science
One bank (Diamond and Dybvig, 1983). A bank takes deposits of 1 and invests them. A fraction t of depositors are impatient and withdraw early; early withdrawers are paid r1 > 1 first come, first served. Patient depositors may wait for the long-run return R > r1. If a fraction f withdraws early the bank can pay out while f r1 ≤ a (assets a, liquidation value 1). A depositor who waits then gets W(f) = R (a - f r1)/(1 - f), otherwise nothing.
Run threshold. Waiting beats withdrawing exactly while W(f) > r1, i.e. f < f* = (R a - r1)/(r1(R - 1)). Beyond f* every patient depositor prefers to join the queue: the run is self-fulfilling (strategic complementarity). A bank fails when f r1 > a; withdrawers in the queue then receive r1 with probability a/(f r1), an expected a/f.
Heterogeneous beliefs. Each patient depositor has her own trigger τ = f* + σ z with z ~ N(0,1) (a Granovetter threshold cascade). The mean-field equation is f = t + (1 - t)[s + (1 - s) Φ((f - f*)/σ)], where s is a panic seed in bank 1. The agent-based simulation converges to its least fixed point; near the critical gap the finite number of agents (120 here, thousands in the checks) makes runs differ, so the checks compare against a finite-size band.
Contagion. Ten banks sit on a ring and each holds interbank claims on its four nearest neighbours. Every failed neighbour destroys a fraction ε of a bank's assets: a = 1 - ε (failed neighbours). Lower assets lower f*, so a bank that was safe can become run-prone: panic spreads one hop per round.
Simplifications. No deposit insurance, no central bank, no sunspot lottery (the seed is a deliberate shock), identical banks and exposures, a fixed liquidation value of 1, no price feedback between banks, and a stylised ring. It is a teaching model, not a calibrated description of any real bank run.