Skip to content

fix: collect indexing rewards once per epoch, not every 15 min#1229

Closed
MoonBoi9001 wants to merge 1 commit into
main-dipsfrom
mb9/collect-indexing-rewards-once-per-epoch
Closed

fix: collect indexing rewards once per epoch, not every 15 min#1229
MoonBoi9001 wants to merge 1 commit into
main-dipsfrom
mb9/collect-indexing-rewards-once-per-epoch

Conversation

@MoonBoi9001

@MoonBoi9001 MoonBoi9001 commented Jun 3, 2026

Copy link
Copy Markdown
Member

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

  • Tag each rewards collection with the epoch it was made in.
  • Skip any allocation already collected in the current epoch before collecting again.
  • A new epoch makes the allocation eligible again, so it collects at most once per epoch.
  • Leave the existing fifteen-minute throttle in place for all other action types.

@github-project-automation github-project-automation Bot moved this to 🗃️ Inbox in Indexer Jun 3, 2026
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/collect-indexing-rewards-once-per-epoch branch 4 times, most recently from 9b39e64 to 054d469 Compare June 3, 2026 11:52
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>
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/collect-indexing-rewards-once-per-epoch branch from 054d469 to e740bd9 Compare June 3, 2026 11:57
@MoonBoi9001 MoonBoi9001 requested a review from Maikol June 3, 2026 13:45
@MoonBoi9001 MoonBoi9001 marked this pull request as ready for review June 3, 2026 13:46
@MoonBoi9001 MoonBoi9001 closed this Jun 4, 2026
@github-project-automation github-project-automation Bot moved this from 🗃️ Inbox to ❌ Closed in Indexer Jun 4, 2026
@MoonBoi9001

Copy link
Copy Markdown
Member Author

Closed to make way for #1231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ❌ Closed

Development

Successfully merging this pull request may close these issues.

1 participant