Skip to content

Hardcode kUSD (id 402) price to 1 in peggedAssets prices#871

Open
enerzy17 wants to merge 1 commit into
DefiLlama:masterfrom
enerzy17:fix/kusd-price-hardcode
Open

Hardcode kUSD (id 402) price to 1 in peggedAssets prices#871
enerzy17 wants to merge 1 commit into
DefiLlama:masterfrom
enerzy17:fix/kusd-price-hardcode

Conversation

@enerzy17

@enerzy17 enerzy17 commented Jul 13, 2026

Copy link
Copy Markdown

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:0x5C2EfdF0D8D286959b42308966bc2B97f5680AA3 and the gecko_id kerne-usd does 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 existing finalRes["m-2"] = 1 precedent 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

  • Bug Fixes
    • Added a fixed price of 1 for the Kerne USD asset, ensuring it is consistently recognized in price data.

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.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3ed2181-cef8-4873-896f-6d0469c14e22

📥 Commits

Reviewing files that changed from the base of the PR and between 8f6d8d8 and c41a585.

📒 Files selected for processing (1)
  • src/adapters/peggedAssets/prices/index.ts

📝 Walkthrough

Walkthrough

getPrices now includes a hardcoded "kerne-usd" price of 1 in its final output map. Existing price-fetching logic remains unchanged.

Changes

Price mapping

Layer / File(s) Summary
Add Kerne USD price entry
src/adapters/peggedAssets/prices/index.ts
getPrices adds "kerne-usd": 1 to the final hardcoded price map.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: waynebruce0x, 0xngmi, reynardoew, g1nt0ki, cocoahomology

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it does not follow the required new-listing template or include the template's required fields. Fill in the template sections (Name, Website Link, Logo, Chain, IDs, descriptions, token address, peg details, priceSource, wiki, Twitter, audits) or explain why they are unavailable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: hardcoding kUSD's price to 1 in peggedAssets prices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant