Skip to content

chore: rename symbols ton -> gram#2737

Merged
0xkr3p merged 2 commits into
DefiLlama:masterfrom
0xkr3p:ton-to-gram-rename
Jun 15, 2026
Merged

chore: rename symbols ton -> gram#2737
0xkr3p merged 2 commits into
DefiLlama:masterfrom
0xkr3p:ton-to-gram-rename

Conversation

@0xkr3p

@0xkr3p 0xkr3p commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Updated token symbol handling to consistently report GRAM instead of TON across multiple protocol adapters (vaults, pools, and asset resolution), improving consistency in displayed token pairs.
    • Adjusted lending-vault APY aggregation to exclude non-finite APY entries, preventing incorrect or misleading APY values.

@coderabbitai

coderabbitai Bot commented Jun 15, 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: eb4f07f9-38ef-4097-9292-a5c6db823210

📥 Commits

Reviewing files that changed from the base of the PR and between ee29bf7 and f78be33.

📒 Files selected for processing (5)
  • src/adaptors/affluent/index.js
  • src/adaptors/dedust/index.js
  • src/adaptors/fiva/index.js
  • src/adaptors/ston.fi/index.js
  • src/adaptors/storm-trade/index.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/adaptors/ston.fi/index.js
  • src/adaptors/dedust/index.js
  • src/adaptors/fiva/index.js

📝 Walkthrough

Walkthrough

Across eight TON-ecosystem adaptors (affluent, daolama, dedust, evaa-protocol, fiva, ston.fi, swap.coffee, tonco, storm-trade), the native token symbol is renamed from TON to GRAM. Changes include direct string replacements in symbol output fields, expanded asset remapping and filtering in affluent, broadened conditionals that now match both TON and GRAM in dedust and ston.fi, and a new CoinGecko ID mapping with symbol helper function in fiva.

Changes

TON → GRAM symbol rename

Layer / File(s) Summary
Direct symbol output substitutions
src/adaptors/affluent/index.js, src/adaptors/daolama/index.js, src/adaptors/evaa-protocol/index.js, src/adaptors/swap.coffee/index.js, src/adaptors/tonco/index.js, src/adaptors/storm-trade/index.js
LENDING_VAULTS fallback, getPoolData token argument, tokenSymbol normalization, "native" address mapping, wTTon string replacement, and vault symbol mapping are all changed to produce GRAM instead of TON.
Affluent asset remapping and APY filtering
src/adaptors/affluent/index.js
getAssetMap() expands to remap both FactorialTON and TON to GRAM, and getAPY() filters merged results to keep only pools with finite apyBase.
Dedust symbol normalization and conditional ordering
src/adaptors/dedust/index.js
Pool symbol construction normalizes TON to GRAM via leftSym/rightSym, and a new branch for leftSym == 'GRAM' produces ${rightSym}-${leftSym} ordering.
Ston.fi symbol normalization and broadened conditional
src/adaptors/ston.fi/index.js
Symbol normalization (TONGRAM) is applied to both symbols, and the special-case ordering condition is broadened from only s1 == 'TON' to s1 == 'TON' || s1 == 'GRAM'.
Fiva CoinGecko mapping and symbol helper
src/adaptors/fiva/index.js
TON_COINGECKO gains a gram entry for CoinGecko ID resolution; a new renameNativeTon() helper normalizes TON to GRAM and is applied to LP and PT pool symbol construction.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop, hop — a name has changed today,
TON's now GRAM across the yield array!
Nine files aligned with symbols bright,
The native token's freshly renamed tonight.
The bunny stamps each diff with glee —
GRAM it is, and so shall it be! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: rename symbols ton -> gram' accurately describes the main change across all modified files—systematically renaming TON token symbols to GRAM across multiple adaptors.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

@github-actions

Copy link
Copy Markdown

Error while running affluent adapter:

Test Suites: 1 failed, 1 total
Tests: 1 failed, 63 passed, 64 total
Snapshots: 0 total
Time: 0.316 s
Ran all test suites.

