Docs/Chapter 11
Chapter 11

Options - On-Chain Conditional Execution

6 min read14 min read

Options are the original smart contracts—50 million contracts trading daily that give you the right (but not obligation) to buy or sell assets at predetermined prices. They're programmable financial logic that executes based on conditions, except instead of Solidity, they're written in legalese and settled by the Options Clearing Corporation. When retail discovered 0DTE SPY options, they turned the derivatives market into a daily casino where fortunes are made and lost in hours.

The Options Contract Framework: If-Then Financial Logic

Options are contracts with embedded conditionals:

The Option Contract Structure

// Option contract definition
class OptionContract {
    constructor(type, underlying, strike, expiry, size) {
        this.type = type;  // "CALL" or "PUT"
        this.underlying = underlying;  // "AAPL"
        this.strike = strike;  // $150
        this.expiry = expiry;  // "2024-12-20"
        this.size = size;  // 100 shares per contract
    }
    
    execute() {
        if (this.type === "CALL") {
            // Right to buy at strike
            if (spot_price > this.strike) {
                profit = (spot_price - this.strike) * this.size;
                return profit - premium_paid;
            }
        } else if (this.type === "PUT") {
            // Right to sell at strike
            if (spot_price < this.strike) {
                profit = (this.strike - spot_price) * this.size;
                return profit - premium_paid;
            }
        }
        return -premium_paid;  // Expire worthless
    }
}

It's an if-then statement that costs money and expires—smart contracts for boomers.

The Options Market Structure: 50 Million Contracts Daily

The U.S. options market is massive and growing:

Market Statistics

Metric Value YoY Growth
Daily Volume 50M contracts +35%
Daily Notional $2.5T +40%
Open Interest 500M contracts +25%
Retail Share 25% +10%
0DTE Volume 45% of SPX +100%

Exchange Market Share

Exchange Volume Share Specialty
CBOE 35% SPX index options
NASDAQ 20% Tech stocks
NYSE Arca 18% ETF options
MIAX 15% Payment for order flow
BOX 8% Price improvement
Others 4% Various

The Greeks: Risk Metrics as Market Forces

Option Greeks measure sensitivities that drive markets:

The Greek Framework

// Option Greeks calculation
function calculateGreeks(option) {
    // Delta: Price sensitivity
    delta = ∂option_value / ∂stock_price;
    // 0.50 = option moves $0.50 per $1 stock move
    
    // Gamma: Delta sensitivity  
    gamma = ∂delta / ∂stock_price;
    // Acceleration of delta
    
    // Theta: Time decay
    theta = ∂option_value / ∂time;
    // -0.05 = lose $0.05 per day
    
    // Vega: Volatility sensitivity
    vega = ∂option_value / ∂volatility;
    // 0.10 = gain $0.10 per 1% vol increase
    
    // Rho: Interest rate sensitivity
    rho = ∂option_value / ∂interest_rate;
    // Usually ignored until it matters
}

Gamma Squeezes: When Greeks Attack

// GameStop gamma squeeze mechanics
function gammaSqueezeGME() {
    // Retail buys calls
    retail_call_volume = "Massive";
    
    // Market makers sell calls (short gamma)
    mm_position = -1_000_000_calls;
    
    // MMs must hedge
    delta_hedge = calls_sold * delta * 100;
    shares_to_buy = 50_000_000;
    
    // Buying pushes price up
    price_increase = 100%;
    
    // Delta increases with price (gamma)
    new_delta = old_delta * 2;
    
    // Must buy MORE shares
    additional_shares = 50_000_000;
    
    // Feedback loop
    while (price_rising) {
        buy_more_shares();
        price_goes_higher();
        gamma_accelerates();
    }
}

Market makers hedging options can move entire markets.

Zero Days to Expiration: The Daily Lottery

0DTE options expire the same day:

0DTE Explosion

  • 2019: 5% of volume
  • 2021: 20% of volume
  • 2023: 45% of SPX volume
  • 2024: Some days >50%

Why 0DTE Dominates

