Concepts
Black-Scholes
Black-Scholes is the pricing model Optionbolt runs on-chain to value an option. It turns spot, strike, time, volatility, and rate into a price, and the core uses that price to size the option bond and to re-price an option when a cover is resolved.
What it computes
Black-Scholes gives the fair value of a European option: the right, not the obligation, to buy (a call) or sell (a put) an underlying at a fixed strike on a fixed date. Five inputs go in, and one price comes out, quoted per unit of the underlying.
| Input | Symbol | Meaning |
|---|---|---|
| Spot | S | Current price of the underlying. |
| Strike | K | The option’s fixed exercise price. |
| Time to expiry | T | Years until the option expires. |
| Volatility | σ | Annualized implied volatility of the underlying. |
| Rate | r | Annualized carry, signed, so negative rates are allowed. |
d1 = [ ln(S/K) + (r + σ²/2)·T ] / (σ·√T)
d2 = d1 - σ·√T
Call = S·N(d1) - K·e^(-rT)·N(d2)
Put = K·e^(-rT)·N(-d2) - S·N(-d1)N is the standard normal cumulative distribution. Read loosely, N(d2) is the risk-neutral chance the option finishes in-the-money, and N(d1) weights the underlying the holder would receive for it.
How Optionbolt uses it
The core prices options on-chain with Black-Scholes in two places.
- The option bond at mint. The bond floor is the Black-Scholes value at a conservative, governance-floored volatility, so the collateral always covers what resolving the short could cost. See the option bond.
- Re-pricing at resolution. When a cover is force-closed, the core re-prices the option at the current spot and shrunken time to open the recollateralization auction near fair value.
The volatility it uses is not a single number. It comes from the SVI smile, which gives a different implied volatility for each strike. Black-Scholes is the pricer; SVI supplies the volatility.
On-chain and conservative
Running Black-Scholes inside a contract means it has to be exact enough to be safe and cheap enough to be gas-viable at the same time.
- Fixed-point math. Every value is 18-decimal fixed point. Spot, strike, volatility, and time are unsigned; the rate is signed, so negative carry is handled directly.
- The normal CDF.
N(x)uses the Zelen and Severo approximation (Abramowitz and Stegun 26.2.17), accurate to under 7.5e-8 and symmetric by construction, so put-call parity holds to the precision ofe^(-rT). - Degenerate cases. At zero time, zero volatility, or extreme moneyness there is no time value, so the price collapses to discounted intrinsic. That path also guards the logarithm against a zero input.
The Solidity library is diff-tested against a JavaScript reference across roughly 1,800 input combinations and cross-referenced to Lyra’s on-chain Black-Scholes.
Black-Scholes here sizes a conservative floor, not a market price. The core uses it to guarantee the option bond is enough; the actual premium is set by the market, wherever the option trades.