Safe-Set Occupancy Calculator

Safe-set occupancy: c(n−1) vs indicator

Lower bound on the long-run fraction of time the chain spends in 𝒮 = {(1, a) : a ≤ 0}, from the drift argument with each Lyapunov function at its optimal constant c°. The per-hash probability p is set so that the total hash power finds one block per target interval.

Parameters

EH/s
s
s
s
Honest power is split evenly: h = (1−ρ)·H / NH.
Lead when an excursion above 0 begins. Leaving 0 always lands at 1.
c(n−1)
–
Indicator 1{n≥2}
–
Threshold
–
ρ* = (Δm−Δs)/(2Δm−Δs)

Occupancy bound across ρ

V = a⁺ + c(n−1) V = a⁺ + c·1{n≥2} ρ* threshold
Hover the chart to read values.

Intermediate quantities

Quantityc(n−1)Indicator

Probability of an irrecoverable lead

u = (p₁+p₂)(1−qA) u = (1−p₀)(1−qA)
ℓP(reach ℓ before 0) ≤Events per year ≤ (a₀ = 1)
(p₁+p₂)(1−qA)(1−p₀)(1−qA)(p₁+p₂)(1−qA)(1−p₀)(1−qA)

Formulas

1. Mining probabilities (shared by both methods)

p is fixed so that the total hash power H finds one block per target interval Tb. Honest power is split evenly over NH miners.

\[ \log(1-p) = \frac{\log\!\left(1-1/T_b\right)}{H}, \qquad h = \frac{(1-\rho)H}{N_H}, \qquad h_A = \rho H \]
\[ q_H = 1-(1-p)^{h(\Delta_m-\Delta_s)}, \qquad q_A = 1-(1-p)^{h_A\Delta_m} \]
\[ p_0 = (1-q_H)^{N_H},\quad p_1 = N_H\,q_H(1-q_H)^{N_H-1},\quad p_2 = \tbinom{N_H}{2}q_H^2(1-q_H)^{N_H-2} \]
\[ \gamma = p_0\,q_A \;\;\text{(adversary pulls ahead)}, \qquad \beta = p_1(1-q_A) \;\;\text{(fork resolved)} \]

2. Occupancy from the drift

If V drifts down by ε outside 𝒮 and up by at most b inside 𝒮, summing the drift over T steps and using V ≥ 0 gives the occupancy bound. The same inequality gives the recovery-time bound.

\[ \mathbb{E}[\Delta V_t \mid \mathcal{F}_t] \le -\varepsilon\,\mathbf{1}\{X_t\notin\mathcal{S}\} + b\,\mathbf{1}\{X_t\in\mathcal{S}\} \]
\[ \mathbb{E}[O_T] \ge \frac{\varepsilon}{\varepsilon+b} - \frac{V(X_0)}{(\varepsilon+b)\,T}, \qquad \liminf_{T\to\infty} O_T \ge \frac{\varepsilon}{\varepsilon+b}\;\text{a.s.}, \qquad \mathbb{E}[\tau_{\mathcal{S}}] \le \frac{V(X_0)}{\varepsilon} \]

For both methods, ε/(ε+b) is maximised where the two terms in ε(c) are equal. At that c°, ε + b = δ + γ.

3a. V = a⁺ + c(n−1)

\[ \delta = (p_1+p_2)(1-q_A) - p_0 q_A \]
\[ K = p_2 + q_A(p_1+p_2) \;\;\text{(expected new chains)} \]
\[ \varepsilon(c) = \min\{\delta - cK,\; c(\beta-K) - \gamma\}, \quad b = \gamma + cK \]
\[ \frac{\gamma}{\beta-K} < c < \frac{\delta}{K}, \qquad c^\circ = \frac{\delta+\gamma}{\beta} \]
\[ \liminf_{T} O_T \;\ge\; \frac{\delta(\beta-K)-\gamma K}{\beta\,(\delta+\gamma)} \]

3b. V = a⁺ + c·1{n≥2}

