Hardcode kUSD (id 402) price to 1 in peggedAssets prices#871
Open
enerzy17 wants to merge 1 commit into
Open
Conversation
kUSD is a USDC-backed stablecoin: minted and redeemed 1:1 through the on-chain Peg Stability Module on Base. Its coins.llama.fi source returns no price for base:0x5C2EfdF0D8D286959b42308966bc2B97f5680AA3 and the gecko_id kerne-usd does not exist, so the id-402 pegged price resolves null. Hardcode finalRes["kerne-usd"] = 1, matching the existing m-2 precedent in this file, so the stablecoin price reads 1.00.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesPrice mapping
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 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 |
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.
kUSD (peggedasset id 402, added in #819) is a USDC-backed stablecoin on Base. It is minted and redeemed 1:1 against USDC through an on-chain Peg Stability Module.
#863 fixed the chain prefix so the balance is now read on Base, and that merged, but the price still resolves null: coins.llama.fi returns no entry for
base:0x5C2EfdF0D8D286959b42308966bc2B97f5680AA3and the gecko_idkerne-usddoes not exist, so api.llama.fi shows kUSD with a null price on the stablecoins board.This is the one-line follow-up I offered in #863: hardcode
finalRes["kerne-usd"] = 1, directly beside the existingfinalRes["m-2"] = 1precedent in the same file, so the peg reads 1.00. Because kUSD is 1:1 USDC redeemable through the PSM, 1.00 is the correct pegged price.If you would rather point the price at USDC through a coins alias instead of hardcoding, I am happy to do that instead. No rush on either.
Summary by CodeRabbit