Pancakeswap

Pancakeswap TWAP split token orders into timed swaps before its deprecation

Pancakeswap TWAP divided token orders into scheduled swaps, with market or limit pricing governing each portion of the trade. The Orbs-powered integration was later deprecated alongside its standalone limit orders. Before that change, traders could choose the total trade count, spacing, and maximum duration. TWAP means time-weighted average price, and the approach aimed to reduce price impact by distributing execution across time. It did not lock every swap to the original quote. Executing more chunks introduced additional transaction costs, while price limits could leave part of an order unfilled. Fee-earning limit orders use a different pool-based mechanism from the former timed schedule.

Updated -
In short: The former TWAP feature could leave input unswapped at expiry, and canceling the remainder did not reverse completed chunks.

Smaller Swaps and Pool Price Recovery

TWAP split the selected input amount into smaller trades, reducing how much each swap demanded from available pool liquidity. Between chunks, arbitrage trades could bring affected pool prices closer to the wider market. That gave the next portion a different liquidity environment from one immediate swap of the entire amount. The benefit depended on actual liquidity and trading activity, however, because splitting an order did not guarantee that pool prices would recover before every fill or that the combined proceeds would improve.

Market movement introduced a separate exposure. A less disruptive chunk could still execute at a worse market price later. A gradual upward or downward move could affect successive fills throughout the schedule, even when each portion caused little price impact.

Deprecation and Wallet Funding

Pancakeswap deprecated its Orbs-powered Limit and TWAP Orders on September 29, 2025. Fee-earning limit orders succeeded the former order product. The change stopped creation of new Orbs-powered limit orders in the interface. Existing Orbs-powered limit orders remained manageable and could still execute when their conditions were met, without earning fees. A legacy TWAP order's completed fills showed how much input had traded.

Unswapped input tokens remained in the originating wallet between fills. The order did not reserve the entire budget in escrow.

Each upcoming chunk required sufficient input-token balance and spending allowance. Moving those tokens into liquidity pools or spending them elsewhere reduced the balance available for later execution, so a price condition could be satisfied while the wallet could not fund the next trade. After the required delay between chunks, anyone could prune an open, unexpired order when the maker's input-token balance or allowance could not cover the next chunk. Pruning canceled the remaining execution.

The allowance authorized the contract to transfer the specified token, while the balance supplied the tokens themselves. The protocol checked funding during bidding and execution. An earlier successful chunk established neither the remaining balance nor continuing permission for later chunks.

Market Pricing and Per-Trade Output Floors

Market-mode TWAP sought execution at available prices, while limit-mode TWAP required an acceptable output amount for each chunk. The price limit applied to executed trades; it did not promise that every scheduled portion would execute. A market quote described the conditions at the time of quoting. Later liquidity, market movement, and costs could change the proceeds. Market scheduling therefore exposed later portions to prices that the initial quote could not fix, even though the order retained its chosen timing parameters.

A limit-based chunk had to satisfy its minimum-output condition after the taker's fee. If execution costs left too few output tokens, a displayed market price touching the target was insufficient, and the chunk could remain unfilled even while its nominal price appeared acceptable.

How Did the Trade Interval Affect Execution?

The trade interval set a minimum gap between successive chunks, giving bidding and pool trading time to occur between executions. It did not promise fills at exact clock times. An eligible taker bid and a successful transaction were still necessary. Longer spacing gave arbitrage activity more time to adjust pool pricing, while extending the period over which changing market prices could influence the order.

A clock reaching the next interval did not prove that another swap had occurred. Only an executed fill changed the traded amount.

Pancakeswap: How Did the Trade Interval Affect Execution?

View image file

Trade count and spacing served different purposes. For the same total input, more chunks reduced each portion's size. Wider intervals separated those portions further. Increasing both also expanded the time and execution work needed to finish the configured order.

Could a TWAP Order Expire Before It Fully Filled?

A TWAP order could expire with some input still unswapped because maximum duration imposed an execution deadline. Reaching that deadline ended eligibility for further fills, irrespective of the original trade count. Tight price limits or insufficient time could leave an order partially filled. A longer duration created more opportunities for eligible execution, but it did not remove the price, funding, or transaction conditions that governed each chunk.

Taker Bids and Output-Token Costs

Orbs dTWAP used external takers to find execution paths and compete through bids for the next eligible chunk. The smart contract compared bids within the order's constraints. This separated arranging a trade from executing it: a winning bid still needed a successful fill transaction.

