Repository navigation
fix(curation): count curator fees in the network signal total - #336
Merged
juanmardefago merged 8 commits intoOct 11, 2026
Merged
Conversation
Curator fees paid into a curation pool raised each deployment's signal but not totalTokensSignalled, so the total fell behind by every fee ever paid: 1,801,315 GRT on Arbitrum by 2026-09-25.
The fee test only had a pool with no GNS signal. This one gives the GNS contract a quarter of a pool and checks it takes a quarter of the fees as auto-migrating signal.
A deployment grafted from a version that left curator query fees out of totalTokensSignalled inherits a total short by exactly the fees paid so far, so add them back once and record it.
Lint flagged these imports as unused in files this branch already touches.
Network signal is split into GRT curated through the GNS contract and GRT curated directly. Adding past fees to the total alone left the 2 parts 1,801,315 GRT short of it on Arbitrum, so the GNS part is reset to what its shares are worth and direct gets the rest. L1 is unchanged.
The one-time step that adds back past curator fees walks every pool the GNS contract curates. Saving straight away stops each later handler in the same block from repeating that walk.
Removes 3 commented-out helper functions, shortens 2 comments that ran long, and wraps 2 test lines that were wider than the formatter's 100-character limit.
juanmardefago
requested changes
Sep 29, 2026
juanmardefago
self-requested a review
October 11, 2026 02:50
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.
Motivation
When an indexer collects query fees, a cut goes into that deployment's curation pool. That adds GRT to the pool without creating new shares, so every curator's shares become worth more. The subgraph was adding that GRT to the deployment's own
signalledTokensbut not to the network-widetotalTokensSignalled, so the network total fell further behind with every fee paid.This PR counts curator query fees in
totalTokensSignalledand its auto-migrating and direct split. A deployment grafted from an earlier version adds the fees it missed back to the total once and, on Arbitrum, re-splits it by the current value of the GNS contract's shares. Those fees raised each deployment's signal but not the network total, which had fallen behind by 1,801,315 GRT on Arbitrum by 2026-09-25.