// 0DTE option appeal
function zeroDTE() {
    // Lottery ticket pricing
    spy_price = $450;
    call_strike = $455;  // 1% OTM
    
    premium = $0.50;  // $50 per contract
    
    if (spy_closes_at_456) {
        payout = $1.00;  // 100% return
    } else {
        payout = $0;  // Total loss
    }
    
    // Daily gambling
    expected_value = -0.40;  // Lose 80% on average
    dopamine_hit = "Maximum";
    addiction_potential = "Extreme";
}

It's daily expiry perpetuals with 100% loss potential.

0DTE Market Impact

  • Volatility Suppression: Until it doesn't
  • Pinning: Massive open interest pins price
  • 3:30 PM Chaos: Positioning for close
  • Gamma Bombs: Sudden moves at expiry

The Volatility Complex: Trading Fear

Implied volatility is often more important than price:

The VIX Ecosystem

VIX measures 30-day implied volatility:

  • VIX <15: Calm markets
  • VIX 20-30: Normal fear
  • VIX >40: Panic
  • VIX >80: March 2020

Volatility Products

Product Assets Purpose Decay
VIX Futures $500M daily Hedge/Speculate Contango
VXX ETN $1B AUM Long volatility -80% annually
SVXY $500M Short volatility +50% usually
UVXY $1.5B 2x leveraged VIX -95% annually

The XIV Blowup

// February 5, 2018: Volmageddon
function XIVdestruction() {
    // XIV: Inverse VIX ETN
    starting_value = $2B;
    
    // VIX spikes after hours
    vix_move = +115%;  // In one day
    
    // XIV formula
    XIV_loss = -1 * vix_move;  // -115%?!
    
    // Can't go below zero
    if (loss > 80%) {
        termination_event = true;
        payout = $0.05;  // 95% loss
    }
    
    retail_losses = $2B;
    product_terminated = true;
}

One product losing 95% overnight because volatility doubled.

Options Market Making: The Edge Lords

Options market makers dominate through technology and order flow:

Major Options Market Makers

Firm Volume Edge Strategy
Citadel Securities 40% PFOF + speed See retail flow
Susquehanna 20% Math PhDs Complex modeling
Wolverine 15% Technology Low latency
IMC 10% European style Statistical arb
Two Sigma 10% AI/ML Pattern recognition

Market Maker Privileges

// Market maker advantages
function marketMakerEdge() {
    // See order flow
    if (payment_for_order_flow) {
        see_retail_orders_first = true;
        trade_ahead = true;
    }
    
    // Quote stuffing
    quotes_per_second = 100_000;
    real_orders = 100;
    quote_to_trade_ratio = 1000:1;
    
    // Complex order types
    available_order_types = [
        "Pegged",
        "Hidden",
        "Iceberg", 
        "Discretionary",
        "Intermarket_sweep"
    ];
    
    // Rebates
    maker_rebate = $0.0020;  // Per contract
    on_50M_volume = $100k_daily;
}

They see your order, model your behavior, and trade against you.

Pin Risk and Expiration Games

Options expiration creates predictable manipulation:

Max Pain Theory

// Max pain calculation
function maxPain(expiry_date) {
    // Find strike where most options expire worthless
    for (strike of all_strikes) {
        call_OI = getOpenInterest(strike, "CALL");
        put_OI = getOpenInterest(strike, "PUT");
        
        if (price_at_strike) {
            call_pain = sum(all_calls_ITM) * 100;
            put_pain = sum(all_puts_ITM) * 100;
            total_pain = call_pain + put_pain;
        }
    }
    
    max_pain_strike = minimize(total_pain);
    // Price mysteriously pins here on Friday
}

Pinning Mechanics

  • Large Open Interest: Creates gravity
  • Delta Hedging: MMs push price to strike
  • Gamma Neutral: Minimizes MM risk
  • Self-Fulfilling: Traders expect it

SPY closes within $0.50 of major strikes 40% of Fridays.

Exotic Options: Structured Complexity

