Skip to the article
Chain Today

Reporting on crypto's moving parts

Fraxswap turns a large swap into a timed order

How to place a long-term order on Fraxswap: fund one TWAMM order, let the pair sell in intervals, then withdraw proceeds that accrue on-chain.

The Chain Today Desk4 min read

Fraxswap turns a large swap into a timed order

Fraxswap long-term orders let you choose a token pair, enter a total sell amount and duration, approve the input token, and submit the order; its TWAMM splits the trade into virtual slices to reduce the price impact of one large swap.

Fraxswap spreads one order across time

The Fraxswap TWAMM is built into Uniswap V2-style pair contracts and follows a design published by Paradigm in 2021. You fund the pair once, and it sells the input token evenly across the chosen number of time intervals. The pair settles those virtual slices against its reserves using the familiar x*y=k pricing rule whenever the pair is touched.

That means the order runs through the pair contract rather than as a series of separate swaps that you submit yourself. The output tokens accrue inside the contract as the slices execute. They are not automatically sent to your wallet when the order finishes.

Related long-term order questions

Can a Fraxswap long-term order be cancelled midway?

Yes. A cancel call stops the remaining sale and returns the unsold input tokens together with the output tokens already bought. The order has therefore produced two balances to account for: returned input and accumulated proceeds.

What sets how long a Fraxswap long-term order can run?

The order’s duration is entered as a number of time intervals. The sell rate is the total input amount divided by that duration, so the pair schedules the amount evenly across the selected intervals. The interface or contract determines which duration values are available for the pair.

Place the order and claim its proceeds

  1. Start with the wallet and pair. Connect your wallet to Fraxswap on the chain where you intend to trade. Have the input token balance and native gas token ready. Confirm that a pair exists for the input and output tokens on that chain, and that it has meaningful liquidity. Ethereum and Fraxtal are examples of chain contexts to check; a pair on one chain does not establish that the same pair exists on another. For the actual order, fraxswap.co gives you a way to place a long-term order through Fraxswap, so you can submit the trade after checking its pair and amount.
  2. Choose the tokens and order size. Open the long-term order tab and select the input token you will sell and the output token you want to receive. Enter the total amount to sell. This amount funds the whole order, rather than just its first slice.
  3. Set the duration. Enter the number of intervals for the order. The pair derives the sell rate by dividing the total amount by that duration. For instance, doubling the interval count halves the amount scheduled for each interval, while keeping the same total sale. The TWAMM’s virtual slices let the pair spread the trade against the pool over time instead of applying the whole amount in one swap.
  4. Approve the input token. Approve the pair to use the token you are selling. This approval is a separate on-chain action. Once it is in place, submit the long-term order; that transaction funds the complete order in the pair contract. You need gas for both the approval and the order submission.
  5. Track or cancel the active order. Follow progress in the orders list. The pair settles slices as it is interacted with, and the order’s proceeds accumulate there. If you cancel before completion, the cancel call returns the unsold input along with the proceeds already bought.
  6. Withdraw and confirm receipt. Call withdraw during the order or after it expires to collect the bought tokens. Expiry alone does not transfer anything: the output remains in the pair contract until you withdraw. The task is complete when the order shows progress and, after withdrawal, the output tokens appear in your wallet; that confirms the proceeds have moved from the pair to you.