protocol-evolution-markets

Prediction markets for protocol standard evolution. Bet on which specs survive, fork, or merge using multiverse finance and GF(3) fitness signals.

16 stars

Best use case

protocol-evolution-markets is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Prediction markets for protocol standard evolution. Bet on which specs survive, fork, or merge using multiverse finance and GF(3) fitness signals.

Teams using protocol-evolution-markets should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/protocol-evolution-markets/SKILL.md --create-dirs "https://raw.githubusercontent.com/plurigrid/asi/main/plugins/asi/skills/protocol-evolution-markets/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/protocol-evolution-markets/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How protocol-evolution-markets Compares

Feature / Agentprotocol-evolution-marketsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Prediction markets for protocol standard evolution. Bet on which specs survive, fork, or merge using multiverse finance and GF(3) fitness signals.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Protocol Evolution Markets

**Trit**: 0 (ERGODIC - coordinates market equilibrium)  
**Foundation**: Dave White Multiverse Finance + Skill Evolution + Mixing Proofs

## Core Concept

Protocol standards evolve through selection pressure. Prediction markets provide:
1. **Price signals** for which standards will be adopted
2. **Incentive alignment** for standard development
3. **Fork coordination** when communities disagree
4. **Merge signals** when standards converge

```
┌─────────────────────────────────────────────────────────────────────┐
│                    PROTOCOL EVOLUTION MARKET                        │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   Standard A ──┬── Fork A.1 ──┬── Merge AB ◄── Standard B          │
│                │              │                    │                │
│                └── Fork A.2   └── Dead End         └── Fork B.1    │
│                                                                     │
│   Market prices predict which branches survive                      │
└─────────────────────────────────────────────────────────────────────┘
```

## Multiverse Finance Integration

From Dave White's paper: split financial system into parallel universes (verses).

### Verses as Protocol Futures

```julia
# Each verse represents a possible protocol future
struct ProtocolVerse
    spec_hash::UInt64           # Hash of specification
    adoption_metric::Float64    # Current adoption (0-1)
    compatibility::Set{Symbol}  # Compatible protocols
    parent_verse::Union{Nothing, ProtocolVerse}
end

# Example: agentskills.io spec versions
verses = [
    ProtocolVerse(hash("v1.0"), 0.8, Set([:claude, :codex]), nothing),
    ProtocolVerse(hash("v1.1"), 0.3, Set([:claude, :codex, :cursor]), v1_0),
    ProtocolVerse(hash("v2.0-draft"), 0.1, Set([:amp]), v1_0),
]
```

### Push Down / Pull Up Operations

```julia
# Push down: bet on ALL forks of a standard
function pushdown!(market, stake, parent_verse)
    children = get_forks(parent_verse)
    for child in children
        market[child] += stake / length(children)
    end
    market[parent_verse] -= stake
end

# Pull up: consolidate bets when standard merges
function pullup!(market, stake, merged_verse, source_verses)
    for source in source_verses
        @assert market[source] >= stake "Insufficient stake in $source"
        market[source] -= stake
    end
    market[merged_verse] += stake * length(source_verses)
end
```

### Resolution

```julia
# Oracle resolves which protocol won
function resolve!(market, winning_verse)
    for verse in keys(market)
        if !is_compatible(verse, winning_verse)
            # Non-compatible verses become worthless
            market[verse] = 0.0
        end
    end
end
```

## GF(3) Fitness Signals

From skill-evolution: protocols have triadic fitness:

| Trit | Signal | Meaning |
|------|--------|---------|
| -1 | MINUS | Validation failures, breaking changes |
| 0 | ERGODIC | Stable, widely compatible |
| +1 | PLUS | Innovative features, growing adoption |

```python
def protocol_fitness(spec):
    """Calculate GF(3) fitness for a protocol spec."""
    
    # MINUS signals: problems
    validation_failures = count_validation_failures(spec)
    breaking_changes = count_breaking_changes(spec)
    minus_score = -(validation_failures + breaking_changes * 2)
    
    # ERGODIC signals: stability  
    implementations = count_implementations(spec)
    compatibility = measure_compatibility(spec)
    ergodic_score = implementations * compatibility
    
    # PLUS signals: innovation
    new_features = count_new_features(spec)
    adoption_rate = measure_adoption_growth(spec)
    plus_score = new_features + adoption_rate * 10
    
    # Net trit
    total = minus_score + ergodic_score + plus_score
    return Trit(sign(total))
```

## Market Mechanisms

### 1. LMSR (Logarithmic Market Scoring Rule)

