Galaxyexchange: Swap Risks Before You Sign
Galaxy Exchange by Swing supports non-custodial token swaps and bridging across supported networks. Compare the route before granting spending permission, then distinguish authorization, submission, and completion.
Topics on this page
- Route Preview
- Swing's SDK retrieves available routes before starting a transfer, allowing comparison before execution.
- Spending Permission
- EIP-2612 permits authorize token spending through signatures. Supported gasless orders also use EIP-712 typed-data signatures.
- Workflow Cancellation
- Swing documents SDK cancellation when users reject wallet connection or network switching. That method carries no promise of reversing a transaction after blockchain submission.
Quote Settings Before Execution
Swing's SDK quote parameters define the requested transfer before execution begins. The selected route and transfer parameters must match when the SDK starts the transfer.
| SDK Quote Field | Value and Transfer Scope |
|---|---|
fromChain
|
Source-chain identifier for the network that holds the sending asset. |
fromToken
|
Token identifier for the sending asset on the selected source chain. |
toChain
|
Destination-chain identifier for the network that will receive the transfer. |
toToken
|
Token identifier for the requested receiving asset on the destination chain. |
toUserAddress
|
Receiving wallet address on the destination chain. |
maxSlippage
|
Optional decimal between 0 and 1; 0.02 represents 2%. Swing's SDK quote guide specifies a 3% default when this field is omitted. |
The amount and sending wallet address also form part of the quote request. Changing a transfer setting calls for a quote that matches the revised transfer. The SDK guide's slippage default does not establish the setting that a particular Galaxy Exchange trade uses.
Permissions and Gasless Signing
EIP-2612 permits for compatible ERC-20 tokens carry a nonce and a deadline for on-chain use. That deadline does not expire the resulting spending allowance. Review the permission before signing, even when the wallet does not request native gas.
For supported gasless orders, Swing returns EIP-712 typed data in the transaction's
meta
field. Signing that data produces authorization; a signature alone does not establish trade completion.
Gasless execution depends on the selected routing protocol and supported chains. Swing says gas costs typically reduce the sending amount, affecting the destination proceeds. A gasless request can return a regular transaction, so check which execution format the quote actually returns.
Pauses and Cancellation
Swing's
transfer execution guide
distinguishes wallet connection, network switching, and required wallet actions during execution. An SDK integration can call
cancelTransfer
when the user rejects wallet connection or network switching. Check any submitted transactions separately after canceling the SDK transfer workflow.
Transfer-step statuses include
CONFIRMING
,
SUCCESS
, and
FAILED
. A success event describes the reported step; a transfer ID alone does not confirm completion. Check the overall transfer outcome and destination funds before treating the intended trade as complete.
Unwinding and Tool Fit
A reverse-direction swap or transfer requires its own available route and a fresh quote. Its pricing and charges can differ from the original trade, changing the amount returned. When post-submission cancellation is essential, choose a tool that explicitly documents it for the intended transaction type.
The SDK suits developers who need to handle wallet prompts and transfer-step events. Swing's Widget supplies an embeddable interface when a prebuilt swap-and-bridge component meets the application requirements.
Access Restrictions
Swing's access rules limit users connecting from the United States or Canada to swaps and transfers. They exclude contract calls, deposits, and staking for those users. The rules also bar mainnet transactions involving real funds from Swing's listed restricted countries and regions. Swing also restricts users whom OFAC lists as Specially Designated Nationals.