Skip to main content

5. Choose Network by Transaction Size

Optimize for fees based on amount:

function selectOptimalNetwork(crypto, fiatAmount) {
if (crypto === 'USDT' || crypto === 'USDC') {
// TRC20 has lowest fees - best for small amounts
if (fiatAmount < 50000) return 'trc20';
// BEP20 for medium amounts
if (fiatAmount < 500000) return 'bep20';
// ERC20 for large amounts (fee % is smaller)
return 'erc20';
}

// Native coins use their primary network
return { BTC: 'bitcoin', ETH: 'ethereum', BNB: 'bsc', TRX: 'tron' }[crypto];
}