stablecoins: apply the chain-total exclusions to chain dominance - #875
stablecoins: apply the chain-total exclusions to chain dominance#875tarun-khatri wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (68)
📝 WalkthroughWalkthroughThe chain dominance response now excludes pegged assets marked as ChangesChain dominance calculation
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
265b8e1 to
873bbd8
Compare
craftStablecoinChainsResponseandcraftChainDominanceResponseboth report stablecoin totals per chain, but they don't apply the same exclusions. The chains path starts withwhile the dominance path maps over every asset with no filter at all. The two endpoints therefore disagree for the same chain on the same day:
/stablecoindominance/<chain>/stablecoinchainsWhat makes up the gap
66 assets carry
doublecounted: true, and 17 carrydeadFrom. Summing what each group contributes per chain from the publishedchainCirculating:The doublecounted column matches the observed endpoint delta, which is what you'd expect given the chains endpoint already filters it.
deadFromis the second half. It is honoured instorePegged.ts,storeNewPeggedBalances.ts,storeAllPeggedAssets.tsandstoreCharts.ts, but in none of the serving paths — so a dead asset'slastBalancestays frozen at its final day, and sincecoins.llama.fireturns no price for these collapsed tokens thepegType === "peggedUSD" ? 1 : 0fallback values every unit at exactly $1.00.Fix
Adds both exclusions so the dominance figures agree with the chain totals they sit alongside.
I could not run the api2 cache locally, so this is verified against the published endpoints and by summing the two flagged groups from
chainCirculatingrather than by executing the cron task.tsc --noEmitgives the same 50 pre-existing errors before and after, none in this file.Related: I have #874 open adding the
deadFromexclusion togetStablecoinChains.ts. Different file and different function; this one needs both flags because it currently has neither.getStableCoins.tshas the same omission, but dropping an asset there would also drop its detail page, so that one looks like a deliberate call rather than an oversight.Summary by CodeRabbit