# WETH9/WETH10 Decimals & Oracle Pricing - Fixes Complete ✅ **Date:** 2026-01-26 **Status:** ✅ **ALL FIXES COMPLETE** --- ## ✅ Summary Both issues have been addressed: 1. **WETH9/WETH10 Decimals:** ✅ **FIXED** - All token lists updated 2. **Oracle Pricing:** ✅ **DOCUMENTED** - Complete setup guides created --- ## 🔧 Part 1: WETH9/WETH10 Decimals Fix ### Issue - WETH9 contract's `decimals()` returns `0` instead of `18` - Causes MetaMask to display incorrect balances ### Solution Applied ✅ **All token lists updated** with explicit `decimals: 18` for both WETH9 and WETH10 ### Files Verified 1. ✅ `metamask-integration/docs/METAMASK_TOKEN_LIST.json` - WETH9: 18 decimals 2. ✅ `docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json` - WETH9: 18 decimals 3. ✅ `docs/04-configuration/metamask/METAMASK_TOKEN_LIST.tokenlist.json` - WETH9: 18 decimals 4. ✅ `token-lists/lists/dbis-138.tokenlist.json` - WETH9: 18 decimals **All files are consistent and correct.** --- ## 💰 Part 2: Oracle Pricing Configuration ### Oracle Information | Property | Value | |----------|-------| | **Oracle Proxy** | `0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6` | | **Oracle Aggregator** | `0x99b3511a2d315a497c8112c1fdd8d508d4b1e506` | | **Price Feed** | ETH/USD | | **Decimals** | 8 | | **Update Frequency** | 60 seconds | ### Documentation Created 1. ✅ **Complete Fix Guide:** - `docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md` - Covers both decimals fix and oracle setup 2. ✅ **Oracle Setup Guide:** - `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md` - Complete oracle configuration and integration 3. ✅ **Quick Reference:** - `docs/04-configuration/metamask/WETH_ORACLE_QUICK_REFERENCE.md` - Quick lookup for common tasks ### Important Limitation ⚠️ **MetaMask does NOT automatically query oracle contracts for USD prices.** **MetaMask uses:** 1. CoinGecko API (primary) - Requires token listing 2. Token lists (limited support) 3. Oracle contracts - NOT automatically queried **Solutions:** - For dApps: Query oracle directly and display USD values - For native MetaMask: Submit tokens to CoinGecko - For custom: Develop MetaMask extension (advanced) --- ## 📋 Action Items ### Completed ✅ - [x] All token lists updated with correct decimals - [x] Comprehensive fix guide created - [x] Oracle setup guide created - [x] Quick reference guide created - [x] Documentation verified and consistent ### Pending Actions ⚠️ 1. **Host Token List** (Recommended) - Upload token list JSON to public URL - Add to MetaMask token lists - Enables automatic correct decimals for users 2. **Verify Oracle Publisher Service** - Check VMID 3500 service status - Verify prices updating every 60 seconds - Test oracle contract queries 3. **CoinGecko Listing** (Optional, for native MetaMask USD) - Submit tokens to CoinGecko - Provide market data - Wait for listing approval --- ## 🔍 Verification ### Token List Verification ```bash # Verify WETH9 decimals in all token lists for file in \ metamask-integration/docs/METAMASK_TOKEN_LIST.json \ docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json \ token-lists/lists/dbis-138.tokenlist.json; do echo "Checking $file:" jq '.tokens[] | select(.symbol == "WETH") | {symbol, decimals}' "$file" done # Expected output: All show decimals: 18 ``` ### Oracle Verification ```bash # Check oracle price cast call 0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6 \ "latestRoundData()" \ --rpc-url https://rpc-http-pub.d-bis.org ``` --- ## 📚 Documentation Index ### Main Guides 1. **Complete Fix Guide:** - `docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md` - Comprehensive guide covering both issues 2. **Oracle Setup:** - `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md` - Oracle configuration and integration 3. **Quick Reference:** - `docs/04-configuration/metamask/WETH_ORACLE_QUICK_REFERENCE.md` - Quick lookup 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` - **cUSDT/cUSDC Fix:** `docs/04-configuration/metamask/FIX_CUSDT_CUSDC_DECIMALS.md` --- ## ✅ Status Summary | Component | Status | Notes | |-----------|--------|-------| | **WETH9 Decimals** | ✅ Fixed | Token lists override contract | | **WETH10 Decimals** | ✅ Correct | Contract returns 18 | | **Token Lists** | ✅ Updated | All files consistent | | **Oracle Documentation** | ✅ Complete | Setup guides created | | **Oracle Service** | ⚠️ Verify | Check VMID 3500 status | | **CoinGecko Listing** | ⚠️ Optional | For native MetaMask USD | --- ## 🎯 Next Steps 1. **Immediate:** - Host token list on public URL - Verify Oracle Publisher service 2. **Short-term:** - Test oracle price updates - Provide user instructions (if needed) 3. **Long-term:** - Submit tokens to CoinGecko (optional) - Develop custom MetaMask extension (advanced) --- **Last Updated:** 2026-01-26 **Status:** ✅ Fixes complete, documentation ready