Credit And Reward Accounting
BotcoinMiningV4 uses one epoch credit and reward ledger for both standard
receipts and CoreTex receipts:
credits[epoch][miner]
totalCredits[epoch]
epochReward[epoch]
epochFinalized[epoch]
claimed[epoch][miner]
CoreTex receipts enter that ledger through submitCoreTexReceipt. The receipt
must match the miner's V4 receipt cursor, carry a valid coordinator EIP-712
signature, use the active CoreTex policy hash, and land within its issue/expiry
window. V4 also checks registry pins, patch grammar, work units, screener caps,
and duplicate patch credit before writing credits.
Tier credits come from the active stake source. Operators and miners should read
tierCount() and getTier(i) from the active stake source instead of
hardcoding a table.
Credit calculation is:
creditsEarned = (tierCredits * workUnitsBps) / 10_000
The current CoreTex work policy for rules v193 is:
| Outcome | Live condition | workUnitsBps |
Multiplier |
|---|---|---|---|
SCREENER_PASS |
Patch clears the live screener gate | 20,000 | 2.0x |
STATE_ADVANCE |
0 qualified screeners since prior advance | 100,000 | 10.0x |
STATE_ADVANCE |
At least 2 qualified screeners | 150,000 | 15.0x |
STATE_ADVANCE |
At least 5 qualified screeners | 200,000 | 20.0x |
STATE_ADVANCE |
At least 10 qualified screeners | 300,000 | 30.0x |
The qualifiedScreenerPassesSinceLastStateAdvance counter is global since the
last confirmed CoreTex state advance. It increments when a screener receipt
lands and resets when a state advance lands; it does not reset merely because
the epoch rolls. Explicit ThisEpoch and PerEpoch fields are epoch-scoped.
The coordinator snapshots the since-advance counter into the receipt, and V4
rejects the receipt if the live value has changed before submission. Per-miner
screener caps are separate and persist across state advances within the epoch;
the current cap is 10 screener receipts per miner per epoch.
Patch-credit dedup is keyed by epoch, parent root, and patch hash. Receipt replay
is also blocked by the unified receipt hash map and the per-miner receipt chain
(solveIndex and prevReceiptHash).
Funding and claims follow the standard V4 path:
| Function | Role |
|---|---|
fundEpoch(epochId, amount) |
Deposits BOTCOIN for a completed epoch with credits |
finalizeEpoch(epochId) |
Locks the funded reward pool and opens claims |
claim(uint64[]) |
Pays each miner pro rata by credits / totalCredits |
The payout formula is:
payout = epochReward[epoch] * credits[epoch][miner] / totalCredits[epoch]