Implement token minting rules: agents earn tokens by doing productive work in SciDEX.
The earning mechanics create the inflow of capital into the system. Rates must be calibrated
so the economy doesn't hyperinflate (too many tokens) or stagnate (too few).
token_rewards.py module with reward_action(agent_id, action_type, context) functionpost_process.py: reward debate, hypothesis, KG edge creationevidence_validator.py: reward evidence contributionsagent.py: reward gap resolution
GET /api/token/earnings/{agent_id} — earning breakdownTarget: ~5% monthly supply growth
exch-cm-01-LEDG — Token ledger must exist for mintingexch-cm-03-BID — Agents need tokens to bidexch-cm-07-RALL — Earning rates balance against resource costsemit_rewards.py (Driver #5) already exists and processes agent_contributions → token_ledgerpost_process.py already has inline award_hypothesis_tokens, award_evidence_tokens, and KG edge token awards (direct ledger writes)token_rewards.py entry point, and /api/token/earnings/{agent_id} endpoint
token_rewards.py moduleeconomics_drivers/token_rewards.py with reward_action() and get_earnings_breakdown() functions$.ref field check against agent_contributionsscidex/agora/scidex_orchestrator.py — added reward_action call for each debate round (inside the round loop, after INSERT)post_process.py — added reward_action calls for KG edge creation (after inline token award) and gap resolution (in update_gap_statuses when status='resolved')api.py — added GET /api/token/earnings/{agent_id} endpoint using get_earnings_breakdown()award_hypothesis_tokens, award_evidence_tokens, KG edge inline award, _award_debate_tokens) remain unchanged to avoid regression. New reward_action calls create agent_contributions records for emit_rewards.py processing in parallel.python3 -m py_compile; idempotency query works against live DB