Multi-Chain Mobile Wallet Development (Ethereum, BSC, Polygon, Solana, TON)
Multi-chain wallet — not "several independent wallets in one app." It's single mnemonic phrase from which keys for all supported blockchains are derived. User sees one 12-word seed, behind which stand addresses across five (or fifty) different networks.
Key Derivation for Different Blockchains
All supported networks use one BIP39 seed, but different BIP44 derivation paths:
| Blockchain | Coin Type | Derivation Path | Signature Algorithm |
|---|---|---|---|
| Ethereum | 60 | m/44'/60'/0'/0/0 |
secp256k1 (ECDSA) |
| BSC | 60 | m/44'/60'/0'/0/0 |
secp256k1 (ECDSA) |
| Polygon | 60 | m/44'/60'/0'/0/0 |
secp256k1 (ECDSA) |
| Solana | 501 | m/44'/501'/0'/0' |
ed25519 |
| TON | 607 | m/44'/607'/0' |
ed25519 |
Ethereum, BSC, Polygon use same address (identical coin type 60 and path) — difference only in chainId when signing transactions and RPC endpoint. Convenient for user, but critical to manage: when sending, explicitly specify network, otherwise transaction goes wrong (irreversible).
Solana and TON use ed25519 — different elliptic algorithm, incompatible with secp256k1. WalletCore from Trust Wallet supports both algorithms and all listed networks through single interface.
EVM Networks: Ethereum, BSC, Polygon
Same Ethereum-compatible address, same private key — but different networks, different chainIds:
- Ethereum Mainnet:
chainId = 1 - BSC:
chainId = 56 - Polygon:
chainId = 137
ChainId must be included in transaction signature (EIP-155) — protection from replay attacks between networks. Transaction signed for BSC won't pass on Ethereum.
For EVM networks: Web3j (Android), web3.swift (iOS), or ethers.js via JavaScriptCore/WebView for maximum JavaScript ecosystem cross-platform compatibility. For each network — own RPC provider:
val ethWeb3 = Web3j.build(HttpService("https://mainnet.infura.io/v3/YOUR_KEY"))
val bscWeb3 = Web3j.build(HttpService("https://bsc-dataseed.binance.org/"))
val polygonWeb3 = Web3j.build(HttpService("https://polygon-rpc.com"))
ERC-20 tokens, NFT (ERC-721/1155) — work identically on all three networks, difference only in RPC endpoint and contract addresses.
Solana: Different Paradigm
Solana fundamentally differs from EVM networks architecturally. No ERC-20 standard — has SPL Token Program. Addresses — base58-encoded ed25519 public keys.
Connection via Solana Mobile Adapter on Android or directly via JSON-RPC to node (mainnet-beta.solana.com). For token work, understand Associated Token Accounts (ATA) concept — each token on wallet has separate account needing creation before first token receipt (rent-exempt lamports).
// Solana4J or third-party Kotlin SDK
val connection = RpcClient("https://api.mainnet-beta.solana.com")
val balance = connection.getBalance(publicKey)
// For SPL tokens — find ATA and read balance via getTokenAccountBalance
val tokenAccounts = connection.getTokenAccountsByOwner(
owner = publicKey,
filter = TokenAccountsFilter.byProgramId(TOKEN_PROGRAM_ID)
)
Solana fees fixed and tiny (0.000005 SOL for basic transaction) — no gas price selection needed, simplifying UX.
TON: JetBrains Kotlin + Blockchain Specifics
TON (The Open Network) — blockchain with unique architecture: smart contracts as actors with own stack, addresses in format 0:... (raw) or user-friendly (EQ..., UQ...). Jetton — token standard (ERC-20 analogue).
TON SDK for Kotlin: ton-kotlin from tonapps or official ton-blockchain/ton-kotlin. For iOS — swift-ton or working via JavaScriptCore with ton.js.
Special feature: for compatibility with Telegram Mini Apps and TonConnect 2.0, need TonConnect protocol integration — standard for connecting dApps to TON wallets, analogue of WalletConnect for EVM.
// TonConnect Swift SDK
let connector = TonConnect(manifestUrl: URL(string: "https://your-app.com/tonconnect-manifest.json")!)
connector.connect { result in
// user connected via TonConnect
}
Multi-Network UI/UX: Critical Decisions
Network Switching. Clear visual network indicator on main screen — mandatory. Error "sent USDT on BSC address instead of Ethereum" costs users real money. Confirmation dialog when sending: "You're sending X USDT in BSC network to address 0x...".
EVM Networks — One Address. User doesn't need to know their ETH and BNB address identical. But must understand balances different: ETH on Ethereum network ≠ ETH (if not there) on BSC.
Bridging. Transferring assets between networks via bridges (Stargate, Across, official Polygon Bridge) — frequent request. Integrate via SDK or iframe WebView with allowed URLs. Complex and risky area (bridges regularly hacked) — user warning mandatory.
Prices and Exchange Rates
Balances in native tokens uninformative without USD conversion. CoinGecko API — free up to limit, covers major tokens. DeFiLlama — alternative. CoinMarketCap — paid but more reliable for production.
Cache prices on server with 60-second TTL — don't hammer external API from each client.
Multi-Chain Security
Main threats specific to multi-chain:
Address Poisoning. Attack: attacker sends 0 tokens from address resembling frequently used contact (first and last 4 characters match). User copies address from history — sends to scam address. Protection: warning when selecting from history, full address display without truncation in final confirmation screen.
Contract Interaction. When interacting with dApps via WalletConnect, app should decode and display calldata comprehensibly: not 0xa9059cbb000000000..., but "Transfer 100 USDC to address 0x1234...". For standard ABI this solvable via ABI decoding.
Zero Approvals ERC-20. After DeFi protocol interaction, many tokens have approve with max amount (uint256.max). "Manage Approvals" feature in wallet — good practice.
Stack and Tools
- Cross-Platform: Trust WalletCore (C++ library, bindings for iOS/Android) — unified cryptography implementation
- EVM RPC: Web3j (Android), web3.swift (iOS), ethers.js via JSC
- Solana: sol4k (Kotlin), solana-swift (iOS)
- TON: ton-kotlin, swift-ton
- WalletConnect: official iOS/Android SDK v2
- TonConnect: @tonconnect/sdk
If Flutter project — wallet_core flutter bindings + web3dart + solana_dart + ton_dart. Ecosystem less mature than native, but covers main cases.
Timeline
Basic multi-chain wallet with EVM (ETH/BSC/Polygon) + Solana + TON, balances, send/receive, transaction history, WalletConnect and TonConnect — 2–4 months for native iOS+Android. Adding swap via aggregators (1inch for EVM, Jupiter for Solana) — 3–4 weeks more. Cost calculated after detailed requirements: which networks, which DeFi integrations, need fiat on/off-ramp.







