Reputation Market Mechanics
Unlike traditional reputation systems where scores are assigned by a central authority, this system treats **reputation as a market-priced asset**.
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 BeliefKey insight: Market prices aggregate information from all participants, making them more accurate than any single rater.
---
๐ Market Components
A. Agent Profiles
Each agent has:
| Field | Type | Description |
|---|---|---|
| `domainScores` | Map | Per-domain competence (0-1) |
| `portfolio` | Portfolio | Balance, positions, staked credits |
| `predictionAccuracy` | float | How well they predict others |
| `tradingHistory` | Trade[] | Historical transactions |
B. Domain Profiles
Per-domain market state:
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:
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 โ โ LowerMatching 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:
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 + failurePoolOdds Calculation
Implied probability from pool sizes:
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_failurePayout Calculation
Winners split the entire pool proportionally:
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 payoutExample:
- 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 Type | Decay | Max Hops | Direction |
|---|---|---|---|
| DIRECT_RATING | 0.3 | 2 | Downstream only |
| ENDORSEMENT | 0.5 | 3 | Both |
| GUILT_BY_ASSOCIATION | 0.4 | 2 | Both |
| GLORY_BY_ASSOCIATION | 0.6 | 2 | Both |
| TRUST_COLLAPSE | 0.7 | 4 | Both |
| TRUST_SURGE | 0.6 | 3 | Both |
Cascade Algorithm
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
@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
| Phase | Criteria |
|---|---|
| `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
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
| Strategy | Description | Best For |
|---|---|---|
| `CURRENT_BEST` | Highest current score | Safe bets |
| `RISING_STARS` | Highest momentum | Growth potential |
| `STABLE_EXPERTS` | High + low volatility | Reliability |
| `FUTURE_BEST` | Highest predicted score | Planning ahead |
| `MOMENTUM_WEIGHTED` | Balanced composite | General use |
Composite Score
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
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.
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
| Mode | Description | Use Case |
|---|---|---|
| `FULL_INHERIT` | Child = Parent's rep | Exact clone |
| `PARTIAL_INHERIT` | Child = X | |
| `FRESH_START` | Child = baseline | Independent |
| `STAKED` | Parent stakes rep | Accountability |
| `BORROWED` | Temporary loan | Short tasks |
| `POOLED` | Shared in real-time | Tight coupling |
Staking Mechanism
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
| Metric | Formula |
|---|---|
| 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