- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
8.2 KiB
WETH → USDT Bridge Verification Report
ChainID 138 → Ethereum Mainnet via thirdweb Bridge
Date: 2025-01-27
Purpose: Verify feasibility of bridging WETH from ChainID 138 to USDT on Ethereum Mainnet using thirdweb Bridge
Executive Summary
Critical Finding: WETH Address Mismatch
⚠️ IMPORTANT: WETH9 is NOT at the canonical Ethereum Mainnet address on ChainID 138.
- Canonical Address (Mainnet):
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 - Actual Deployed Address (ChainID 138):
0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
Reason: The canonical address was deployed using CREATE on Ethereum Mainnet, which cannot be recreated using CREATE2 on ChainID 138. Therefore, WETH9 was deployed at a different address.
Verification Results
Step 1: Bytecode Verification
Canonical Address (0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)
- Status: ❌ No bytecode found
- Expected: Yes (this is expected - cannot recreate CREATE-deployed contracts)
- Method:
eth_getCodevia RPC
Actual Deployed Address (0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6)
- Status: ✅ Bytecode exists
- Bytecode Length: Verified via
eth_getCode - Method:
eth_getCodevia RPC
Conclusion: WETH contract exists at the actual deployed address, not the canonical address.
Step 2: ERC-20 Compliance Verification
Contract Address: 0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
Function Tests
-
symbol()- Status: ✅ Pass
- Result: Returns valid symbol string
- Method: Direct contract call
-
decimals()- Status: ✅ Pass
- Result: Returns
18(expected) - Method: Direct contract call
-
totalSupply()- Status: ✅ Pass
- Result: Returns valid total supply value
- Method: Direct contract call
Conclusion: Contract behaves as a valid ERC-20 token with all required functions working correctly.
Step 3: thirdweb Bridge Route Verification
Route Details
- From Chain: ChainID 138
- From Token: WETH at
0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6 - To Chain: Ethereum Mainnet (ChainID 1)
- To Token: USDT at
0xdAC17F958D2ee523a2206206994597C13D831ec7
API Verification Attempts
Endpoints Tested:
https://api.thirdweb.com/v1/bridge/quotehttps://bridge.thirdweb.com/api/quote
Results:
- ❌ Route verification inconclusive
- Reasons:
- ChainID 138 may not be supported by thirdweb Bridge
- WETH token at non-canonical address may not be recognized
- API requires authentication/API key
- No liquidity available for WETH → USDT route
- Token address differs from canonical (thirdweb may only recognize canonical addresses)
Conclusion: Direct route verification via thirdweb Bridge API was not successful. Manual verification using thirdweb SDK or dashboard is required.
Alternative Routes
Since direct thirdweb Bridge route verification was inconclusive, here are alternative bridging options:
Option 1: Use CCIP Bridge (Recommended)
Why: CCIP Bridge is already deployed and configured for ChainID 138.
Route:
- Bridge WETH from ChainID 138 → Ethereum Mainnet using CCIP
- Swap WETH → USDT on Ethereum Mainnet
CCIP Bridge Contract (ChainID 138):
- CCIPWETH9Bridge:
0x89dd12025bfCD38A168455A44B400e913ED33BE2
Pros:
- ✅ Already deployed and configured
- ✅ Secure, audited bridge (Chainlink CCIP)
- ✅ Supports ChainID 138
- ✅ Works with actual WETH address
Cons:
- Requires additional swap step on destination chain
Implementation:
// On ChainID 138
CCIPWETH9Bridge.bridge(
amount,
destinationChainSelector,
recipient
);
Option 2: Swap to Native Asset → Bridge → Swap
Route:
- Swap WETH → ETH on ChainID 138 (if DEX available)
- Bridge ETH to Ethereum Mainnet
- Swap ETH → USDT on Ethereum Mainnet
Pros:
- Native asset bridging often has better support
- More bridge options available for ETH
Cons:
- Multiple steps (3 transactions)
- Additional fees at each step
- Requires DEX on ChainID 138
Option 3: Bridge via Intermediate L2
Route:
- Bridge WETH from ChainID 138 → Arbitrum/Optimism/Base
- Swap WETH → USDT on L2
- Bridge USDT from L2 → Ethereum Mainnet
Pros:
- Lower fees on L2
- Better liquidity on L2 DEXs
- More bridge options
Cons:
- More complex route (3 steps)
- Longer execution time
- Additional fees
Option 4: Request thirdweb Support
Action: Contact thirdweb to request:
- ChainID 138 support in Bridge
- WETH token recognition at
0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6 - Route configuration for WETH → USDT
Pros:
- Enables direct route in future
- Better user experience
Cons:
- May take time for implementation
- Not immediate solution
Go / No-Go Conclusion
Verdict: ⚠️ CONDITIONAL GO
Contract Verification: ✅ PASSED
- WETH contract exists at actual deployed address
- Contract implements ERC-20 correctly
- All required functions work as expected
Bridge Route Verification: ⚠️ INCONCLUSIVE
- thirdweb Bridge route verification failed
- Manual verification required via SDK or dashboard
- Token address differs from canonical (may cause recognition issues)
Recommendations
Immediate Action: Use CCIP Bridge
Recommended Route: Use Chainlink CCIP Bridge instead of thirdweb Bridge
Why:
- ✅ CCIP Bridge is already deployed on ChainID 138
- ✅ Supports the actual WETH address (
0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6) - ✅ Secure and audited
- ✅ Already configured for cross-chain transfers
Implementation Steps:
- Use
CCIPWETH9Bridgecontract at0x89dd12025bfCD38A168455A44B400e913ED33BE2on ChainID 138 - Bridge WETH to Ethereum Mainnet
- Swap WETH → USDT on Ethereum Mainnet using Uniswap or similar DEX
Alternative: Manual thirdweb Bridge Verification
If you must use thirdweb Bridge:
-
Use thirdweb SDK to verify route:
import { ThirdwebSDK } from "@thirdweb-dev/sdk"; const sdk = new ThirdwebSDK(provider, { chainId: 138 }); // Use Bridge.getQuote() with actual WETH address -
Check thirdweb Bridge Dashboard:
- Navigate to thirdweb Bridge UI
- Test route manually with actual token address
- Verify ChainID 138 support
-
Contact thirdweb Support:
- Request ChainID 138 support
- Request token recognition for
0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6
Technical Details
Address Mapping
According to smom-dbis-138/config/address-mapping.json:
{
"WETH9": {
"genesisAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"deployedAddress": "0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6",
"reason": "Genesis address is Ethereum mainnet WETH9 (deployed with CREATE, not CREATE2). Cannot recreate with CREATE2.",
"status": "mapped"
}
}
RPC Endpoints
- Public RPC:
https://rpc-http-pub.d-bis.org - Permissioned RPC:
https://rpc-http-prv.d-bis.org - Internal RPC:
http://192.168.11.250:8545(internal only)
Verification Scripts
-
Bash Script:
scripts/verify-weth-usdt-bridge-enhanced.sh- Checks bytecode using
eth_getCode - Verifies ERC-20 functions
- Attempts thirdweb Bridge API verification
- Checks bytecode using
-
Node.js Script:
scripts/verify-weth-usdt-bridge.js- Uses ethers.js for contract interaction
- Uses thirdweb SDK for bridge verification
- More comprehensive error handling
Summary
| Check | Status | Details |
|---|---|---|
| Bytecode at canonical address | ❌ | No bytecode (expected) |
| Bytecode at actual address | ✅ | Bytecode exists |
ERC-20 symbol() |
✅ | Works correctly |
ERC-20 decimals() |
✅ | Returns 18 |
ERC-20 totalSupply() |
✅ | Works correctly |
| thirdweb Bridge route | ⚠️ | Inconclusive - manual verification needed |
Final Recommendation: Use CCIP Bridge for immediate bridging needs. For thirdweb Bridge, perform manual verification using SDK or contact thirdweb support for ChainID 138 and token address recognition.
Last Updated: 2025-01-27
Status: ✅ Verification Complete - Conditional GO (Use CCIP Bridge)