graphprotocol / graphprotocol/graph-network-subgraph
Query Fees Collected - does not match estimation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
What
The total amount of queryFeesCollected for closed long term allocation does not match estimation (manual calculation):
Investigation:
Closed Allocation (open: 65, close: 91, duration: 27) as per query below collected 0.05 GRT, which is dramatically low in comparison with allocations before and after.
| totalAllocations__closedAtEpoch | totalAllocations__createdAtEpoch | totalAllocations__id | totalAllocations__queryFeesCollected | totalAllocations__status |
|---|---|---|---|---|
| 108 | 91 | 0x097922fdc28907b5dd60d0c710865cd80ed56318 | 86.5619865 | Closed |
| 91 | 65 | 0xd3409eb7abf379a12835cb66898771a83c8b4473 | 0.05047515 | Closed |
| 65 | 58 | 0x978b11c0953599ad52b889d03867fc5112976d95 | 17.9900028 | Closed |
| 58 | 45 | 0x26b957c2a141acf5768e21efe0d9afff8d587a4e | 259.0472907 | Closed |
| 58 | 49 | 0x5feacb47af67dee57ee10bedaef5ad93627b1d97 | 9.7461144 | Closed |
| 58 | 46 | 0xc66d80f65188311ec1dccd23c77da91354803a50 | 141.8263506 | Closed |
Query:
{
indexer (id:"0x720a98087160bfdb282f695abe6f9ac966b03d43") {
id
totalAllocations{
id
status
createdAtEpoch
closedAtEpoch
indexingRewards
poi
queryFeesCollected
queryFeeRebates
}
}}
As per summary from server logs for mentioned period, the total amount of queries received and fees collected, should be:
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 102511, 20210217
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 189511, 20210219
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 180074, 20210220
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 173312, 20210221
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 148499, 20210222
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 166510, 20210223
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 172330, 20210224
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 161198, 20210225
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 152411, 20210226
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 140392, 20210227
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 138167, 20210228
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 134491, 20210301
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 113156, 20210302
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 129508, 20210303
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 122893, 20210304
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 25581, 20210305
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 190944, 20210306
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 151229, 20210307
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 117728, 20210308
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 54805, 20210309
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 126816, 20210310
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 169748, 20210311
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 161799, 20210312
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 166621, 20210313
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 163947, 20210314
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 74610, 20210315
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 7516, 20210316
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 106211, 20210317
QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF, 138919, 20210318
| Query | Price | Total |
|---|---|---|
| 3881437 | 0.00005 | 194.07185 |
Could you, please, help to figure out this issue.
Regards,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GraphQL indexer query for totalAllocations and compare the allocation from epoch 65 to 91 with the supplied server-log query totals. Trace how queryFeesCollected is populated for closed allocations; done means explaining or correcting the discrepancy against the expected total of 194.07185.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- blockchain, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100