What does LVR, Sandwich Bounds and Vault Risk conclude, in numbers, about “Classical Sources: the Guanzi on Light-and-Heavy Price Levelling and Bagehot's Lombard Street”?
Answer: Chapter 7 reads the Guanzi on the levelling of prices and Bagehot's Lombard Street of 1873.
Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs. This is general investment risk analysis, not investment advice; it recommends no token, protocol or trade, and crypto-assets are high risk and can be lost in full.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only
| A. three seasonal cycles, daily steps, deposit 10,000 | |
| amp granary gain R merchants' take pool P&L take/R | |
| 0.1 | 45.68 45.68 0.00 1.000 |
| 0.3 | 57.54 57.54 0.00 1.000 |
| 0.5 | 94.86 94.86 0.00 1.000 |
| B. Guanzi: deadline and price concession on goods sold | |
| 10 days: concession 1/10 | 0.10; on 10,000: 1,000 |
| 8 days: concession 1/5 | 0.20; on 10,000: 2,000 |
| 5 days: concession 1/2 | 0.50; on 10,000: 5,000 |
| 0 days: concession 9/10 | 0.90; on 10,000: 9,000 |
Show the full program
# Chapter 7. p71: a price-stabilising granary that trades at stale
# prices hands its gain to the merchants.
# Model A: the price follows a seasonal cycle, ln p = amp sin(2 pi t / T)
# plus small noise, sampled daily for three whole cycles (it ends where
# it began). A granary that holds the constant-product mix x(p) and
# trades with everyone at the market price earns the rebalancing gain
# R = sum x_t (p_{t+1} - p_t): it buys when cheap and sells when dear.
# A constant-product pool holds the same mix but trades only after the
# price has moved, so merchants (arbitrageurs) take the exact amount
# L sqrt(p) (sqrt(q/p) - 1)^2 per step. Identity: pool P&L = R - take.
# Part B: Guanzi's urgency schedule, read as a declared concession.
# Amplitudes illustrative; deposit 10,000.
import math
import random
from fractions import Fraction
V0 = 10000.0
L = V0 / 2.0
def cycle_path(rng, amp, days=365 * 3, period=365):
z = [amp * math.sin(2 * math.pi * t / period) for t in range(days + 1)]
eps = [0.0] + [rng.gauss(0.0, 0.004) for _ in range(days - 1)] + [0.0]
return [a + b for a, b in zip(z, eps)]
if __name__ == "__main__":
rng = random.Random(20261120)
print("A. three seasonal cycles, daily steps, deposit 10,000")
print(" amp granary gain R merchants' take pool P&L take/R")
for amp in (0.1, 0.3, 0.5):
lp = cycle_path(rng, amp)
r_terms, take = [], []
for a, b in zip(lp, lp[1:]):
p, q = math.exp(a), math.exp(b)
r_terms.append(L / math.sqrt(p) * (q - p))
take.append(L * math.sqrt(p) * (math.sqrt(q / p) - 1.0) ** 2)
r, t = math.fsum(r_terms), math.fsum(take)
pnl = round(2 * L * math.sqrt(math.exp(lp[-1])) - V0, 2) + 0.0
print(" {:.1f} {:>15,.2f} {:>16,.2f} {:>9.2f} {:>6.3f}".format(
amp, r, t, pnl, t / r))
print("B. Guanzi: deadline and price concession on goods sold")
for days, cut in ((10, Fraction(1, 10)), (8, Fraction(2, 10)),
(5, Fraction(5, 10)), (0, Fraction(9, 10))):
print(" {:>2} days: concession {} = {:.2f}; on 10,000: {:>6,}"
.format(days, cut, float(cut), int(cut * 10000)))Single source and citation
Fan, Y. (2026). Concentrated-Liquidity Loss-Versus-Rebalancing, On-Chain Sandwich Bounds and Decentralised Vault Risk Control (Version 1.0.0), Chapter 7: Classical Sources: the Guanzi on Light-and-Heavy Price Levelling and Bagehot's Lombard Street. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-344 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026344,
author = {Fan, Yafu},
title = {Concentrated-Liquidity Loss-Versus-Rebalancing, On-Chain Sandwich Bounds and Decentralised Vault Risk Control},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Concavity of Constant Product: Market Making Is Selling Gamma
- Chapter 2 · The σ²/8 Rate of Loss-Versus-Rebalancing, Discounted by Fees and Block Times
- Chapter 3 · Concentrated Liquidity: the Amplification Factor, the Range Value Function and the Odds of Leaving the Range
- Chapter 4 · Fees Against LVR: Break-Even Volatility, Measurement Noise and the Crowded Range
- Chapter 5 · Bounding the Sandwich: Your Slippage Tolerance Is the Largest Loss You Offer
- Chapter 6 · Pricing Smart-Contract Tail Risk with Poisson Jumps, Kelly Position Caps and Vault Rebalancing Bands
- Chapter 8 · Closing the Loop: a Monthly On-Chain Position Check-up, the Distilled Tool and a Pre-registered Refutation