Manual settlement run
Triggers POST /settle/run. The worker scans for pending_commission rows whose settle_at is in the past, marks them settled, records a settlement row in D1, and (in production) submits the on-chain payout via the oracle.
Cloudflare Workers backend with a daily Cron Trigger. Each cycle cut-off (23:00 UTC), the worker queries D1 for ready commissions, re-checks Position.status on chain, and submits a batched settlement instruction signed by the registered oracle key.
Triggers POST /settle/run. The worker scans for pending_commission rows whose settle_at is in the past, marks them settled, records a settlement row in D1, and (in production) submits the on-chain payout via the oracle.
Oracle is the only signer the network program accepts for place_member, record_purchase, and add_earnings.
No settlement runs yet — trigger one above.