Beyond vanilla calls/puts:

Exotic Option Types

Type Payoff Use Case Complexity
Binary All or nothing Gambling Simple
Barrier Activates at level Cheaper hedge Medium
Asian Average price Reduce manipulation Medium
Lookback Best price in period Expensive hedge High
Rainbow Multiple underlyings Correlation trades Very high

Structured Products

// Autocallable note structure
function autocallable() {
    // Popular with retail
    structure = {
        underlying: "SPX",
        barrier: 0.7,  // 70% of initial
        coupon: 0.08,  // 8% annual
        autocall: 1.0,  // 100% of initial
        maturity: 3_years
    };
    
    // Each observation date
    if (spot >= autocall_level) {
        return principal + coupons;  // Early redemption
    }
    
    // At maturity
    if (spot >= barrier) {
        return principal + all_coupons;
    } else {
        return spot/initial * principal;  // Loss
    }
}

Complex derivatives sold to retail as "safe" yielding products.

The Options Clearing Corporation: Central Settlement

The OCC clears all U.S. options:

OCC Statistics

  • Daily Volume: 50M contracts
  • Open Interest: 500M contracts
  • Notional Cleared: $500T annually
  • Margin Held: $200B
  • Clearing Members: 100 firms

Margin Requirements

// OCC margin calculation (simplified)
function calculateMargin(position) {
    if (position.type === "naked_call") {
        margin = max(
            0.20 * underlying_price - OTM_amount + premium,
            0.10 * underlying_price + premium
        );
    } else if (position.type === "naked_put") {
        margin = max(
            0.20 * underlying_price - OTM_amount + premium,
            0.10 * strike_price + premium
        );
    } else if (position.type === "spread") {
        margin = max_loss;  // Defined risk
    }
    
    // Portfolio margin (for big boys)
    if (account_size > $100k) {
        margin = stress_test_loss;  // 15% move test
    }
}

Weekly Options: The Gamma Acceleration

Weekly options now exist on everything:

Weekly Explosion

  • 2010: SPY weeklies launch
  • 2015: 50 products have weeklies
  • 2020: 200+ products
  • 2024: Some stocks have dailies

Why Weeklies Dominate

// Weekly vs monthly gamma
function weeklyGamma() {
    days_to_expiry_monthly = 30;
    days_to_expiry_weekly = 2;
    
    // Gamma inversely proportional to sqrt(time)
    gamma_weekly = gamma_monthly * sqrt(30/2);
    // 3.87x more gamma!
    
    // Time decay
    theta_weekly = theta_monthly * (30/2);
    // 15x faster decay!
    
    // Result
    leverage = "Maximum";
    decay = "Instant";
    gambling = "Pure";
}

Weeklies are 0DTE with extra steps.

Meme Stock Options: When Retail Weaponizes Gamma

The meme stock era changed options forever:

GameStop Options Insanity

  • Jan 2021 Volume: 500k calls/day
  • Open Interest: 2M calls
  • Implied Vol: 1000%
  • $800 Calls: Actually traded
  • Market Maker Loss: $6B

AMC Options Casino

// AMC options pricing broke models
function AMCoptions() {
    stock_price = $20;
    call_strike = $145;  // 625% OTM
    expiry = "This week";
    
    black_scholes_price = $0.00;
    actual_price = $0.50;
    
    implied_volatility = "Infinity%";
    
    if (retail_buying) {
        price = "Whatever they'll pay";
        market_maker_hedge = "Impossible";
    }
}

Options pricing models literally broke.

Corporate Options Strategies: The Yield Enhancement

Corporations use options for "risk management":

Common Corporate Strategies

// Corporate options usage
function corporateOptions() {
    // Covered calls (yield enhancement)
    if (holding_stock) {
        sell_calls(strike = current + 10%);
        extra_income = premium;
        if (called_away) {
            "oops we sold our winners";
        }
    }
    
    // Protective puts (insurance)
    if (nervous_about_position) {
        buy_puts(strike = current - 10%);
        insurance_cost = premium;
        if (never_needed) {
            "expensive insurance";
        }
    }
    
    // Collars (costless?)
    sell_call(105_strike);
    buy_put(95_strike);
    net_cost = "Zero";
    upside_capped = true;
}

