Revise AGIALPHA economics spec#81
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - **Synthetic Wage Rate** — Wage equilibrium emerges from emissions versus output: | ||
|
|
||
| ```solidity | ||
| function rewardPerAlphaWU() public view returns (uint256) { | ||
| return epochEmission / totalAlphaWU; // AGIALPHA per α‑WU | ||
| function rewardPerAlphaWU(uint64 epoch) public view returns (uint256) { | ||
| return epochEmission[epoch] / totalAlphaWU[epoch]; | ||
| } |
There was a problem hiding this comment.
Guard rewardPerAlphaWU against zero output epochs
rewardPerAlphaWU divides epochEmission[epoch] by totalAlphaWU[epoch] without handling the common case where no node produced α‑WU in an epoch. When totalAlphaWU[epoch] == 0 the call will revert with a division-by-zero, so dashboards or other contracts cannot query wage data for empty epochs. The spec should define a fallback value (e.g., return 0) or state how zero-output epochs are prevented before deployment.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task