Best Execution Explainer
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Best Execution Explainer is a read-only tool that analyzes the optimal execution path for token swaps across DEXes and aggregators, generating AI-powered recommendations on how to execute your swap for the best outcome. It reads swap transaction calldata, token addresses, token symbols, token decimals, swap amount, price quotes from multiple DEXes and aggregators, gas cost estimates, slippage parameters, deadline, block number, timestamp, mempool conditions (simulated), MEV activity indicators, route complexity, liquidity depth across routes, and execution time estimates. The tool then presents this data alongside an AI-generated analysis of the optimal execution path, considering price, gas, slippage, and MEV risk, and recommending the best execution strategy — helping you minimize costs and maximize returns before signing the transaction.
HOW TO USE
Connect your wallet using the BGWallet bridge and select your target network. Enter the token in address, token out address, and the amount you want to swap. Click "Find best execution" to analyze available execution paths. The tool displays the token in, token out, amount, recommended path, and MEV risk level. Detailed information includes expected output, gas cost (in USD), slippage, execution time, route complexity, and strategy recommendation. An AI explanation appears below the on-chain data, analyzing the optimal execution path across available DEXes and aggregators, considering price, gas costs, slippage, and MEV risk, and recommending the best execution strategy including which DEX or aggregator to use, timing considerations, and whether to adjust slippage or gas price before you sign the transaction. The wallet's own signature step still protects you — this explanation is informational only and does not replace reviewing what you approve in your wallet.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 with the provider from the BGWallet bridge to read on-chain execution data. No hardcoded contract addresses are used — you are always in control of which contracts you trust. When analyzing best execution, the tool reads token addresses from the user input and resolves them to symbols and decimals via token contract calls, reads the swap amount from the user input, fetches price quotes from multiple DEXes and aggregators by calling their router and aggregator contracts, estimates gas costs by simulating transactions and reading gas price, reads slippage parameters from the user input or transaction, reads deadline from the transaction, reads block number and timestamp from the provider, simulates mempool conditions by analyzing pending transactions, detects MEV activity indicators by scanning for sandwich and front-running patterns, analyzes route complexity by counting hops and protocols, reads liquidity depth across routes via pool contracts, and estimates execution time based on gas price and network congestion. The tool fetches quotes by walking backwards in chunks and halving chunk size on failure, ensuring quotes are properly read despite varying RPC limitations. The data is formatted and passed to the AI bridge via BGAI.generate() with a structured prompt that includes all the on-chain data read. The AI is instructed to analyze the optimal execution path across available DEXes and aggregators, consider price, gas costs, slippage, and MEV risk, and recommend the best execution strategy — while stating plainly that it cannot predict price movements between quote and execution, cannot guarantee that the recommended path will remain optimal by the time the transaction is mined, and cannot guarantee that the swap will succeed or avoid slippage. The AI response is capped at 1,024 tokens to ensure concise, focused execution recommendations. All computed values are guarded against negative numbers — if a price quote or gas estimate appears invalid, the tool flags it rather than displaying nonsensical values.
WHAT IT CANNOT SEE
This tool cannot predict price movements between quote and execution. It cannot guarantee that the recommended execution path will remain optimal by the time the transaction is mined. It cannot detect real-time mempool conditions or front-running risks with certainty. It cannot account for MEV extraction that may affect the actual execution price. It cannot guarantee that the swap will succeed or avoid slippage. The AI explanation is generated from on-chain data only and cannot detect real-time mempool conditions, front-running, sandwich attacks, or off-chain liquidity changes. It cannot predict whether a better execution path will be available by the time the transaction is mined. The tool does not continuously monitor execution paths; each analysis is a snapshot at the time of the lookup. It cannot detect delayed execution, mempool congestion, or off-chain factors. The tool does not store any data persistently; all state is in-memory and resets on reload. The AI explanation is informational and does not constitute financial advice, legal advice, or a guarantee of optimal execution or swap success.
PLEASE NOTE
Best Execution Explainer works exclusively with EVM-compatible chains. It requires a Web3 wallet (MetaMask or similar) and the BGWallet bridge. Explanations are AI-generated from data the app reads on-chain — always review what you are actually signing in your wallet before approving it. Execution conditions can change rapidly, and the optimal path at the time of the quote may not be optimal at execution. Use this tool as a guide only; always cross-check with independent sources and verify transaction details manually for critical decisions. This is experimental software; use at your own risk.