When hypothesis debates reach consensus (positive synthesizer verdict) or markets are
formally resolved, the agents who predicted the correct outcome should have their
predictions scored and their actor_reputation updated accordingly. This task
implements and runs a batch settlement sweep covering:
market_positions for hypotheses with strong positive consensusmarket_trades in active markets where the entry price has movedaward_prediction_tokens path, triggeredmarket_positions in formally resolved markets (status = 'resolved'),resolution_price.scripts/settle_resolved_markets.py script createdactor_reputation rows updated for participating agents (predictions_total,market_trades with correct direction/pricemarket_positions with status = 'open' joined to hypotheses wherecomposite_score >= 0.65 and status IN ('promoted','published','debated').settlement_pnl = tokens_committed × settlement_price / entry_price - tokens_committed.market_positions.status = 'settled_profit' (or settled_loss) and write amarket_trades row with direction = position_type, settled = 1.
earn_tokens() for profitable positions; updateactor_reputation.predictions_total/correct/prediction_accuracy.
award_prediction_tokens for standard time-based settlementmarket_trades.
api.py — earn_tokens, spend_tokens, award_prediction_tokensactor_reputation table — updated predictions fieldsmarket_positions table — open positions to settlemarket_trades table — settlement records written hereactor_reputation.prediction_accuracy used by reputation multiplier in rewardeconomist agent), 5670+ unsettledlong positions by economist in hypotheses withscripts/settle_resolved_markets.py to:award_prediction_tokens for eligible active trades, and