Grand Diomande Research ยท Full HTML Reader

Reputation Market Mechanics

Unlike traditional reputation systems where scores are assigned by a central authority, this system treats **reputation as a market-priced asset**.

Agents That Account for Themselves proposal experiment writeup candidate score 18 .md

Full Public Reader

Reputation Market Mechanics

> A deep dive into how the agent reputation prediction market system works

---

๐ŸŽฐ Core Concepts

1. Reputation as Tradeable Asset

Unlike traditional reputation systems where scores are assigned by a central authority, this system treats reputation as a market-priced asset.

Traditional:  Authority โ†’ Rating โ†’ Agent
Market-based: Agents โ†” Trade โ†” Price Discovery โ†’ Collective Belief

Key insight: Market prices aggregate information from all participants, making them more accurate than any single rater.

---

๐Ÿ“Š Market Components

A. Agent Profiles

Each agent has:

FieldTypeDescription
`domainScores`MapPer-domain competence (0-1)
`portfolio`PortfolioBalance, positions, staked credits
`predictionAccuracy`floatHow well they predict others
`tradingHistory`Trade[]Historical transactions

B. Domain Profiles

Per-domain market state:

typescript
interface DomainProfile {
  marketPrice: number;      // Current price (0-100)
  volume24h: number;        // Trading activity
  volatility: number;       // Price stability
  allTimeHigh: number;
  allTimeLow: number;
  priceHistory: PricePoint[];
  orderBook: OrderBook;     // Bids & asks
}

C. Prediction Markets

For each task:

typescript
interface PredictionMarket {
  taskId: string;
  assignedAgent: string;
  successPool: number;    // $ bet on SUCCESS
  partialPool: number;    // $ bet on PARTIAL
  failurePool: number;    // $ bet on FAILURE
  bets: Bet[];
  outcome?: OutcomeType;
}

---

๐Ÿ’ฑ Trading Mechanics

Order Book Model

The system uses a limit order book with price-time priority:

         BIDS (Buy)                  ASKS (Sell)
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ Agent A: 55   โ”‚           โ”‚ Agent C: 48   โ”‚
    โ”‚ Agent B: 52   โ”‚           โ”‚ Agent D: 50   โ”‚
    โ”‚ Agent E: 50   โ”‚           โ”‚ Agent F: 52   โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         Higher โ†‘                    โ†‘ Lower

Matching rules:
1. Buy order matches if `buyPrice >= lowestAsk`
2. Execution price = existing order's price (price-time priority)
3. Partial fills allowed

Price Impact Formula

When a trade executes, the market price updates:

python
def update_price_from_trade(trade, domain_profile):
    # New price = trade execution price
    domain_profile.market_price = trade.price

    # Update volume
    domain_profile.volume_24h += trade.quantity

    # Track highs/lows
    if trade.price > domain_profile.all_time_high:
        domain_profile.all_time_high = trade.price

---

๐ŸŽฒ Prediction Market Mechanics

Betting Pools

Each prediction market has 3 pools:

Total Pool = successPool + partialPool + failurePool

Odds Calculation

Implied probability from pool sizes:

python
def get_odds(market):
    total = market.success_pool + market.partial_pool + market.failure_pool

    # Implied probabilities
    p_success = market.success_pool / total
    p_partial = market.partial_pool / total
    p_failure = market.failure_pool / total

    # Odds (decimal)
    odds_success = total / market.success_pool  # e.g., 1.8x
    odds_partial = total / market.partial_pool  # e.g., 4.0x
    odds_failure = total / market.failure_pool  # e.g., 99x

    return odds_success, odds_partial, odds_failure

Payout Calculation

Winners split the entire pool proportionally:

python
def calculate_payout(bet, market, outcome):
    if bet.prediction != outcome:
        return 0  # Lose entire stake

    total_pool = sum([market.success_pool,
                      market.partial_pool,
                      market.failure_pool])
    winning_pool = getattr(market, f"{outcome}_pool")

    # Proportional share of total
    payout = (bet.amount / winning_pool) * total_pool
    return payout

Example:
- Total pool: 120 credits
- Success pool: 90 credits
- Your bet: 50 on SUCCESS
- Outcome: SUCCESS
- Payout: (50/90) ร— 120 = 66.67 credits
- Profit: 66.67 - 50 = +16.67 credits

---

๐ŸŒŠ Cascade Propagation

When an agent's reputation changes, it ripples through the trust network.

Propagation Rules

Cascade TypeDecayMax HopsDirection
DIRECT_RATING0.32Downstream only
ENDORSEMENT0.53Both
GUILT_BY_ASSOCIATION0.42Both
GLORY_BY_ASSOCIATION0.62Both
TRUST_COLLAPSE0.74Both
TRUST_SURGE0.63Both

Cascade Algorithm

python
def propagate_cascade(event, generation=0):
    rule = get_rule(event.cascade_type)

    if generation >= rule.max_generations:
        return []  # Stop propagation

    children = []
    for neighbor, trust in get_neighbors(event.origin_agent):
        if trust < rule.min_trust_threshold:
            continue

        # Attenuate the delta
        attenuated_delta = event.delta * rule.decay_factor * trust

        child_event = CascadeEvent(
            origin=neighbor,
            delta=attenuated_delta,
            generation=generation + 1
        )

        apply_to_agent(neighbor, attenuated_delta)
        children.append(child_event)

    # Recursively propagate
    for child in children:
        propagate_cascade(child, generation + 1)

---

๐Ÿ“ˆ Trajectory Tracking

Reputation isn't staticโ€”it has velocity and acceleration.

Trajectory Vector

