Time-Weighted Average Price Order Executor
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
The Time-Weighted Average Price Order Executor enables execution of large token orders using the TWAP (Time-Weighted Average Price) strategy, which divides a large order into smaller slices executed at regular intervals. This approach minimizes market impact and reduces slippage compared to executing a large order all at once. TWAP orders are essential for institutional traders, DAOs, and sophisticated DeFi users who need to accumulate or distribute significant positions without moving the market.
The tool reads TWAP contract state including order parameters, token balances, total order size, remaining amount, executed amount, time intervals, execution frequency, start time, end time, last execution timestamp, order status, and remaining slices. It supports multiple execution method variants (executeSlice, performTWAP, executeTWAP) to ensure compatibility with various TWAP contract implementations. The tool displays comprehensive order details including total amount, remaining amount, executed amount, progress percentage, slice count, interval timing, and next execution time.
HOW TO USE
1. Connect your wallet using the Connect button. The tool automatically detects your connected address and network.
2. Select the network where your TWAP contract is deployed using the network dropdown.
3. Enter the TWAP contract address and the order ID you want to monitor.
4. Enter the input token address (what you're selling) and output token address (what you're buying).
5. Set the total order amount in input token units, the number of slices, and the slice interval in seconds.
6. Configure your slippage tolerance percentage for each slice execution.
7. Click "Load TWAP order" to verify the order exists, is active, and check the current execution status.
8. Review the order details in the preview panel including total amount, remaining, executed, progress, slices, interval, status, last execution, and next execution time.
9. Click "Execute next slice" to submit the execution transaction through your wallet.
10. Use "Perform TWAP" or "Execute TWAP" as fallback methods if the primary method fails.
11. After each successful slice execution, the tool reloads order state to update remaining amount, executed amount, and progress.
TECHNICAL MECHANISM
The tool dynamically discovers the correct execution function by attempting multiple common ABI variants (executeSlice, performTWAP, executeTWAP) and performing gas estimation to verify the function exists. When an execution is triggered, the tool calls the TWAP contract with the order ID as the parameter. The contract then executes a single slice of the order, typically calculated as totalAmount / sliceCount, through the configured swap path/protocol, and updates the order state by decrementing the remaining amount and incrementing the executed amount. The tool reads order state via the orders view function, which returns token addresses, total amount, remaining amount, executed amount, slice count, slice interval, last execution timestamp, and active status. The nextExecutionTime view function calculates when the next slice is eligible to be executed based on the slice interval and last execution time.
WHAT IT CANNOT SEE
This tool cannot verify that the price feed is accurate or reliable; it relies entirely on the oracle configured in the contract. It cannot detect if the oracle has been compromised, manipulated, or provides stale data. It cannot ensure that TWAP orders will execute at the exact average price due to slippage, market volatility, and block timing. It cannot guarantee that order execution will complete within the specified time window due to network congestion, gas price fluctuations, or contract failures. It cannot verify that the TWAP contract has not been upgraded or modified after order creation. It cannot detect if the swap path is optimal or if the transaction is being front-run by malicious actors. It cannot recover funds if execution fails due to contract bugs, insufficient token approvals, out-of-gas errors, or blockchain reorgs. It cannot verify that tokens being traded are legitimate or not honeypot contracts. It cannot predict market movements, price gaps, or flash crashes that may affect slice execution prices. It cannot guarantee execution during extreme network congestion, high gas prices, or volatile market conditions. It cannot detect if the underlying swap protocol has been compromised or is returning manipulated prices. It cannot prevent the user from canceling or modifying TWAP orders through other interfaces. It cannot ensure that the slice execution timing is optimal for price discovery or that the selected interval is appropriate for market conditions.
PLEASE NOTE
This tool is designed for EVM-compatible blockchains only (Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, Fantom, Linea, Scroll). It requires an active wallet connection and sufficient native currency for gas fees for each slice execution. Always verify your TWAP contract address, order ID, token addresses, and order parameters before executing. The tool attempts multiple ABI variants but may not support all TWAP contract implementations - verify your contract's functions match the expected interfaces. Each slice execution incurs separate gas costs - consider this when configuring the number of slices. The tool is provided as-is with no warranty; users assume full responsibility for their transactions and should exercise caution when executing TWAP orders. For mainnet usage, ensure your TWAP contract has been audited and you understand the risks of automated order execution including slippage, gas costs, and smart contract risks.