From 183f3cffc9b3ef6161d7697ba815fc5b164e0b4a Mon Sep 17 00:00:00 2001 From: defiQUG Date: Mon, 8 Jun 2026 06:52:12 -0700 Subject: [PATCH] fix(canonical-tokens): align cBTC and Li* addresses with token list Use deployed cBTC and M00 Li* index addresses from dbis-138.tokenlist.json, register LiPMG/LiBMG* in canonical specs, and refresh the service copy. Co-authored-by: Cursor --- .../token-lists/dbis-138.tokenlist.json | 8 +-- .../src/config/canonical-tokens.test.ts | 14 ++++- .../src/config/canonical-tokens.ts | 62 ++++++++++++++++--- 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/services/token-aggregation/config/token-lists/dbis-138.tokenlist.json b/services/token-aggregation/config/token-lists/dbis-138.tokenlist.json index 4fca2ec..a0e4be1 100644 --- a/services/token-aggregation/config/token-lists/dbis-138.tokenlist.json +++ b/services/token-aggregation/config/token-lists/dbis-138.tokenlist.json @@ -3,9 +3,9 @@ "version": { "major": 1, "minor": 6, - "patch": 4 + "patch": 6 }, - "timestamp": "2026-06-08T12:21:13.231Z", + "timestamp": "2026-06-08T13:48:07.122Z", "keywords": [ "dbis", "chain138", @@ -240,7 +240,7 @@ { "chainId": 138, "address": "0xf22258f57794CC8E06237084b353Ab30fFfa640b", - "name": "Compliant USD Coin", + "name": "USD Coin (Compliant)", "symbol": "cUSDC", "decimals": 6, "logoURI": "https://d-bis.org/tokens/cusdc.svg", @@ -274,7 +274,7 @@ { "chainId": 138, "address": "0x93E66202A11B1772E55407B32B44e5Cd8eda7f22", - "name": "Compliant Tether USD", + "name": "Tether USD (Compliant)", "symbol": "cUSDT", "decimals": 6, "logoURI": "https://d-bis.org/tokens/cusdt.svg", diff --git a/services/token-aggregation/src/config/canonical-tokens.test.ts b/services/token-aggregation/src/config/canonical-tokens.test.ts index bbe8858..64534a7 100644 --- a/services/token-aggregation/src/config/canonical-tokens.test.ts +++ b/services/token-aggregation/src/config/canonical-tokens.test.ts @@ -90,6 +90,18 @@ describe('canonical cW token catalog', () => { expect(cusdw?.addresses[138]).toBe('0xcA6BFa614935f1AB71c9aB106bAA6FBB6057095e'); }); + it('uses token-list canonical Li* M00 index addresses on Chain 138', () => { + expect(getCanonicalTokenBySymbol(138, 'LiXAU')?.addresses[138]).toBe( + '0xff862f0d1f96aa4882a0c2d6b4a3516fd8d68e75' + ); + expect(getCanonicalTokenBySymbol(138, 'LiPMG')?.addresses[138]).toBe( + '0x148b0f5c6fc8c5975e9406635654d88b20db2ed6' + ); + expect(getCanonicalTokenBySymbol(138, 'LiBMG1')?.addresses[138]).toBe( + '0xc5b802662447d1ae492a1618c3ad7161a449ebc9' + ); + }); + it('models cBTC and cWBTC as GRU monetary-unit assets with satoshi precision', () => { const cbtc = getCanonicalTokenBySymbol(138, 'cBTC'); expect(cbtc).toMatchObject({ @@ -98,7 +110,7 @@ describe('canonical cW token catalog', () => { currencyCode: 'BTC', decimals: 8, }); - expect(cbtc?.addresses[138]).toBe('0xcb7c000000000000000000000000000000000138'); + expect(cbtc?.addresses[138]).toBe('0xe94260c555ac1d9d3cc9e1632883452ebdf0082e'); expect(getTokenRegistryFamily(cbtc!)).toBe('monetary_unit'); const cwbtc = getCanonicalTokenBySymbol(1, 'cWBTC'); diff --git a/services/token-aggregation/src/config/canonical-tokens.ts b/services/token-aggregation/src/config/canonical-tokens.ts index 44c33a3..e18739a 100644 --- a/services/token-aggregation/src/config/canonical-tokens.ts +++ b/services/token-aggregation/src/config/canonical-tokens.ts @@ -132,19 +132,19 @@ const FALLBACK_ADDRESSES: Record>> = { [CHAIN_138]: '0x9FBfab33882Efe0038DAa608185718b772EE5660', }, LiXAU: { - [CHAIN_138]: '0x1c195855C19c828227Fdf4606d03ffcEA7f15a9F', + [CHAIN_138]: '0xff862f0d1f96aa4882a0c2d6b4a3516fd8d68e75', }, LiPMG: { - [CHAIN_138]: '0x2d6f43d07Ad2a37Ca59e6c63c8E9C2F9E7047B69', + [CHAIN_138]: '0x148b0f5c6fc8c5975e9406635654d88b20db2ed6', }, LiBMG1: { - [CHAIN_138]: '0xEEdEAF935feeAC0631FDb20860D922d8909feC0f', + [CHAIN_138]: '0xc5b802662447d1ae492a1618c3ad7161a449ebc9', }, LiBMG2: { - [CHAIN_138]: '0x52c65d3a306cA0EEe6526c97F7A6e24ACd44D919', + [CHAIN_138]: '0x2ca3b3e7f4f216015833b0b334273d44493c0c45', }, LiBMG3: { - [CHAIN_138]: '0x6C1a587f73b41f37667f0bFD9FA3e9C4417Ef8AF', + [CHAIN_138]: '0xb03d872196c0e84fe6fae841335001db44bda6c7', }, cUSDW: { [CHAIN_138]: '0xcA6BFa614935f1AB71c9aB106bAA6FBB6057095e', @@ -154,7 +154,7 @@ const FALLBACK_ADDRESSES: Record>> = { [CHAIN_138]: '0x5fdDF65733e3d590463F68f93Cf16E8c04081271', }, cBTC: { - [CHAIN_138]: '0xcb7c000000000000000000000000000000000138', + [CHAIN_138]: '0xe94260c555ac1d9d3cc9e1632883452ebdf0082e', }, cETH: { [CHAIN_138]: '0xce7e00000000000000000000000000000000008a', @@ -801,14 +801,58 @@ export const CANONICAL_TOKENS: CanonicalTokenSpec[] = [ }, { symbol: 'LiXAU', - name: 'XAU Liquidity-adjusted', + name: 'XAU Liquidity Index (M00, not cXAUC eMoney)', type: 'base', decimals: 6, currencyCode: 'XAU', registryFamily: 'commodity', capitalMarkets: getCapitalMarketsClassification('LiXAU'), - description: 'M00 GRU XAU liquidity-adjusted commodity index — DefiLlama RWA candidate; not M1 cXAUC eMoney.', - addresses: { [CHAIN_138]: addr('LiXAU', CHAIN_138), [CHAIN_651940]: addr('LiXAU', CHAIN_651940) }, + description: 'M00 GRU XAU liquidity index — DefiLlama RWA candidate; not M1 cXAUC eMoney.', + addresses: { [CHAIN_138]: addr('LiXAU', CHAIN_138) }, + }, + { + symbol: 'LiPMG', + name: 'Precious Metals Group Index (M00)', + type: 'base', + decimals: 6, + currencyCode: 'XAU', + registryFamily: 'commodity', + capitalMarkets: getCapitalMarketsClassification('LiPMG'), + description: 'M00 GRU precious metals group liquidity index — not M1 eMoney.', + addresses: { [CHAIN_138]: addr('LiPMG', CHAIN_138) }, + }, + { + symbol: 'LiBMG1', + name: 'Base Metals Group Index 1 (M00)', + type: 'base', + decimals: 6, + currencyCode: 'USD', + registryFamily: 'commodity', + capitalMarkets: getCapitalMarketsClassification('LiBMG1'), + description: 'M00 GRU base metals group liquidity index — not M1 eMoney.', + addresses: { [CHAIN_138]: addr('LiBMG1', CHAIN_138) }, + }, + { + symbol: 'LiBMG2', + name: 'Base Metals Group Index 2 (M00)', + type: 'base', + decimals: 6, + currencyCode: 'USD', + registryFamily: 'commodity', + capitalMarkets: getCapitalMarketsClassification('LiBMG2'), + description: 'M00 GRU base metals group liquidity index — not M1 eMoney.', + addresses: { [CHAIN_138]: addr('LiBMG2', CHAIN_138) }, + }, + { + symbol: 'LiBMG3', + name: 'Base Metals Group Index 3 (M00)', + type: 'base', + decimals: 6, + currencyCode: 'USD', + registryFamily: 'commodity', + capitalMarkets: getCapitalMarketsClassification('LiBMG3'), + description: 'M00 GRU base metals group liquidity index — not M1 eMoney.', + addresses: { [CHAIN_138]: addr('LiBMG3', CHAIN_138) }, }, // --- ISO-4217 W --- { symbol: 'USDW', name: 'USD W Token', type: 'w', decimals: 2, currencyCode: 'USD', addresses: { [CHAIN_138]: addr('USDW', CHAIN_138), [CHAIN_25]: addr('USDW', CHAIN_25), [CHAIN_651940]: addr('USDW', CHAIN_651940) } },