\[ \delta = 1 - p_0 - q_A \]
\[ K = 1 - p_0 - \beta \;\;\text{(fork-creation prob.)} \]
\[ \varepsilon(c) = \min\{\delta - cK,\; c\beta - \gamma\}, \quad b = \gamma + cK \]
\[ \frac{\gamma}{\beta} < c < \frac{\delta}{K}, \qquad c^\circ = \frac{\delta+\gamma}{1-p_0} \]
\[ \liminf_{T} O_T \;\ge\; \frac{\delta\beta-\gamma K}{(1-p_0)(\delta+\gamma)} \]

4. Probability of an irrecoverable lead

Δa depends only on (H, A), so the lead at is a lazy random walk on its own. With Zt = θat, Z is a supermartingale whenever g(θ) ≤ 1.

\[ v = \Pr[\Delta a = 1] = p_0\,q_A, \qquad u = \Pr[\Delta a = -1] \]

Paper: H ∈ {1, 2}

\[ u = (p_1+p_2)(1-q_A) \]

Drops H ≥ 3 (p≥3 ≈ 0). Slightly smaller u, so a slightly weaker bound.

Exact: H ≥ 1

\[ u = (1-p_0)(1-q_A) \]

Any honest block with no adversarial block lowers the lead. Then u − v = 1 − p₀ − qA, the δ of the indicator method.

\[ g(\theta) = \mathbb{E}\big[\theta^{\Delta a}\big] = \theta v + \theta^{-1}u + (1-u-v), \qquad g(\theta) - 1 = \frac{v}{\theta}(\theta-1)\Big(\theta-\frac{u}{v}\Big) \]

So g(θ) ≤ 1 for 1 ≤ θ ≤ u/v. The bound is best at θ = u/v, which exceeds 1 exactly when δ = u − v > 0. With varying parameters, use θ = inft u(t)/v(t). Let τ be the first time a hits 0 or ℓ. Optional stopping on Z gives θa₀ ≥ θℓ·P + (1 − P).

\[ \Pr\big[a \text{ reaches } \ell \text{ before } 0 \mid a_0\big] \;\le\; \frac{\theta^{a_0}-1}{\theta^{\ell}-1} \;\le\; \theta^{\,a_0-\ell}, \qquad \theta = \frac{u}{v} \]

For constant parameters the first inequality is an equality (classical gambler’s ruin).

5. Events per year

An event is an excursion in which the adversary’s lead climbs from 0 to ℓ before falling back to 0. The yearly column bounds the expected number of such events.

\[ \mathbb{E}[\#\text{events per year}] \;\le\; v \cdot S \cdot P_\ell, \qquad S = \frac{365\cdot 24\cdot 3600}{\Delta_m}, \qquad P_\ell = \frac{\theta-1}{\theta^{\ell}-1} \]
  • S is the number of Markov steps in a year.
  • v = p₀qA bounds how often an excursion can start. The lead moves by at most +1 per step, so a positive lead can only begin with a step from a = 0 to a = 1. That needs H = 0 and A = 1, which has probability v. Steps with a ≠ 0 cannot start one, so the expected number of starts in S steps is at most v·S.
  • Pℓ is the probability that one excursion reaches ℓ before returning to 0. Every excursion starts at lead 1, so this column always uses a₀ = 1, whatever a₀ is set to above.

Each excursion’s chance of reaching ℓ depends only on the steps after it starts. Summing over start times gives

\[ \mathbb{E}[\#\text{events in } S \text{ steps}] = \sum_{t

The bound is conservative. Using v·S assumes the lead sits at exactly 0 on every step, but it is often negative (after honest blocks) or positive (during an excursion). Multiplying by the fraction of time spent at a = 0 would tighten it, but the analysis has no lower bound on that fraction.

Parameters are held constant in time, so the starred constants (δ*, β*, γ*, K*) equal their per-step values. “No bound” means the window for c is empty, so the drift argument gives nothing. The threshold is ρ* = (Δm−Δs)/(2Δm−Δs), where δ for the indicator method reaches zero.