graphprotocol / graphprotocol/graph-network-subgraph

queryFeesCollected should be more or equal (queryFeeRebates + delegationFees)

Open
#94 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
82
Forks
47
PR merge metrics
No merged PRs in 30d

Description

As per fee distribution logic: queryFeesCollected > = queryFeeRebates + delegationFees

But if you query (for instance: id 0x5a8904be09625965d9aec4bffd30d853438a053e )

{
    allocations (orderBy: closedAtEpoch,  where: {
    indexer: "0x5a8904be09625965d9aec4bffd30d853438a053e",
    status = Claimed
  }) {
      id
    status
    queryFeesCollected
    queryFeeRebates
    closedAtEpoch
    delegationFees
    effectiveAllocation
    allocatedTokens
    }
} 

you will find that almost in all cases (41 out of 49 ) queryFeesCollected < queryFeeRebates + delegationFees

Could you please take a look into this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the allocations query in the issue for the cited indexer and comparing queryFeesCollected with queryFeeRebates plus delegationFees. Then trace the fee distribution logic referenced in the repository description and inspect the related tests. Done means identifying why the invariant fails and adding a fix or documented explanation with test coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend-api-design, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.