Summary
Production stats show:
- total_donations_usd: $210,869.18
- total_payouts_usd: $295,036.12
Payouts are higher than donations, which should never happen.
After investigation, donations appear correct, but payouts are over-counted by approximately $106,000 due to 4x duplicate payout records for the AI pot in the indexer database.
Environment
- Frontend:
potlock-nextjs-app
- Backend:
django-indexer
- Production API:
https://api.potlock.io
- Date: Jan 19, 2026
Observed Behavior
From /v1/stats:
total_donations_usd: 210869.18
total_payouts_usd: 295036.12
yaml
Copy code
- Payouts ($295k) > Donations ($210k)
- This violates expected quadratic funding logic.
Root Cause
The issue is isolated to the pot:
ai.v1.potfactory.potlock.near
Blockchain vs indexer:
- Blockchain: 20 payouts, 11,149 NEAR
- Indexer: 80 payouts, 30,627 NEAR
The same payouts were indexed four times.
Other pots do not show this duplication.
Impact
AI pot over-counting:
- Inflated AI pot payout USD: $141,256
- Real AI pot payout USD: ~$35,314
- Over-counted by: ~$105,942
Expected corrected totals:
total_donations_usd: $210,869 (unchanged)
total_payouts_usd: ~$189,094
After correction, donations > payouts.
Initial Assumption (Later Proven Incorrect)
It was initially thought that:
- Donations with NULL
total_amount_usd were not counted
- Missing CoinGecko price mappings caused under-reporting
These were not the main cause.
The discrepancy was caused by duplicate payout indexing.
Fix Required
Summary
Production stats show:
Payouts are higher than donations, which should never happen.
After investigation, donations appear correct, but payouts are over-counted by approximately $106,000 due to 4x duplicate payout records for the AI pot in the indexer database.
Environment
potlock-nextjs-appdjango-indexerhttps://api.potlock.ioObserved Behavior
From
/v1/stats:total_donations_usd: 210869.18
total_payouts_usd: 295036.12
yaml
Copy code
Root Cause
The issue is isolated to the pot:
ai.v1.potfactory.potlock.nearBlockchain vs indexer:
The same payouts were indexed four times.
Other pots do not show this duplication.
Impact
AI pot over-counting:
Expected corrected totals:
total_donations_usd: $210,869 (unchanged)total_payouts_usd: ~$189,094After correction, donations > payouts.
Initial Assumption (Later Proven Incorrect)
It was initially thought that:
total_amount_usdwere not countedThese were not the main cause.
The discrepancy was caused by duplicate payout indexing.
Fix Required
PotPayoutrecords for the AI pot/v1/statsafter cleanup