Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
5.2 KiB
5.2 KiB
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 returns0instead of18 - 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: 18for WETH9 and WETH10 - ✅ Token lists override contract's incorrect decimals
- ✅ WETH10 already returns correct decimals (18), but included for consistency
Files Updated:
- ✅
metamask-integration/docs/METAMASK_TOKEN_LIST.json - ✅
docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json - ✅
docs/04-configuration/metamask/METAMASK_TOKEN_LIST.tokenlist.json - ✅
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:
- ✅
docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md - ✅
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
-
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
-
Verify Oracle Publisher Service
- Check VMID 3500 service status
- Verify prices are updating every 60 seconds
- Test oracle contract queries
-
User Instructions (If token list not hosted)
- Provide manual token import instructions
- Users must manually set decimals to 18 for WETH9
Long-Term Actions
-
CoinGecko Listing (For native MetaMask USD support)
- Submit tokens to CoinGecko
- Provide market data
- Wait for listing approval
-
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
-
Complete Fix Guide:
docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md- Covers both WETH9/WETH10 decimals and oracle pricing
-
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
- Token lists updated with decimals: 18
- All token list files consistent
- Documentation created
- Token list hosted on public URL (action required)
- User instructions provided (if needed)
Oracle Pricing
- Oracle contract address documented
- Oracle setup guide created
- 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
# 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
# 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:
- Host token list on public URL
- Verify Oracle Publisher service
- Test oracle price updates
Last Updated: 2026-01-26
Status: ✅ Fixes complete, documentation ready