Defituna

Defituna limit order closure and fund claims

In Defituna’s trading interface, closing a limit order releases its claimable funds after a fill. The Solana Program Library (SPL) token received when opening an order represents that order, so a filled status alone doesn’t put the proceeds in your wallet. Closing returns the available balances and automatically burns the associated token. A partially filled order can return both traded proceeds and its unfilled deposit. Keep the token intact until closure; manually burning it makes the order unrecoverable.

Key takeaway: Keep the order token intact until closure, because manually burning it destroys access to the funds the order holds.

The fill state determines what closing returns

If an order still holds unfilled tokens, closing withdraws those tokens alongside any proceeds from completed fills. A fully filled order has finished exchanging its input asset and has proceeds available to claim. An entirely unfilled order still holds the deposited asset. Closing suits both states, although claiming completed trading proceeds and cancelling an unfinished trade serve different purposes.

Partial execution sits between those states: some deposited tokens have traded, and the remainder still contributes order liquidity. Ending the order removes that remaining liquidity and settles the portion already exchanged. Keeping it open leaves the unfinished amount available for further fills. A pool reaching the order’s price doesn’t establish that the entire quantity has traded; the filled quantity determines how much execution has occurred.

Manual burning destroys the order claim

The order token must remain intact until the closing operation retires it as part of returning the order’s funds. The order account stores trading details, including its price tick, while the token represents the associated order. A wallet entry for that token therefore doesn’t tell you the amount of trading proceeds available.

Manually burning the order token makes the associated order unrecoverable. A standalone SPL token burn reduces a token balance and its mint’s supply. It doesn’t perform the order’s fund withdrawal. The automatic burn belongs within closure, which handles the claim and retires its token. Treating the token as disposable wallet clutter can destroy access to an otherwise valid order.

The payout includes filled proceeds and the rebate

A filled order’s proceeds depend on its executed quantity and trade direction, with its rebate added when the order closes. The output asset follows the selected trading pair and direction. An order representing a sale and one representing a purchase can therefore return different assets, even when both use the same pool.

For a partial fill, the traded portion produces output tokens while the unfilled portion remains in the original input asset. These balances have different units. Adding their token quantities together doesn’t produce a meaningful single payout figure. Full closure removes both kinds of balances, rather than completing the remaining exchange at whatever price the market currently shows.

Closing a limit order pays its rebate on top of the filled token amount. The claimable amount already includes that rebate, and the interface doesn’t offer it as a separate claim. Maker orders provide liquidity to swaps at their price, which explains the fee income attached to an executed order.

Closure also settles applicable fees, so the gross execution amount alone doesn’t describe the final token balance returned to the wallet.

Can another wallet claim a transferred order token?

A transferred order token can, in theory, give its receiving wallet the ability to close the order, but the interface doesn’t support this use. The token’s transferability doesn’t establish that the application will display the transferred order or offer a working claim action to the receiving wallet.

Moving the token isn’t a supported way to choose a different payout wallet. Leave it with the opening wallet while the order remains open. A transfer changes who holds the token; it doesn’t itself withdraw the claimable funds.

Defituna - Can another wallet claim a transferred order token? - illustration

View full-size image

Network fees and successful transaction execution

Closing an order requires a Solana transaction, whose fee payer must cover network fees in SOL. That expense differs from the trading rebate included in the claim. Solana charges a base transaction fee and supports an optional priority fee. The total depends on the transaction and its fee settings, so a rebate doesn’t establish that closure costs nothing.

Signing authorizes the proposed transaction, and submission sends it to the network. A transaction signature alone doesn’t prove Solana has processed or confirmed the transaction. The submission service can return a signature before execution completes. Successful execution, together with the resulting order and token balances, establishes whether the claim actually happened.

Congestion can affect how quickly a closing transaction reaches execution. Priority settings influence scheduling, while the transaction still has to pass its execution checks. A recent blockhash can also expire before submission reaches the chain. A pending response therefore shouldn’t count as a completed withdrawal, and a fixed claim time can’t describe every network condition.