The winning taker received its fee from the output tokens of the filled chunk.

Takers could include their expected gas expenditure when choosing a fee. Executing more chunks required additional bidding and fill activity, so smaller portions could increase aggregate costs. Pool trading fees also affected swap proceeds. The gas used for creating or canceling an order belonged to a different transaction from a taker's later execution work.

The quoted output needed to be interpreted alongside those deductions. A gross swap return, a taker fee, and the trader's net receipt represented different amounts. Subtracting a fee again from an amount that already excluded it would understate the received tokens.

Did Canceling a TWAP Order Reverse Earlier Swaps?

Canceling a TWAP order stopped its remaining execution after confirmation; it did not reverse chunks that had already settled. The maker, meaning the wallet that created the order, controlled ordinary cancellation. The former interface exposed cancellation through its open-order details. Completed swaps had already exchanged input for output tokens. A pending cancellation transaction also left a timing boundary: a fill that settled first could still become part of the order's history.

Cancellation and token allowance were separate controls. Canceling one order did not itself erase the wallet's spending approval for the contract.

A Price-Floor Decision Before Order Submission

A trader who required a minimum receipt for each portion needed the former limit-based TWAP mode. A market quote did not express that condition. Sufficient token allowance was another prerequisite: the contract could not execute the next chunk without permission, even when its price condition held.

  • The selected input and output tokens matched the intended trade.
  • The minimum received amount expressed an acceptable floor for each chunk.
  • The wallet balance and token allowance covered the next chunk.
  • The trade count and interval fit within the maximum duration.
  • The trader accepted the possibility of an unfilled remainder at expiry.

Before submission, the trader could change the settings or leave the order unsubmitted. With the required allowance in place, confirming order creation established an open order, not a completed swap. After execution, reconciliation compared the original input budget with the amount actually traded and the output credited by completed fills. A canceled or expired remainder had never undergone conversion. Any subsequent trade therefore concerned that remainder, without repeating the chunks already completed.

TWAP Scheduling Versus Fee-Earning Limit Orders

Fee-earning limit orders use one-sided liquidity in an Infinity pool to convert deposited tokens as trading consumes that liquidity. Eligible conversion also earns pool trading fees. The former TWAP integration divided a budget into timed chunks that external takers executed. These mechanisms differ in what drives execution and how costs or fees affect the outcome. A target-price order does not establish a recurring trade schedule merely because both products involve a price condition.

An immediate swap remains the alternative when a trade needs execution under present conditions. TWAP distributed execution across time and accepted the resulting exposure to later prices. A fee-earning limit order instead centers the decision on a target price and pool liquidity conversion.

Pancakeswap: the short answers

Was a Browser Tab Required for Every Scheduled TWAP Fill?

The former dTWAP design did not require an open browser tab for every fill after order creation. External takers monitored the on-chain order and submitted execution transactions. Closing the interface did not cancel the order. Its remaining deadline, funding, and spending permission still governed eligibility, alongside the availability of a valid execution bid.

Could the TWAP Schedule Automate Recurring Token Purchases?

The former TWAP feature supported a sequence of purchases by spacing trades from a configured input budget. That schedule remained subject to its total amount and maximum duration. Equal input-token portions did not necessarily buy equal output-token amounts, since prices changed between fills. A finite scheduled order was different from an indefinitely renewing purchase instruction.

Could the Schedule of a TWAP Order Be Edited After Creation?

The former Orbs dTWAP order model had no operation for editing a recorded schedule in place. Changing the trade count, interval, or deadline required a replacement order. Its input budget needed to account for completed chunks and the original order's cancellation or expiry, so that both orders did not remain eligible to spend the same tokens.

How Private Were Scheduled TWAP Trades?

Scheduled TWAP orders exposed the originating address and order details on-chain. Their timing and chunk sizes could therefore become predictable to other market participants. Execution transactions also created public records of completed swaps. Closing the interface or canceling an unfinished remainder did not remove those records or conceal the order's earlier activity.

Which Amounts Measure a Partially Filled TWAP Order's Realized Exchange Rate?

Divide the output tokens actually credited from completed chunks by the input tokens actually spent on those chunks. The result expresses output-token units per input-token unit. Exclude unswapped input from the denominator. Fees already deducted before wallet credit remain reflected in that output total, while separate gas expenditure requires its own cost accounting.