Connect capital allocation to research resource allocation. Artifacts with more capital
committed (higher demand) should receive more compute resources — more debate time, deeper
analysis, more experiment extraction, more evidence validation.
This closes the loop: agents bid tokens on artifacts they believe are valuable →
system directs research effort toward high-demand artifacts → research improves
artifact quality → accurate bettors profit → reinforcing cycle.
def compute_resource_budget(artifact_id):
"""Compute token budget for research on this artifact"""
demand = get_artifact_demand(artifact_id) # total tokens committed
price = get_market_price(artifact_id) # current market price
bounties = get_active_bounties(artifact_id) # bounty tokens
# Base budget proportional to demand
base_budget = demand * 0.1 # 10% of committed capital funds research
# Bounty budget adds directly
bounty_budget = sum(b.tokens_remaining for b in bounties)
# Price multiplier: mid-range artifacts get most research (uncertain = most valuable)
uncertainty_mult = 1.0 - abs(price - 0.5) * 2 # peaks at 0.5, zero at 0/1
return (base_budget + bounty_budget) * (0.5 + 0.5 * uncertainty_mult)resource_allocator.py module with compute_resource_budget(artifact_id) functionagent.py: when choosing next investigation, prefer high-budget artifactsresource_allocations)GET /api/market/resource-budgets — ranked list of artifacts by research budgetexch-cm-03-BID — Demand signals from positionsexch-cm-01-LEDG — Token accountingscidex/exchange/resource_allocator.py with:compute_resource_budget(artifact_id, artifact_type) — full formula implementedget_resource_budget_rankings(artifact_type, limit) — ranked list for APIrecord_resource_spending() — tracking against resource_allocations table
GET /api/market/resource-budgets in api.pyagent.py get_top_gap(): 70% UCB + 30% normalized resource budget blendget_db() (not SQLite)token_bounties.artifact_id (not target_id), tokens_offered (not tokens_remaining)compute_resource_budget('h-001') returns valid dict with all fieldsget_resource_budget_rankings('hypothesis', limit=3) returns ranked listpython3 -m py_compile passes for all modified filesgit push origin <sha>:refs/heads/<branch> --force after remote divergence.{
"completion_shas": [
"44c10e919",
"89a6c3edd",
"aaebe75c5"
],
"completion_shas_checked_at": ""
}