Start typing to search this publication.
How to Connect Your Wallet to SpookySwap Safely
Open menu

Subscribe to How to Connect Your Wallet to SpookySwap Safely

Get new posts delivered straight to your inbox.

How to withdraw proceeds from a Fraxswap long-term order

How to Connect Your Wallet to SpookySwap Safely
2 min read

An open or expired Fraxswap long-term order pays its bought tokens when the owner calls withdrawProceedsFromLongTermSwap with the order ID on its pair: a call mid-order collects proceeds accrued so far, while a call after expiry collects the rest and closes the order.

The Fraxswap TWAMM executes a long-term swap gradually inside a pair contract. Its embedded time-weighted AMM keeps the bought tokens in the pair until the owner withdraws them through the exchange.

  1. Connect the address that placed the order and make sure it has the gas token needed to submit a transaction. Only that address can withdraw. Say you placed the order from a multisig: the multisig must make the withdrawal call and receives the proceeds. A signer’s personal wallet cannot claim them. The same rule applies when a contract placed the order.

  2. Find the order ID from the original order transaction and select that order on the correct pair. Order IDs belong to pair contracts, so match the owner and the token being bought before submitting the withdrawal.

  3. Submit withdrawProceedsFromLongTermSwap with the order ID and confirm the transaction. The call first runs executeVirtualOrders to settle pending virtual trades. The pair then pays the accrued proceeds in the token you are buying to the order owner.

  4. Allow the order to continue if it has not expired. A mid-order withdrawal collects what has accrued so far without stopping the remaining trade. After expiry, the withdrawal pays the remaining proceeds and removes the order. Unwithdrawn proceeds stay in the pair indefinitely after expiry; they are never sent to the wallet automatically.

  5. Confirm success by checking that the owner’s bought-token balance has risen after the transaction. Keep the order ID if the order is still running and you plan to collect later proceeds.

What do I get back if I cancel a long-term order?

Canceling an open long-term order returns the bought tokens already accrued and the unsold portion of the token you supplied. It stops the remaining trade, unlike a mid-order proceeds withdrawal.

Is withdrawing order proceeds a taxable event?

Withdrawing proceeds generally moves tokens already bought by the order into the owner’s wallet; the token exchange itself may have tax consequences. The timing and treatment depend on your jurisdiction and circumstances, so retain the order, execution, and withdrawal records.

Subscribe to How to Connect Your Wallet to SpookySwap Safely