Cart 0

Dex Explorer V2 Script -

// Arbitrage opportunity detection const lowest = validResults[0]; const highest = validResults[validResults.length - 1]; const profitPct = ((highest.price - lowest.price) / lowest.price) * 100;

// BSC const bscProvider = new ethers.JsonRpcProvider(process.env.BSC_RPC_URL); this.providers.set(56, bscProvider); this.multicalls.set(56, new Multicall(bscProvider)); dex explorer v2 script

// Sort by price (lowest price for token A in terms of token B) validResults.sort((a, b) => a.price - b.price); const highest = validResults[validResults.length - 1]

constructor() this.providers = new Map(); this.multicalls = new Map(); this.initProviders(); a.price - b.price)

const validResults = results.filter(r => r !== null); if (validResults.length === 0) console.log("❌ No pools found for this pair."); return;

console.table(validResults.map(r => ( DEX: r.dex, Chain: r.chainId === 1 ? "Ethereum" : "BNB Chain", Price: `$$r.price.toFixed(4) USDC per WETH`, Liquidity: `$(Number(r.reserve0) / 1e18).toFixed(2) WETH / $(Number(r.reserve1) / 1e6).toFixed(2) USDC` )));