Epoch System

Epoch Lifecycle

Each epoch follows a defined lifecycle:

┌─────────────────────────────────────────────────────────────┐
│ EPOCH N START                                                │
│ 1. Generate random 32-byte epochSecret                       │
│ 2. Publish epochCommit = keccak256(epochSecret) on-chain     │
│ 3. Challenges are served using epochSecret in seed derivation│
├─────────────────────────────────────────────────────────────┤
│ DURING EPOCH N                                               │
│ • Miners request challenges, solve, submit receipts          │
│ • Credits accumulate on-chain per miner                      │
│ • epochSecret is NEVER exposed in challenge responses        │
├─────────────────────────────────────────────────────────────┤
│ EPOCH N+1 START                                              │
│ 1. Reveal epochSecret for epoch N on-chain                   │
│ 2. Fund epoch N with collected trading fees                   │
│ 3. Check bonus epoch status                                  │
│ 4. New epochSecret generated for epoch N+1                   │
├─────────────────────────────────────────────────────────────┤
│ AFTER EPOCH N IS FUNDED                                      │
│ • Miners claim rewards: reward = epochReward × (credits/total)│
│ • If bonus epoch: additional bonus rewards claimable          │
└─────────────────────────────────────────────────────────────┘

Epoch Funding

Epoch rewards come from BOTCOIN token trading fees:

  1. Trading fees accumulate in the Bankr ecosystem
  2. At epoch end, coordinator claims fees via the Bankr Agent API
  3. Claimed tokens are transferred to the deployer wallet
  4. Coordinator verifies on-chain transfer logs before funding
  5. fundEpoch() is called with the verified amount

Auditability

The commit-reveal scheme ensures full auditability:

  • Before epoch: epochCommit is published — timestamps the randomness commitment
  • During epoch: Secret is used but never revealed
  • After epoch: Secret is revealed — anyone can verify keccak256(secret) == commit
  • Audit: With the revealed secret, anyone can recompute all world seeds, regenerate all challenges, verify all artifacts, and confirm all receipts were honestly signed