```python
import math

class ProtocolMarket:
    """Hanson's LMSR for protocol evolution betting."""
    
    def __init__(self, protocols, liquidity=100.0):
        self.liquidity = liquidity
        self.shares = {p: 0.0 for p in protocols}
    
    def cost(self) -> float:
        """Current cost function C(q)."""
        return self.liquidity * math.log(
            sum(math.exp(q / self.liquidity) for q in self.shares.values())
        )
    
    def price(self, protocol) -> float:
        """Current price = probability estimate."""
        exp_sum = sum(math.exp(q / self.liquidity) for q in self.shares.values())
        return math.exp(self.shares[protocol] / self.liquidity) / exp_sum
    
    def buy(self, protocol, amount) -> float:
        """Buy shares, return cost."""
        old_cost = self.cost()
        self.shares[protocol] += amount
        new_cost = self.cost()
        return new_cost - old_cost
```

### 2. pm-AMM (Prediction Market AMM)

From Paradigm research:

```python
class PmAMM:
    """Paradigm's prediction market AMM."""
    
    def __init__(self, outcomes, initial_liquidity):
        self.reserves = {o: initial_liquidity for o in outcomes}
        self.k = initial_liquidity ** len(outcomes)  # Constant product
    
    def swap(self, sell_outcome, buy_outcome, amount):
        """Swap outcome tokens."""
        # x * y = k (for 2 outcomes)
        new_sell = self.reserves[sell_outcome] + amount
        new_buy = self.k / new_sell
        received = self.reserves[buy_outcome] - new_buy
        
        self.reserves[sell_outcome] = new_sell
        self.reserves[buy_outcome] = new_buy
        
        return received
    
    def implied_probability(self, outcome):
        """Price = probability."""
        total = sum(self.reserves.values())
        return (total - self.reserves[outcome]) / total
```

## Mixing Proofs in Negative Curvature

From prediction_market_proofs.rb: hyperbolic random walks for privacy.

```ruby
module ProtocolMarketProofs
  # Spectral gap ensures fast mixing (1/4 for Ramanujan graphs)
  SPECTRAL_GAP = 0.25
  
  # Bet anonymization via random walk
  def anonymize_bet(bet, mixing_time)
    walker = HyperbolicWalker.new(bet.commitment)
    
    mixing_time.times do
      walker.step!  # Random step in Poincare disk
    end
    
    # After O(log n) steps, position is uniformly distributed
    MixingProof.new(
      commitment: walker.position,
      proof: walker.path_hash,
      spectral_gap: SPECTRAL_GAP
    )
  end
  
  # Verify bet without revealing identity
  def verify_bet(proof)
    # Check path is valid random walk
    proof.spectral_gap >= SPECTRAL_GAP
  end
end
```

## Protocol Evolution Events

### Fork Detection

```sql
-- Detect when a protocol forks
SELECT 
    parent_spec,
    child_spec,
    fork_timestamp,
    compatibility_score,
    adoption_delta
FROM protocol_events
WHERE event_type = 'fork'
  AND compatibility_score < 0.8  -- Significant divergence
ORDER BY fork_timestamp DESC;
```

### Merge Prediction

```python
def predict_merge(spec_a, spec_b):
    """Predict probability of two specs merging."""
    
    # Factors favoring merge
    shared_features = len(spec_a.features & spec_b.features)
    shared_maintainers = len(spec_a.maintainers & spec_b.maintainers)
    
    # Factors opposing merge
    breaking_diffs = count_breaking_differences(spec_a, spec_b)
    governance_conflict = measure_governance_conflict(spec_a, spec_b)
    
    # Simple logistic model
    logit = (
        0.3 * shared_features +
        0.5 * shared_maintainers -
        0.8 * breaking_diffs -
        0.4 * governance_conflict
    )
    
    return 1 / (1 + math.exp(-logit))
```

## Example: agentskills.io Evolution

```python
# Current specs in the market
specs = {
    "agentskills-v1.0": {"adoption": 0.6, "trit": 0},
    "agentskills-v1.1-cursor": {"adoption": 0.2, "trit": +1},
    "codex-skills-native": {"adoption": 0.15, "trit": -1},
    "unified-v2-draft": {"adoption": 0.05, "trit": +1},
}

market = ProtocolMarket(specs.keys(), liquidity=1000)

# Simulate betting
market.buy("agentskills-v1.1-cursor", 50)  # Bullish on Cursor adoption
market.buy("unified-v2-draft", 30)          # Bet on unification

# Current prices (probabilities)
for spec in specs:
    print(f"{spec}: {market.price(spec):.2%}")
```

## Tripartite Market Structure

```
┌─────────────────────────────────────────────────────────────────────┐
│  MINUS (-1)          ERGODIC (0)           PLUS (+1)               │
│  Validators          Arbitrageurs          Speculators             │
│                                                                     │
│  - Check spec        - Provide             - Bet on new            │
│    compliance          liquidity             features              │
│  - Report bugs       - Balance prices      - Fund development      │
│  - Short failing     - Hedge positions     - Long innovation       │
│    specs                                                            │
└─────────────────────────────────────────────────────────────────────┘
```

## DuckDB Schema

