# WETH9/WETH10 Decimals & Oracle Pricing Fix - Summary **Date:** 2026-01-26 **Status:** ✅ **FIXES COMPLETE** --- ## ✅ Issues Fixed ### 1. WETH9/WETH10 Decimals ✅ **Problem:** - WETH9 contract's `decimals()` function returns `0` instead of `18` - Causes MetaMask to display incorrect balances (e.g., "6,000,000,000.0T WETH" instead of "6 WETH") **Solution:** - ✅ All token lists updated with explicit `decimals: 18` for WETH9 and WETH10 - ✅ Token lists override contract's incorrect decimals - ✅ WETH10 already returns correct decimals (18), but included for consistency **Files Updated:** 1. ✅ `metamask-integration/docs/METAMASK_TOKEN_LIST.json` 2. ✅ `docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json` 3. ✅ `docs/04-configuration/metamask/METAMASK_TOKEN_LIST.tokenlist.json` 4. ✅ `token-lists/lists/dbis-138.tokenlist.json` --- ### 2. Oracle Pricing Configuration ✅ **Problem:** - Oracle contract exists but may not be providing correct pricing data - MetaMask doesn't automatically query oracle contracts (uses CoinGecko API) **Solution:** - ✅ Oracle contract address documented: `0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6` - ✅ Oracle setup guide created - ✅ dApp integration examples provided - ✅ CoinGecko listing process documented **Documentation Created:** 1. ✅ `docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md` 2. ✅ `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md` --- ## 📋 Token List Status ### Current Token List Entries | Token | Address | Decimals | Status | |-------|---------|----------|--------| | **WETH9** | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` | 18 | ✅ Fixed | | **WETH10** | `0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f` | 18 | ✅ Correct | | **cUSDT** | `0x93E66202A11B1772E55407B32B44e5Cd8eda7f22` | 6 | ✅ Correct | | **cUSDC** | `0xf22258f57794CC8E06237084b353Ab30fFfa640b` | 6 | ✅ Correct | | **ETH/USD Oracle** | `0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6` | 8 | ✅ Documented | **All token lists are consistent and correct.** --- ## 🎯 Next Steps ### Immediate Actions 1. **Host Token List** (Recommended) - Upload token list JSON to public URL - Add to MetaMask: Settings → Security & Privacy → Token Lists - Users will automatically get correct decimals 2. **Verify Oracle Publisher Service** - Check VMID 3500 service status - Verify prices are updating every 60 seconds - Test oracle contract queries 3. **User Instructions** (If token list not hosted) - Provide manual token import instructions - Users must manually set decimals to 18 for WETH9 ### Long-Term Actions 4. **CoinGecko Listing** (For native MetaMask USD support) - Submit tokens to CoinGecko - Provide market data - Wait for listing approval 5. **dApp Integration** (For custom price display) - Query oracle contract directly - Display USD values in dApp UI - Cache prices to reduce RPC calls --- ## 📚 Documentation ### Fix Guides 1. **Complete Fix Guide:** - `docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md` - Covers both WETH9/WETH10 decimals and oracle pricing 2. **Oracle Setup Guide:** - `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md` - Complete oracle configuration and integration guide ### Related Documentation - **Token List Guide:** `docs/11-references/TOKEN_LIST_AUTHORING_GUIDE.md` - **Oracle Integration:** `metamask-integration/docs/METAMASK_ORACLE_INTEGRATION.md` - **Contract Addresses:** `docs/11-references/CONTRACT_ADDRESSES_REFERENCE.md` --- ## ✅ Verification Checklist ### WETH9/WETH10 Decimals - [x] Token lists updated with decimals: 18 - [x] All token list files consistent - [x] Documentation created - [ ] Token list hosted on public URL (action required) - [ ] User instructions provided (if needed) ### Oracle Pricing - [x] Oracle contract address documented - [x] Oracle setup guide created - [x] dApp integration examples provided - [ ] Oracle Publisher service verified (action required) - [ ] Oracle price data verified (action required) - [ ] CoinGecko listing submitted (optional) --- ## 🔍 Quick Verification Commands ### Verify Token List Decimals ```bash # Check WETH9 decimals in token list cat metamask-integration/docs/METAMASK_TOKEN_LIST.json | \ jq '.tokens[] | select(.symbol == "WETH") | {symbol, decimals}' # Expected: {"symbol":"WETH","decimals":18} # Check WETH10 decimals cat metamask-integration/docs/METAMASK_TOKEN_LIST.json | \ jq '.tokens[] | select(.symbol == "WETH10") | {symbol, decimals}' # Expected: {"symbol":"WETH10","decimals":18} ``` ### Verify Oracle Price ```bash # Get latest price from oracle cast call 0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6 \ "latestRoundData()" \ --rpc-url https://rpc-http-pub.d-bis.org # Check if price is non-zero and recent ``` --- ## 📝 Summary **WETH9/WETH10 Decimals:** ✅ **FIXED** - All token lists updated - Decimals explicitly set to 18 - Ready for token list hosting **Oracle Pricing:** ✅ **DOCUMENTED** - Oracle setup guide created - Integration examples provided - CoinGecko listing process documented **Action Required:** 1. Host token list on public URL 2. Verify Oracle Publisher service 3. Test oracle price updates --- **Last Updated:** 2026-01-26 **Status:** ✅ Fixes complete, documentation ready