Skip to content

Conversation

@0xApotheosis
Copy link
Member

@0xApotheosis 0xApotheosis commented Jan 6, 2026

Description

Updates the CoinGecko ID mapping for Polygon's native token from matic-network to polygon-ecosystem-token.

After the MATIC to POL migration on September 4, 2024, CoinGecko deprecated the matic-network ID. The old ID now returns empty price data (current_price: {}, circulating_supply: 0.0), causing Polygon to display as $0.00 in the app.

The new polygon-ecosystem-token ID returns live pricing data (~$0.126 USD currently).

Confirmed we can still swap: https://jam.dev/c/036b5160-480f-4962-a9ad-c2b91fa2318e

Issue (if applicable)

closes #10887

Risk

Low Risk - This is a simple string mapping change in the CoinGecko adapter. No transaction logic, wallet interactions, or contract calls are affected.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None. This only affects price display data fetched from CoinGecko.

Testing

Engineering

  1. Run the app locally
  2. Navigate to the Polygon asset page (/assets/eip155:137/slip44:60)
  3. Verify the price displays correctly (should show ~$0.12-0.13 USD)
  4. Verify market data (market cap, volume, etc.) displays correctly

Alternatively, verify via API:

  • Old (broken): curl https://api.coingecko.com/api/v3/coins/matic-network returns empty current_price
  • New (working): curl https://api.coingecko.com/api/v3/coins/polygon-ecosystem-token returns live price data

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Test in preview environment:

  1. Navigate to any page showing Polygon (POL) price
  2. Verify the price is no longer $0.00
  3. Verify the price matches current market price (~$0.12-0.13 USD)

Screenshots (if applicable)

Screenshot 2026-01-06 at 6 13 00 pm

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the Polygon asset identifier used for token recognition, improving accuracy of asset names and data synchronization for Polygon mainnet tokens and reducing mismatches in displayed asset information.
  • Tests

    • Updated test expectations to align with the corrected Polygon identifier and ensure consistent behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Updated the CoinGecko asset ID for Polygon from matic-network to polygon-ecosystem-token across implementation and test files (3 files), changing the asset resolution mapping for chain eip155:137/slip44:60.

Changes

Cohort / File(s) Summary
CoinGecko Polygon Mapping Update
packages/caip/src/adapters/coingecko/index.test.ts, packages/caip/src/adapters/coingecko/utils.test.ts, packages/caip/src/adapters/coingecko/utils.ts
Replaced CoinGecko ID for Polygon (matic-networkpolygon-ecosystem-token) in runtime mapping and test expectations. No signature or control-flow changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • premiumjibles
  • NeOMakinG

Poem

🐰 I hopped through code with floppy ears agleam,
Swapped one token name to mend a broken stream,
From matic-network to polygon-ecosystem-token I flew,
Now numbers unfrozen and dancing anew—yay, woohoo! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating the Polygon CoinGecko ID mapping from 'matic-network' to 'polygon-ecosystem-token'.
Linked Issues check ✅ Passed The pull request addresses the objective in issue #10887 by updating the CoinGecko ID mapping to restore accurate Polygon pricing, meeting the acceptance criteria for displaying correct, nonzero prices.
Out of Scope Changes check ✅ Passed All changes are scoped to updating the Polygon CoinGecko ID mapping across test and utility files; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/polygon-price-coingecko-id

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dece477 and 2fbc463.

⛔ Files ignored due to path filters (17)
  • packages/caip/src/adapters/coincap/generated/eip155_1/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/eip155_137/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/eip155_42161/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/eip155_43114/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/eip155_56/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/eip155_8453/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coincap/generated/solana_5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_1/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_10/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_137/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_42161/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_43114/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_56/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_8453/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/eip155_999/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/solana_5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/adapter.json is excluded by !**/generated/**
  • packages/caip/src/adapters/coingecko/generated/sui_35834a8a/adapter.json is excluded by !**/generated/**
📒 Files selected for processing (3)
  • packages/caip/src/adapters/coingecko/index.test.ts
  • packages/caip/src/adapters/coingecko/utils.test.ts
  • packages/caip/src/adapters/coingecko/utils.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/caip/src/adapters/coingecko/index.test.ts
  • packages/caip/src/adapters/coingecko/utils.test.ts
  • packages/caip/src/adapters/coingecko/utils.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Call / Static

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 and usage tips.

@0xApotheosis 0xApotheosis marked this pull request as ready for review January 6, 2026 07:14
@0xApotheosis 0xApotheosis requested a review from a team as a code owner January 6, 2026 07:14
Copy link
Collaborator

@NeOMakinG NeOMakinG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Seems like doing the do, it will need another generation/mergefix, but stamping as it looks sane!

…tem-token

After the MATIC to POL migration on September 4, 2024, CoinGecko deprecated
the 'matic-network' ID which now returns empty price data. This updates the
mapping to use 'polygon-ecosystem-token' which has live pricing.

Fixes #10887

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@0xApotheosis 0xApotheosis force-pushed the fix/polygon-price-coingecko-id branch from dece477 to 2fbc463 Compare January 6, 2026 20:15
@0xApotheosis 0xApotheosis merged commit 1689c3c into develop Jan 6, 2026
4 checks passed
@0xApotheosis 0xApotheosis deleted the fix/polygon-price-coingecko-id branch January 6, 2026 20:27
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.

Polygon price showing as $0.00

3 participants