The arithmetic
What a high-water mark actually charges
Not an opinion about fees. A recursion, summed.
The recursion everybody ships
A performance fee with a high-water mark does the same thing at every crystallisation. Let p be the share price now and h the mark. If p > h, take f of (p − h) from every share, then set h to the price that is left after the fee. Otherwise do nothing.
That is it. There is no third case, and every implementation in this category is a spelling of those two.
Summing it
Write Φk for the total price given up by step k, and define the gross series Gk = pk + Φk−1 — the observed price with the fees taken so far added back. Now the record test pk > hk−1 is exactly the test Gk > Mk−1, where M is the running maximum of G, because the invariant
holds by induction: it is true at the start with Φ0 = 0, a step that is not a record changes neither side, and a step that is a record charges f(Gk − Mk−1) and leaves the price at Gk − Φk. So the charges telescope:
There is no term for where the price ended. The fee is a fee on the crest — the highest the price ever got, measured at the moments the vault happened to look.
A precision worth keeping: “gross” here is the additive correction, price plus cumulative give-up. That is not the same object as the multiplicative counterfactual — the price the vault would have had if no fee had ever diluted it — and the two differ at second order in f. The additive one is what the record test is really run against, so it is the one the contract stores and the one the identity is exact in. The second-order gap is measured on real paths further down.
crest() is M, giveUp() is Φ, and identityResidual() is the signed gap between Φ and f(M − P0). Across every path measured here the worst residual is 61 price units in 1e+12, which is the fee mint rounding and nothing else.One real path
DELL, 1,600 swaps, 260,145 blocks
The thin line is the price. The thick one is its running maximum — the staircase in this site’s own mark, and the only part of the picture the fee can see. The position ended −17.33 bps from where it started; the crest got to +40.91.
Prices decoded from each swap’s own sqrtPriceX96 on Robinhood Chain. Pool 0xc30c89cb7815a1488b7998d15eec73961707fc5a.
Why the cadence sets the bill
Because M is a maximum over the times the vault crystallised, and a maximum only ever grows as you add observations. Look twice and you see the higher of two prices; look a thousand times and you see almost the true peak. Nothing about the position changed.
Record statistics say how much, and the answers are exact. For a random walk whose steps are continuous and symmetric, the chance that step k is a new record is
and — this is Sparre Andersen’s theorem, and it is the strangest thing on this page — it does not depend on the step distribution at all. Gaussian steps and Cauchy steps, one of which has no variance to speak of, set records at the identical rate. Measured over 60,000 walks of 200 steps each: exact 15.988, gaussian 16.007, cauchy 15.917.
The shortfall, and its universal constant
Sampling a Brownian maximum at n equally spaced times falls short of the continuous one by a fixed constant over √n (Asmussen, Glynn and Pitman):
Put the two together and a performance fee on a driftless position costs
of the depositor’s stake, where n is how often the vault crystallises. There is no return in that expression. Nothing in the category prints it.
| n | measured | predicted | gap |
|---|---|---|---|
| 2 | 0.4821 | 0.3859 | 24.92% |
| 4 | 0.5601 | 0.5066 | 10.56% |
| 8 | 0.6215 | 0.5919 | 5.01% |
| 16 | 0.6690 | 0.6522 | 2.57% |
| 32 | 0.7053 | 0.6949 | 1.49% |
| 64 | 0.7312 | 0.7251 | 0.85% |
| 128 | 0.7508 | 0.7464 | 0.59% |
| 256 | 0.7649 | 0.7615 | 0.45% |
8,000 Brownian paths of 4,096 steps, σ = 1, T = 1. The law is asymptotic and is judged where it claims to hold; the ceiling √(2/π) = 0.7979.
Re-run it here
The record law, in your browser
Same module the checks above use, same seeded generator. Change the step distribution and the record count does not move; change the number of steps and it follows (2n+1)C(2n,n)/4n.
The instrument, checked first
Every constant on this page, tested
Two of these failed on the first run — by 7% and by 60% — against theorems that are exact. The cause was the random number generator, not the theorems, and check 0 exists because nothing else here could have told them apart.
| Check | Result | |
|---|---|---|
| 0 the generator is a fair die before any theorem is judged with it | mean 0.500242 (1.2 sigma), var 0.083407 (0.5 sigma), lag-1 0.00062 (0.9 sigma) | holds |
| 1 (2n+1)C(2n,n)/4^n is the sum of the record probabilities | worst relative gap 3.0e-15 | holds |
| 2 the first three cases match the hand computation | E[R_1]=1.5000 E[R_2]=1.8750 E[R_3]=2.1875 | holds |
| 3 gaussian and cauchy walks set records at the identical rate | exact 15.988 gaussian 16.007 (0.12%) cauchy 15.917 (0.44%) | holds |
| 4 the maximum of an n-step walk is sigma(sqrt(2n/pi) - beta) | 10.661 against 10.701 discrete (continuous would be 11.284, 5.5% out) | holds |
| 5 the sampled maximum falls short by beta/sqrt(n), beta = 0.5826 | worst relative gap at n>=64 is 0.85% | holds |
| 6 the cadence ladder was fitted per market against the predicted shape | 35 markets fitted, median R2 0.385, 14% above 0.9 | holds |
| 7 looking more often never charges less, to the second-order dilution term | 2 of 240 pairs dip, worst 9.81 parts in 10,000 against a predicted bound of 30.58 | holds |