Merlin swap

Merlin swap decision points before on-chain commitment

Merlin swap remains reversible until a transaction that changes the exchange state is submitted, although a separate token approval may already have changed the account's permissions. Proceed only when the wallet request matches the selected input, expected output, receiving account and minimum acceptable output. Reject the request if any term differs. After submission, use the transaction state rather than an interface animation to decide whether to wait, investigate a failure or reconcile a confirmed exchange.

Updated:

A quote remains optional until submission, while a confirmed token approval can leave a separate permission behind.

Quote review and recovery from mismatched terms

A normal attempt keeps the selected token identities and amount unchanged while the quote is reviewed. The expected output, minimum output and wallet request should describe the same exchange. If they do, submission is the point where the request leaves the editable stage and enters the network's transaction flow.

If a wallet field does not match the reviewed exchange, reject the prompt to return without submitting it. The reader can then restore the intended account and network, request another quote or stop. A confirmed approval may remain, but the exchange itself has not occurred unless its own transaction was submitted and confirmed with a successful status.


The last reversible moment

The last dependable exit is before the wallet submits the swap transaction. Inputs can be changed, a stale quote can be abandoned and an unexpected request can be rejected during that period. A transaction that has already been broadcast is different because the network may include it before a replacement can take its place.

Reversibility therefore depends on observable state, not the location of a button. No submitted transaction means the proposed exchange can be discarded. A pending transaction means the outcome remains unsettled. A confirmed transaction with a successful execution status records the exchange and cannot be turned back into an unsigned quote.

Which wallet request creates the commitment?

The submitted swap transaction creates the exchange commitment. A token approval is a separate transaction that authorizes a contract, called the spender, to use an allowed amount of the input token. Approval does not by itself exchange the assets.

Some accounts already have enough allowance, so the wallet may move directly to the swap request. Others receive an approval request first. Read the transaction type and spender rather than treating two consecutive prompts as one action. Rejecting the second prompt can stop the exchange even after the approval has confirmed.


Approval without execution

Approval and execution need separate decisions because each can leave a different on-chain result.

Insufficient allowance

An insufficient allowance can produce an approval request before the swap request. The proposed cap may equal the input or may be larger, depending on the application and wallet controls. Rejecting it leaves the previous allowance unchanged. Confirming it changes the permission even if the later exchange is never submitted.

Sufficient allowance

A sufficient allowance removes the need for a fresh approval transaction, but it does not validate the new quote. The selected input, amount and minimum output still require review. An old permission also deserves attention after backing out because the authorized spender may retain access up to the remaining allowance.


Quote movement and the stop decision

A quote estimates the output from the pool state when it is calculated; it does not reserve liquidity. Pool state can change while the confirmation window remains open, so a later calculation may return another expected output.

Changing the input amount, token identity, account or execution tolerance makes the earlier review obsolete. A network change does the same. Return to the exchange details and read the replacement terms as a new decision.

A refreshed quote may improve or worsen. Either direction requires another comparison because the expected output and minimum accepted output serve different purposes. The first is an estimate; the second is the boundary below which the submitted exchange should fail rather than execute.

Quote movement and the stop decision: Changing the input amount, token identity, account or execution tolerance makes the earlier review obsolete.; A network change does the same. Return to the exchange details and read the replacement terms as a new decision.

View full-size image

Price impact concerns how the requested trade interacts with available liquidity. Slippage tolerance concerns permitted movement between quotation and execution. Raising tolerance may make execution possible across a larger movement, but it also lowers the protected output boundary. It does not restore the earlier price.

Stop when a material field cannot be reconciled with the intended exchange. Repeatedly widening a setting to overcome a failure changes the acceptable outcome. It is not a neutral retry.


Minimum output as the execution boundary

Merlin swap uses concentrated-liquidity automated market maker contracts on Merlin Chain. Liquidity at the relevant prices affects how much output the transaction can obtain. The minimum-output condition converts the accepted tolerance into an enforceable boundary: execution may proceed at or above that amount, while a worse result should cause the transaction to fail. A failed submitted transaction can still incur a network fee because the network processed it.

Can a submitted swap still be cancelled?

A submitted swap cannot be cancelled through a dependable universal back button. While it is pending, some wallets may offer a higher-fee replacement that uses the same account nonce. The replacement competes with the original for inclusion; it does not erase it.