A decision checklist before committing to closure

An order awaiting a claim may contain completed fills and an unfilled remainder, while its SPL token remains in the opening wallet. Review the available balances before authorizing closure. Keeping the token intact preserves access to the order during that review; ending the order withdraws its balances and ends its remaining availability for fills.

  • Match the token pair, trade direction, and filled quantity to the order you intend to close.
  • Keep the associated order token in the opening wallet; stop if you have already moved or burned it.
  • Distinguish the filled output, any remaining input, and the rebate included in the claim.
  • Approve the order-closing action only when you intend to end the order; reject a standalone token-burn request.
  • Count the claim as complete only after successful onchain execution returns the available funds.

Reviewing an order doesn’t reverse fills it has already executed. The choice to keep or close it concerns its remaining balances and claim.

Trade history identifies the order behind a claim

One documented limit-order Trade History view lists past orders and distinguishes Closed from Cancelled status alongside the pair and trade direction. Its Filled/Order Quantity field reports the filled tokens against the total order size, with the fill percentage in brackets. An order can end after completing its trade or after cancelling an unfinished amount.

The Address field identifies the order’s SPL token address and opens its event history in Solscan. Those events help distinguish creation, token activity, and closure for the particular order. A missing entry in Open Orders alone doesn’t establish what arrived in a wallet. The order record describes its trading state; the successful closing transaction and resulting balances describe the actual withdrawal.

Maker-order claims within the wider market

A maker-order claim concerns that order’s balances, while lending and leveraged liquidity involve different actions and account relationships. Fusion AMM stores a limit order at a specified price tick. A liquidity position distributes liquidity across a price range. Both contribute trading liquidity, yet closing a maker order doesn’t describe the closure of a liquidity position.

Lending supplies capital for borrowing within the wider platform, and leveraged liquidity adds borrowed exposure to a position. The amount a maker-order closure returns belongs to that order; it isn’t a total withdrawal of every balance or position associated with the wallet.

Defituna: common questions

Does a negative fee figure mean I’ll pay extra to close my limit order?

A negative figure in the limit-order form’s Fees display indicates a rebate you earn when the order fills. It represents trading income, rather than an extra charge of that amount. The separate Solana transaction fee still applies to the closing transaction.

Can I change a limit order’s size without closing it?

The Fusion AMM SDK supports increasing and decreasing limit-order amounts independently of full closure. Rust SDK 1.1.5 documents a restriction: a partially filled order can’t be increased. These operations adjust the order rather than necessarily retiring it. A particular interface must expose the corresponding operation before you can use it there; SDK support alone doesn’t establish which controls the application displays.

What happens if my order-closing transaction fails during execution?

Solana reverts the state changes of a transaction when any instruction in it fails. A failed closing transaction therefore doesn’t complete the withdrawal or its associated token retirement. The network can still charge its transaction fee, so an unsuccessful attempt can have a cost without releasing the funds.

Why can’t I find my market swap in the limit-order history?

Defituna’s limit-order Trade History documentation lists limit orders and excludes market swaps. An immediate swap and a maker-order closure create different trading records, so the absence of a swap from that list doesn’t establish a missing order claim. Keep the swap transaction separate from the order token’s event history.

How does Order Value differ from the amount I receive when closing?

Defituna’s limit-order history documentation defines Order Value as the initial deposit and its dollar value at that time. Its broader executed-trade documentation defines it as the trade’s notional value in the quote token and its dollar value. Neither definition makes it the closing payout. Execution changes the assets associated with the order, and the claim includes the rebate alongside filled proceeds. An unfinished order can also return its remaining input tokens.

Are orders at the same price filled first come, first served?

Fusion AMM shares limit-order liquidity proportionally among orders at the same tick before the pool price crosses it, without first-in, first-out priority. If liquidity at that tick has partially traded and the price moves away, newly added orders take secondary priority. The pool must exhaust the partially traded liquidity before trading the new liquidity.

Last updated ·