Most corporate hedging is just gambling with shareholder money.

Options on Futures: Leverage Squared

Options on futures combine maximum leverage:

Underlying Multiplier Margin Leverage
/ES (E-mini S&P) $50 $500 100x on 20x
/CL (Crude) $1000 $300 300x on 10x
/GC (Gold) $100 $200 500x on 20x
/ZB (Bonds) $1000 $500 200x on 30x

The Leverage Stack

// Options on futures leverage
function futuresOptionsLeverage() {
    futures_leverage = 20x;
    option_leverage = 10x;
    
    total_leverage = futures_leverage * option_leverage;
    // 200x leverage!
    
    $100_move_in_underlying = $20_000_profit;
    $100_move_wrong_way = "Account blown";
}

It's leveraged derivatives on leveraged derivatives.

Binary Options: Pure Gambling

Binary options are yes/no bets:

Binary Structure

// Binary option payoff
function binaryOption(strike, expiry) {
    if (settlement_price > strike) {
        return $100;  // Win
    } else {
        return $0;    // Lose
    }
    
    // No in-between
    // Pure gambling
}

Why Binaries Are Banned

  • House Edge: 10-20% typical
  • Manipulation: Platforms trade against clients
  • Addiction: Designed like casino games
  • Fraud: Refuse withdrawals

Banned in Israel, Belgium, Canada, Australia. Still legal in U.S. on regulated exchanges.

Iron Condors and Credit Spreads: Theta Gang

Selling premium for income:

Iron Condor Strategy

// Iron condor construction
function ironCondor(spy_price) {
    current = 450;
    
    // Sell close strikes
    sell_put(440);   // Collect $1.50
    sell_call(460);  // Collect $1.50
    
    // Buy protection
    buy_put(430);    // Pay $0.50
    buy_call(470);   // Pay $0.50
    
    net_credit = $2.00;
    max_profit = $200;
    max_loss = $800;
    
    // Profit if SPY between 440-460
    probability_profit = 68%;
    expected_value = -$50;  // Still negative!
}

"Theta gang" strategies work until they don't.

The Future: Tokenized Options

Options are getting tokenized:

DeFi Options Protocols

  • Opyn: Options as tokens
  • Hegic: Peer-to-pool options
  • Dopex: Options vaults
  • Lyra: AMM for options
  • Ribbon: Structured products

Advantages of Tokenized Options

  • 24/7 Trading: Not just market hours
  • Composability: Use as collateral
  • No Minimum: Trade 0.01 contracts
  • Global Access: No geographic limits
  • Instant Settlement: Not T+1

Why It's Hard

  • Complexity: Options math is hard
  • Liquidity: Fragmented across strikes
  • Oracle Risk: Need accurate prices
  • Capital Efficiency: Collateral requirements

Conclusion: Conditional Finance at Scale

Options markets prove that 50 million conditional contracts can trade daily with:

  • Complexity: Infinite strategy combinations
  • Leverage: 200x when stacked
  • Manipulation: Pinning, gamma squeezes
  • Extraction: Market makers win
  • Gambling: 0DTE lottery tickets

Options are smart contracts if:

  • They expired in hours not blocks
  • Market makers could see your code
  • Execution depended on centralized oracles
  • Settlement took a day
  • The house always won

Every DeFi innovation exists in options:

  • Conditional execution: The original use case
  • Composability: Spreads and combinations
  • Leverage: More than you can handle
  • MEV: Payment for order flow
  • Liquidations: Expiring worthless

The difference is options have a century of case law, centralized clearing, and market makers who've turned extracting value into science.

Options markets: Where math PhDs sell lottery tickets to retail traders, corporations hedge by gambling, and market makers print money by managing Greek letters. The original smart contracts, except the code is written by lawyers and executed by clearing houses.