Mechanics
Every rule that moves the stop, in full. Nothing on this page is a simplification — this is the computation the contract runs, in the order it runs it.
HOW THE LINE IS DRAWNverbatim
hwm = max(hwm_prev, price_5m) high-water mark, only rises nav = vault_eth / eligible_supply what one token is worth in a payout c = max(0.55 * hwm, nav) candidate stop c2 = min(c, 0.88 * price_5m) never within 12% of price sl = max(sl_prev, c2) ratchet — the line only goes up armed when price_30s < sl for 5 continuous minutes
- hwm
- The high-water mark reads the 5-minute average, not the last trade, so a single-block wick cannot set the high and drag the stop up behind it.
- nav
- What one token would receive if the vault paid out right now. As the vault grows this branch rises on its own, whatever price does.
- c
- The candidate takes whichever branch is higher — 55% of the peak, or the vault floor. Early on the trailing branch leads; once the pot is big enough the vault branch takes over.
- c2
- The guard band. The stop is capped at 88% of the 5-minute average, so it can never sit within 12% of price. It uses the long average deliberately: with the short one, someone could wick price up, let the cap loosen, ratchet the stop higher, then let price fall into an easy trigger.
- sl
- The ratchet. The stop is the larger of its old value and the new candidate, so it holds flat when price falls rather than following it down. That is why the chart draws it as steps.
The stop can only ever move up
The last line of the formula is a maximum against the previous stop. There is no branch anywhere in the contract that lowers it inside a round. It resets only at a payout, when the round it belonged to is over.
The stop can never catch the price
The guard band caps it at 88% of the 5-minute price, so it always lands at least 12% below. However large the vault grows, the line cannot climb into the price and fire itself.
THE NUMBERS IT RUNS ONas deployed
- dwell
- 300 show long price must stay under the line
- theta — trailing
- 0.55the stop trails at 55% of the peak
- gamma — guard band
- 0.88and never sits within 12% of price
- short twap
- 30 sthe price the breach test reads
- long twap
- 300 sthe price the line is built from
- minimum pot
- 0.05 ETHbelow this a breach cannot arm
- rollover
- 40 %carried into the next round
The dwell is read off the engine on every tick. The rest are the values the contract was deployed with — check them yourself with params() on the engine.