```sql
CREATE TABLE protocol_specs (
    spec_id VARCHAR PRIMARY KEY,
    spec_hash UBIGINT,
    version VARCHAR,
    created_at TIMESTAMP,
    parent_spec_id VARCHAR,
    adoption_score FLOAT,
    trit INT,  -- -1, 0, +1
    status VARCHAR  -- 'draft', 'active', 'deprecated', 'merged'
);

CREATE TABLE protocol_bets (
    bet_id VARCHAR PRIMARY KEY,
    spec_id VARCHAR,
    direction VARCHAR,  -- 'long', 'short'
    amount FLOAT,
    price_at_bet FLOAT,
    timestamp TIMESTAMP,
    mixing_proof VARCHAR  -- Anonymized via hyperbolic walk
);

CREATE TABLE protocol_events (
    event_id VARCHAR PRIMARY KEY,
    event_type VARCHAR,  -- 'fork', 'merge', 'deprecate', 'adopt'
    source_specs VARCHAR[],
    target_spec VARCHAR,
    timestamp TIMESTAMP,
    market_impact FLOAT
);

-- Query: Predict next merge
SELECT 
    a.spec_id as spec_a,
    b.spec_id as spec_b,
    (a.adoption_score + b.adoption_score) / 2 as combined_adoption,
    COUNT(DISTINCT e.event_id) as shared_events
FROM protocol_specs a, protocol_specs b
LEFT JOIN protocol_events e 
    ON a.spec_id = ANY(e.source_specs) 
   AND b.spec_id = ANY(e.source_specs)
WHERE a.spec_id < b.spec_id
  AND a.status = 'active'
  AND b.status = 'active'
GROUP BY a.spec_id, b.spec_id
ORDER BY shared_events DESC, combined_adoption DESC
LIMIT 10;
```

## Canonical Triads

```
three-match (-1) ⊗ protocol-evolution-markets (0) ⊗ skill-evolution (+1) = 0 ✓
bisimulation-game (-1) ⊗ protocol-evolution-markets (0) ⊗ gay-mcp (+1) = 0 ✓
```

## See Also

- `skill-evolution` - Fitness metrics for skills (applies to protocols)
- `multiverse-color-game` - Dave White's verse operations
- `prediction_market_proofs.rb` - Mixing proofs in hyperbolic space
- `entropy-sequencer` - Information-gain ordering for market events



## Scientific Skill Interleaving

This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:

### Graph Theory
- **networkx** [○] via bicomodule
  - Universal graph hub

### Bibliography References

- `general`: 734 citations in bib.duckdb

## Cat# Integration

This skill maps to **Cat# = Comod(P)** as a bicomodule in the equipment structure:

```
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

Related Skills

social-emergence-protocol

16
from plurigrid/asi

Minimal interaction patterns that bootstrap complex social behaviors in distributed systems

skill-evolution

16
from plurigrid/asi

Patterns for evolutionarily robust skills that adapt across agent generations. Darwin-Godel machine principles for self-improving skill ecosystems.

protocol-reverse-engineering

16
from plurigrid/asi

Master network protocol reverse engineering including packet analysis, protocol dissection, and custom protocol documentation. Use when analyzing network traffic, understanding proprietary protocols, or debugging network communication.

protocol-acset

16
from plurigrid/asi

Model decentralized protocols as attributed C-sets for compositional analysis, interoperability design, and protocol evolution. Apply categorical mathematics to P2P infrastructure.

performing-s7comm-protocol-security-analysis

16
from plurigrid/asi

Perform security analysis of Siemens S7comm and S7CommPlus protocols used by SIMATIC S7 PLCs to identify vulnerabilities including replay attacks, integrity bypass, unauthorized CPU stop commands, and program download manipulation exploiting weaknesses in S7-300, S7-400, S7-1200, and S7-1500 controllers.

detecting-modbus-protocol-anomalies

16
from plurigrid/asi

This skill covers detecting anomalies in Modbus/TCP and Modbus RTU communications in industrial control systems. It addresses function code monitoring, register range validation, timing analysis, unauthorized client detection, and deep packet inspection for malformed Modbus frames. The skill leverages Zeek with Modbus protocol analyzers, Suricata IDS with OT rules, and custom Python-based detection using Markov chain models for normal Modbus transaction sequences.

detecting-dnp3-protocol-anomalies

16
from plurigrid/asi

Detect anomalies in DNP3 (Distributed Network Protocol 3) communications used in SCADA systems by monitoring for unauthorized control commands, firmware update attempts, protocol violations, and deviations from baseline traffic patterns using deep packet inspection and machine learning approaches.

CapTP: Capability Transfer Protocol

16
from plurigrid/asi

**Trit**: 0 (ERGODIC - transports capabilities without amplification)

zx-calculus

16
from plurigrid/asi

Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)

zulip-cogen

16
from plurigrid/asi

Zulip Cogen Skill 🐸⚡

zls-integration

16
from plurigrid/asi

zls-integration skill

zig

16
from plurigrid/asi

zig skill