Replacement is no longer an option after the original confirms. It can also fail if the original is included first or if the wallet does not support the required transaction controls. Check the recorded status and transaction hash before assuming that a pending request disappeared.

A hypothetical mismatch before signing

The input amount, quoted output, minimum output, allowance state and refreshed terms in this example are hypothetical. The account starts with enough allowance for an input of 7.34 units. The reviewed quote shows 2.614 output units and a minimum of 2.588 units.

  1. The expected state is a wallet request tied to the same 7.34-unit input and the reviewed exchange.
  2. Before submission, the exchange details refresh to an expected 2.541 output units with a 2.516-unit minimum.
  3. The expected output has fallen by 0.073 units, so the earlier quote no longer matches the refreshed exchange terms.
  4. The reader rejects the wallet request and returns to the quote instead of submitting it.

The observable result is no swap transaction hash and no exchange-related balance change. The earlier allowance remains because it existed before this attempt. The reader can either review the lower quote again or decide separately whether to reduce the unused permission.

Pending, failed and confirmed transaction states

Transaction labels describe different states and require different responses. Treating all three as a generic delay risks a duplicate submission or an incorrect balance conclusion.

Pending

A pending transaction has been submitted but lacks final confirmation. The input may still appear in the wallet while the transaction waits. Avoid submitting another exchange solely because the interface is slow. First determine whether the original hash remains pending, was replaced or was dropped from the network's active transaction view.

Failed

A failed swap did not complete its requested state change. The failure does not automatically remove an earlier allowance, and the transaction may still incur a network fee. Before retrying, compare the failure details with the quote conditions, available balance and permission state. A blind repeat can reproduce the same cause.

Confirmed

A confirmed transaction receipt with a successful status shows that the exchange executed. Compare its account, token movements and status with the resulting wallet balances. If the output is not visible, check the correct account and exact token identity before initiating another exchange. A display problem does not change the confirmed transaction.


Permissions that remain after backing out

Backing out can leave either no on-chain trace or a residual token permission. The difference depends on whether an approval transaction had already confirmed.

Unsigned quotes and rejected requests

An unsigned quote does not reserve a price or move assets. Rejecting the only wallet request also leaves no submitted transaction to reconcile. A future attempt needs a new quote because pool conditions may have changed, even when the intended input remains identical.

Confirmed allowances

A confirmed allowance persists independently of the abandoned quote. It can be retained for a later exchange, reduced or revoked through another token permission transaction. Each change is itself an on-chain action. Match the account, token and spender before changing it, since revoking an unrelated allowance does not close the permission used here.

The final decision before submission

Proceed only when the account, network, token identities, input amount, expected output, minimum output and wallet request agree. Back out if a field changes or remains unclear. After rejecting the exchange, determine whether a confirmed allowance remains and whether keeping that permission still serves the intended next action.

Everyday questions about Merlin swap

Is revoking an allowance the same as cancelling the exchange?

No. Revoking or reducing an allowance changes a token permission for a spender; it does not reverse a confirmed swap or erase a pending transaction. If the swap was never submitted, revocation can close a permission left by an earlier approval. The revocation requires its own on-chain transaction and network fee, so check the exchange status before treating the allowance as the only remaining state.

Can a wallet simulation guarantee that the quoted swap will execute?

No. A simulation checks the proposed transaction against a particular state and may expose an expected failure before submission. Pool conditions, account state or network conditions can change before the transaction is included. Simulation is useful evidence, but the minimum-output condition and final transaction status still determine whether the exchange executes and what the account records.

Which change in a wallet request warrants rejection?

Reject a request when its network, sending account, contract, spender, input amount, authorization cap or transaction type differs from the action you reviewed. Wallets vary in how much call data they decode, so a prompt may not repeat every quote field. Missing detail is a reason to return to the exchange review, not to assume that the hidden terms stayed unchanged.

Where can I confirm whether an approval persists after backing out?

Check the on-chain allowance for the exact account, input token and spender. A wallet permission view or a chain explorer may expose that state, but the three identities must match the abandoned attempt. Closing the exchange interface or disconnecting the wallet does not revoke a confirmed approval. Reducing or removing it requires a separate permission transaction.

Does a replacement transaction undo a confirmed swap?

No. A replacement transaction can compete with an original transaction only while the original is still pending and both use the required account nonce. Once the swap confirms, another transaction cannot cancel that recorded state change. Exchanging the received asset again would be a new trade under new pool conditions, with its own quote, permission requirements and network cost.