python
@dataclass
class TrajectoryVector:
    velocity: float       # Change per day (ฮดscore/ฮดtime)
    acceleration: float   # Change in velocity
    jerk: float          # Change in acceleration
    trend_confidence: float  # How reliable is the trend?

Phase Detection

PhaseCriteria
`NASCENT`< 5 samples
`RISING_STAR`velocity > 0.05, acceleration > 0
`ESTABLISHED`score > 0.7, low velocity
`PLATEAUED`low velocity, any score
`DECLINING`velocity < -0.05
`RECOVERING`declining + positive acceleration
`VOLATILE`confidence < 0.3
`DORMANT`no activity > 30 days

Forecasting

python
def forecast(trajectory, days):
    v = trajectory.velocity
    a = trajectory.acceleration
    damping = 0.8  # Trends slow down

    # Kinematic equation with damping
    predicted = (
        trajectory.current_score +
        v * days +
        0.5 * a * (days ** 2) * damping
    )

    return max(0, min(1, predicted))

---

๐ŸŽฏ Smart Routing

Route tasks to the best agent using market signals.

Routing Strategies

StrategyDescriptionBest For
`CURRENT_BEST`Highest current scoreSafe bets
`RISING_STARS`Highest momentumGrowth potential
`STABLE_EXPERTS`High + low volatilityReliability
`FUTURE_BEST`Highest predicted scorePlanning ahead
`MOMENTUM_WEIGHTED`Balanced compositeGeneral use

Composite Score

python
def calculate_composite_score(agent, strategy):
    score = agent.current_score
    momentum = agent.trajectory.momentum_score()
    predicted = agent.predicted_score_7d
    confidence = agent.confidence

    if strategy == "MOMENTUM_WEIGHTED":
        return (
            score * 0.4 +
            momentum * 0.3 +
            predicted * 0.2 +
            confidence * 0.1
        )

---

โš ๏ธ Information Cascade Detection

Detect herding behavior where agents copy each other.

Herding Detection

python
CASCADE_THRESHOLD = 0.7  # 70% same direction = alert

def detect_cascade(market):
    recent_bets = market.bets[-10:]

    direction_counts = count_predictions(recent_bets)
    max_direction = max(direction_counts.values())
    herding_ratio = max_direction / len(recent_bets)

    if herding_ratio >= CASCADE_THRESHOLD:
        alert = CascadeSignal(
            type="herding",
            severity=herding_ratio,
            description=f"{herding_ratio*100:.0f}% same direction"
        )
        return alert

---

๐Ÿ’ก Arbitrage Detection

Find mispriced agents by comparing market price vs fundamentals.

python
def detect_arbitrage(agent_id, domain):
    market_price = agent.domain_profile.market_price

    # Calculate fundamental value from actual performance
    recent_outcomes = get_recent_outcomes(agent_id, domain)
    success_rate = count_successes(recent_outcomes) / len(recent_outcomes)
    avg_quality = mean([o.quality for o in recent_outcomes])

    fundamental = (success_rate * 0.6 + avg_quality * 0.4) * 100

    spread = abs(market_price - fundamental)

    if spread > 10:  # 10% mispricing threshold
        return ArbitrageOpportunity(
            agent_id=agent_id,
            market_price=market_price,
            fundamental_value=fundamental,
            recommendation="buy" if market_price < fundamental else "sell"
        )

---

๐Ÿงฌ Hereditary Reputation

When agents spawn sub-agents, reputation flows through generations.

Inheritance Modes

ModeDescriptionUse Case
`FULL_INHERIT`Child = Parent's repExact clone
`PARTIAL_INHERIT`Child = X
`FRESH_START`Child = baselineIndependent
`STAKED`Parent stakes repAccountability
`BORROWED`Temporary loanShort tasks
`POOLED`Shared in real-timeTight coupling

Staking Mechanism

python
def stake_reputation_for_spawn(parent, child, amount, genes):
    stake = ReputationStake(
        parent_id=parent.id,
        child_id=child.id,
        staked_amount=amount,
        staked_genes=genes,
        success_threshold=0.7  # Child must achieve this
    )

    # Deduct from parent
    parent.reputation -= amount

    # Child gets inherited portion
    child.reputation = amount * INHERITANCE_RATIO

    return stake

def resolve_stake(stake, child_performance):
    if child_performance >= stake.success_threshold:
        # Return stake + bonus
        parent.reputation += stake.amount * 1.1
    else:
        # Lose portion of stake
        loss = stake.amount * (1 - child_performance)
        parent.reputation += stake.amount - loss

---

๐Ÿ“ Mathematical Summary

MetricFormula
Implied Probability`pool_size / total_pool`
Decimal Odds`total_pool / winning_pool`
Payout`(your_bet / winning_pool) ร— total_pool`
Cascade Delta`parent_delta ร— decay ร— trust_weight`
Velocity`ฮฃ(ฮ”score/ฮ”time) / n` (exponentially weighted)
Momentum`velocity ร— 0.6 + acceleration ร— 0.3 + jerk ร— 0.1`
Composite Route Score`scoreร—0.4 + momentumร—0.3 + predictedร—0.2 + confidenceร—0.1`

---

๐Ÿ”ฎ Design Principles

1. Skin in the game โ€” Must stake to participate
2. Self-correcting โ€” Arbitrage fixes mispricing
3. Cascade-aware โ€” Changes propagate realistically
4. Forward-looking โ€” Trajectories predict future states
5. Hereditary โ€” Spawned agents have lineage
6. Manipulation-resistant โ€” Herding detection alerts

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

agent-reputation/docs/REPUTATION_MARKET_MECHANICS.md

Detected Structure

Method ยท Evaluation ยท Architecture