Files
proxmox/WETH_ORACLE_FIXES_COMPLETE.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- 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>
2026-02-12 15:46:57 -08:00

5.2 KiB

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

  • All token lists updated with correct decimals
  • Comprehensive fix guide created
  • Oracle setup guide created
  • Quick reference guide created
  • 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

# 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

# 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
  • 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