fix: collect indexing rewards once per epoch, not every 15 min#1229
Closed
MoonBoi9001 wants to merge 1 commit into
Closed
fix: collect indexing rewards once per epoch, not every 15 min#1229MoonBoi9001 wants to merge 1 commit into
MoonBoi9001 wants to merge 1 commit into
Conversation
9b39e64 to
054d469
Compare
An open allocation's indexing rewards were collected about every fifteen minutes, held back only by a wall-clock window. Rewards accrue continuously and the next collection sweeps up everything earned since the last, so a single collection per epoch keeps the same earnings at far less gas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
054d469 to
e740bd9
Compare
Member
Author
|
Closed to make way for #1231 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
An indexer that keeps an allocation open collects its indexing rewards periodically without closing it, and today the agent fires one of those collections roughly every fifteen minutes. Since rewards accrue continuously and a single collection per epoch still gathers everything earned in that epoch, this change spaces the collections out to at most once per epoch. It is an efficiency fix that cuts redundant gas — the total rewards an indexer earns are unchanged.
Motivation
When an indexer keeps an allocation open for a long time, the agent periodically collects the indexing rewards it has earned without closing the allocation. Those rewards accrue continuously, so collecting once an epoch rather than every few minutes still gathers everything earned in between — the indexer just receives it in fewer, larger batches.
Today the agent re-collects on every reconciliation pass; the only thing holding it back is an unrelated fifteen-minute window that stops the same action being queued twice in quick succession, so the cadence tracks wall-clock time rather than epochs. On a network with day-long epochs that can mean up to ninety-six collections a day where one per epoch would gather the same rewards, and since every collection is its own on-chain transaction the indexer pays that gas over and over for no extra earnings.
Summary