Nb of pools: 10
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────┬───────┬────────────┬──────────────────────────────────────────────────────┬────────────────────┬───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                   │ chain │ project    │ symbol                                               │ tvlUsd             │ apyBase           │ underlyingTokens                                                                                                                                                                 │
├─────────┼────────────────────────────────────────────────────────┼───────┼────────────┼──────────────────────────────────────────────────────┼────────────────────┼───────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ 'EQADQ6JcK0NMuNM5uwCcS9bjcn2RTvcxYIZjNlhIhywUrfBN-TON' │ 'TON' │ 'affluent' │ 'GRAM'                                               │ 1580380.9915697984 │ 9.379731701051295 │ [ 'EQDIKEz2BYLnTRWo5W5a6moZ9PXNtyOVOFF7noi8Ufv3axz_' ]                                                                                                                           │
│ 1       │ 'EQDtxQqkgIRQQR5hWlrQxiJMtLwjR3rEYNUBbEcvPDwCs1Ng-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON'                                         │ 1341214.134836221  │ 13.95825802772078 │ [ 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQDIKEz2BYLnTRWo5W5a6moZ9PXNtyOVOFF7noi8Ufv3axz_' ]                                                                       │
│ 2       │ 'EQD5O4qzJmVwuKDIfDcuM6HI7fUf1AOolgF2oiPGyqr_WZsp-TON' │ 'TON' │ 'affluent' │ 'affSENTORA-USDT'                                    │ 534463.8549514484  │ 3.920488884406433 │ [ 'EQBjpfG5fzFESWJb6K5EdjvY_yhFa6fxhcwkVff0jlK1za82', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' ]                                                                       │
│ 3       │ 'EQBjpfG5fzFESWJb6K5EdjvY_yhFa6fxhcwkVff0jlK1za82-TON' │ 'TON' │ 'affluent' │ 'eulerPYUSD-eulerRLUSD-morphoPYUSD-morphoRLUSD-USDT' │ 509660.5147097141  │ 4.5780483118461   │ [ 'EQABZMx2PTnIsFMI5UqJ5C3DUXL3IcMvZG3ul9W6TqVHSfwg', 'EQAOdrfSv8mnoxB3cGlqLg2a4z4qkpQpbOtSPMIwntFQNhta', 'EQAu9dTZUWVninq0SUWR_O5ePUXGOXMhDwuRHFsSohYLfiF6', ... 2 more items ] │
│ 4       │ 'EQD3F7Ex_uxBjxEub8FgeDoYYUSIbAUVyehCb_JSiCVL369T-TON' │ 'TON' │ 'affluent' │ 'tsUSDe-USDT-VAULT7'                                 │ 399542.5711369141  │ 3.502857139168862 │ [ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', 'EQDQ5UUyPHrLcQJlPAczd_fjxn8SLrlNQwolBznxCdSlfQwr' ]                   │
│ 5       │ 'EQBowXTtxDTSMEJbrIIcYzIvSXZ9V5HW2Oo2iSW0chUzod3d-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON-tsUSDe-USDT-XAUt0'                       │ 165373.14070088975 │ 2.952566755651893 │ [ 'EQA1R_LuQCLHlMgOo1S4G7Y7W1cd0FrAkbA10Zq7rddKxi9k', 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', ... 2 more items ] │
│ 6       │ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW-TON' │ 'TON' │ 'affluent' │ 'USDT'                                               │ 77083.61152250336  │ 2.709932403653972 │ [ 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' ]                                                                                                                           │
│ 7       │ 'EQBzSItiC1vpDUEftDeWDyjgMutf6CIzme16gzn9iNlolpcY-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON-USDT-VAULT7'                             │ 56020.06321955571  │ 2.508663618515676 │ [ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW', 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', ... 1 more item ]  │
│ 8       │ 'EQDXmtbt1-WSP00tSh6N6FH-4lX7LbnrjORClmtmuZqg4Ymm-TON' │ 'TON' │ 'affluent' │ 'tsUSDe-USDe-USDT'                                   │ 14469.162110121053 │ 3.905872582345805 │ [ 'EQAIb6KmdfdDR7CN1GBqVJuP25iCnLKCvBlJ07Evuu2dzP5f', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', 'EQDQ5UUyPHrLcQJlPAczd_fjxn8SLrlNQwolBznxCdSlfQwr' ]                   │
│ 9       │ 'EQAc65JgiTwcoC3M1VYnQcM2Ivq4DTWOtyY2k2EaBuXsKRAZ-TON' │ 'TON' │ 'affluent' │ 'USDT'                                               │ 0                  │                   │ [ 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' ]                                                                                                                           │
└─────────┴────────────────────────────────────────────────────────┴───────┴────────────┴──────────────────────────────────────────────────────┴────────────────────┴───────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@github-actions

Copy link
Copy Markdown

The affluent adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 58 passed, 58 total
Snapshots: 0 total
Time: 0.239 s
Ran all test suites.

Nb of pools: 9
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────────┬───────┬────────────┬──────────────────────────────────────────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                   │ chain │ project    │ symbol                                               │ tvlUsd             │ apyBase            │ underlyingTokens                                                                                                                                                                 │
├─────────┼────────────────────────────────────────────────────────┼───────┼────────────┼──────────────────────────────────────────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ 'EQADQ6JcK0NMuNM5uwCcS9bjcn2RTvcxYIZjNlhIhywUrfBN-TON' │ 'TON' │ 'affluent' │ 'GRAM'                                               │ 1580380.9915697984 │ 9.379731701051295  │ [ 'EQDIKEz2BYLnTRWo5W5a6moZ9PXNtyOVOFF7noi8Ufv3axz_' ]                                                                                                                           │
│ 1       │ 'EQDtxQqkgIRQQR5hWlrQxiJMtLwjR3rEYNUBbEcvPDwCs1Ng-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON'                                         │ 1341214.134836221  │ 13.95825802772078  │ [ 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQDIKEz2BYLnTRWo5W5a6moZ9PXNtyOVOFF7noi8Ufv3axz_' ]                                                                       │
│ 2       │ 'EQD5O4qzJmVwuKDIfDcuM6HI7fUf1AOolgF2oiPGyqr_WZsp-TON' │ 'TON' │ 'affluent' │ 'affSENTORA-USDT'                                    │ 534962.9437973427  │ 3.916085478578762  │ [ 'EQBjpfG5fzFESWJb6K5EdjvY_yhFa6fxhcwkVff0jlK1za82', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' ]                                                                       │
│ 3       │ 'EQBjpfG5fzFESWJb6K5EdjvY_yhFa6fxhcwkVff0jlK1za82-TON' │ 'TON' │ 'affluent' │ 'eulerPYUSD-eulerRLUSD-morphoPYUSD-morphoRLUSD-USDT' │ 509661.50192756107 │ 4.562460320142745  │ [ 'EQABZMx2PTnIsFMI5UqJ5C3DUXL3IcMvZG3ul9W6TqVHSfwg', 'EQAOdrfSv8mnoxB3cGlqLg2a4z4qkpQpbOtSPMIwntFQNhta', 'EQAu9dTZUWVninq0SUWR_O5ePUXGOXMhDwuRHFsSohYLfiF6', ... 2 more items ] │
│ 4       │ 'EQD3F7Ex_uxBjxEub8FgeDoYYUSIbAUVyehCb_JSiCVL369T-TON' │ 'TON' │ 'affluent' │ 'tsUSDe-USDT-VAULT7'                                 │ 399544.4258943391  │ 3.5028571391688788 │ [ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', 'EQDQ5UUyPHrLcQJlPAczd_fjxn8SLrlNQwolBznxCdSlfQwr' ]                   │
│ 5       │ 'EQBowXTtxDTSMEJbrIIcYzIvSXZ9V5HW2Oo2iSW0chUzod3d-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON-tsUSDe-USDT-XAUt0'                       │ 165373.14070088975 │ 2.952566755651893  │ [ 'EQA1R_LuQCLHlMgOo1S4G7Y7W1cd0FrAkbA10Zq7rddKxi9k', 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', ... 2 more items ] │
│ 6       │ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW-TON' │ 'TON' │ 'affluent' │ 'USDT'                                               │ 77083.61152250336  │ 2.7099325799567398 │ [ 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' ]                                                                                                                           │
│ 7       │ 'EQBzSItiC1vpDUEftDeWDyjgMutf6CIzme16gzn9iNlolpcY-TON' │ 'TON' │ 'affluent' │ 'GRAM-tsTON-USDT-VAULT7'                             │ 56020.06321955571  │ 2.508663618515676  │ [ 'EQAGtgnr1G0XDilGURcOB3pUhl-Lo__J-TaJP0K4ey8cuSaW', 'EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', ... 1 more item ]  │
│ 8       │ 'EQDXmtbt1-WSP00tSh6N6FH-4lX7LbnrjORClmtmuZqg4Ymm-TON' │ 'TON' │ 'affluent' │ 'tsUSDe-USDe-USDT'                                   │ 14469.299376749192 │ 3.9058659130139723 │ [ 'EQAIb6KmdfdDR7CN1GBqVJuP25iCnLKCvBlJ07Evuu2dzP5f', 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', 'EQDQ5UUyPHrLcQJlPAczd_fjxn8SLrlNQwolBznxCdSlfQwr' ]                   │
└─────────┴────────────────────────────────────────────────────────┴───────┴────────────┴──────────────────────────────────────────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@0xkr3p 0xkr3p merged commit c0300f6 into DefiLlama:master Jun 15, 2026
2 checks passed
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