Rango exchange

Rango exchange is a Cross-Chain DEX Aggregator for Rebalancing and Reverse Swaps

Rango exchange is a practical entry point for managing a cross-chain position as a complete lifecycle: execute one quoted swap, confirm the actual destination-chain asset and balance, rebalance only verified units, and obtain a fresh quote when reversing the position. Treat the received token contract, chain, decimals, and terminal transaction status as the record of what you own. A reverse swap is a new trade with new routing, liquidity, price impact, and network costs; it doesn’t undo the original transaction.

Lifecycle costs accumulate on both legs

The quoted route decides Rango exchange lifecycle costs on each leg, so entry and reversal need separate budgets.

A quote allocates costs among network gas, the swapper or bridge, Rango, and any fee configured by an integrating wallet. The API describes 3 deduction placements: payment from the source wallet, reduction from output, or payment from the destination wallet. That distinction changes the balance available for the next action. A fee taken from output reduces the token received, while source-chain gas consumes the native asset beside the swap amount. A destination claim also needs native gas on that chain. The displayed output already reflects deductions labeled as decreases from output, so don’t subtract them again.

Rango’s Basic API sets a 0.1% default referrer fee and a 3% ceiling when an integrator supplies the fee field. Those figures describe integration settings, rather than a universal charge across every wallet interface. Use the fee lines in the actual quote.

On Solana, each transaction carries a 5,000-lamport base fee per signature, while an optional priority fee adds another cost component. A reverse route pays its own network and venue costs, so the entry quote never prices the unwind.

Record the entry before moving the position

Entry records decide whether later balance changes are explainable, so save the route details before signing the first Rango transaction.

Capture the source chain, source token contract or native-asset label, input amount, destination chain, destination address, quoted output, and selected path. Save the request identifier and wallet-generated transaction hash after broadcast. For ERC-20 assets, record the contract address and decimals rather than only the ticker. USDC uses 6 decimal places, and Ethereum wallet addresses encode 20 bytes; the familiar hexadecimal display contains 42 characters including its prefix. These values prevent a rounded wallet display from becoming the accounting record. They also expose a wrong-network selection before rebalancing.

Network identity belongs in the same record. Ethereum Mainnet uses chain ID 1, Base Mainnet uses chain ID 8453, and Polygon PoS uses chain ID 137. Base and Ethereum spend ETH for gas, while Polygon PoS spends POL. An Arbitrum One balance remains separate from an Ethereum balance even when both wallets display the same 42-character address.

Entry decision checklist

This preparation turns the first swap into a traceable starting state. It fixes the amount and asset identity that every later rebalance must use.

Did the destination balance actually settle?

The destination balance has settled only when Rango shows a terminal outcome and the wallet holds the exact token contract on the intended chain.

Regardless of the route taken, Rango defines 3 transaction states - running, failed, and success - and 4 output classifications for the asset that finally reaches a wallet. The classifications distinguish desired output, input returned on the source chain, a middle asset on the source chain, and a middle asset on the destination chain. A status label without the output classification leaves the position ambiguous. The Basic API represents a cross-chain sequence of up to 3 component transactions: source swap, bridge, and destination swap. Inspect all recorded hashes when the route crosses networks.

On an EVM network, a transaction hash is 32 bytes, while each account or token contract address is 20 bytes. Match both the destination address and token contract before comparing amounts. Then apply the token’s decimal field to the base-unit integer. USDC uses 6 decimals, whereas ETH uses 18 decimal places because 1 ETH equals 10^18 wei. The verified human-readable balance becomes the rebalance input.


Rebalancing starts from the received units

Rebalancing should start from settled base units, because quoted output and wallet display rounding don’t define the spendable on-chain balance.

Read the destination token’s integer balance, apply its decimals once, and subtract any units reserved for a later action. Bitcoin records 1 BTC as 100,000,000 satoshis, while Solana records 1 SOL as 1,000,000,000 lamports. ERC-20 balances use the decimals value exposed by each contract; the standard doesn’t force one universal precision. A target rebalance therefore begins with token units, rather than a fiat estimate that moves between the entry and adjustment. This also avoids repeating conversion roundoff.

Request a fresh quote for only the adjustment amount. Keep ETH, POL, or SOL outside the token amount when that native asset pays gas, and base the next record on the actual post-rebalance balance. A partial adjustment leaves a deliberate remainder whose contract and chain stay unchanged.

Rango Exchange banner with cross-chain aggregator text on blue background

Approval state affects the next adjustment

Existing token allowance determines whether the next adjustment needs one wallet action or a separate approval before the Rango swap.

As a rule, Rango returns approval data for EVM networks, TRON, and Starknet when the route needs permission and the available allowance is too low. That approve-then-swap path creates 2 signed transactions: one approval and one main transaction. The route supplies the spender dynamically for some bridges, so an allowance from the entry route doesn’t prove that the reverse route can spend the token. Compare required and current approved amounts before proceeding. Both values must cover the exact input. A completed approval alone doesn’t move the token balance.

An ERC-20 allowance persists until the holder changes it or the spender uses it. After a partial rebalance or full reversal, review the remaining amount against the workflow you still intend to run. Reducing an unused allowance makes the maintenance record match the closed position.


Rango Exchange banner with white cross-chain aggregator text on blue

A reverse swap opens a new route

A reverse swap requires a new quote from the verified output asset, because Rango recomputes the path under fresh market conditions.

The return leg isn’t a replay of the entry transaction. Rango’s routing engine evaluates decentralized exchanges, bridges, and message paths again, and it can choose a different sequence. A Bitcoin-to-Cosmos route might involve THORChain, while a Solana leg can use Jupiter and a Cosmos transfer can use Inter-Blockchain Communication. These mechanisms price and settle differently, so the reverse quote owns its output estimate, fee placement, price impact, and gas requirements. The original route remains only the acquisition record; it doesn’t reserve a way back.

Select the exact received contract or native asset as the new source, enter no more than the verified spendable balance, and confirm the intended return chain. A symbol such as USDC doesn’t identify a cross-chain holding by itself. The reverse position closes only after its separate terminal output appears in the controlled address.

Maintenance closes the position record

A complete Rango exchange record closes only after entry and reversal hashes, final balances, and remaining allowances agree with the intended endpoint. Keep 2 route records because each quote and transaction stands alone. Archive chain IDs, token contracts, base-unit and display amounts, status, output classification, and gas assets. Then change any ERC-20 allowance that no longer serves the workflow. This compact record gives the next rebalance a verified starting balance.

Questions worth asking

Which wallet setup supports a two-chain Rango exchange rebalance?

A two-chain rebalance requires control of the source signing address and the destination receiving address on their respective networks. One wallet application may cover multiple EVM chains, while Solana, Bitcoin, or Cosmos support may use another interface. Keep the required native gas asset beside each signing account: ETH for Ethereum, Base, and Arbitrum One, POL for Polygon PoS, and SOL for Solana. The addresses, rather than the app brand, define control.

Can identical token tickers represent different holdings after a Rango exchange swap?

Yes, identical tickers can identify separate contracts or mints on different chains after a Rango exchange swap. Chain, contract address, and decimals form the usable asset identity. Native USDC and a bridged USDC representation may share familiar lettering while carrying different addresses and route support. Record the exact output token returned by status data, then make that same asset the source of any adjustment or reversal.

When should a residual balance remain unswapped after rebalancing?

A residual balance should remain when the source asset pays network fees, base-unit rounding prevents an exact display amount, or another scheduled action needs those units. ETH, POL, SOL, and BTC fund their respective network activity, while an ERC-20 swap normally spends a token beside a separate native gas balance. Use the quoted spendable amount and check the post-transaction base-unit balance before classifying the remainder as intentional.

Does rejecting the final wallet signature alter the recorded Rango balance?

Rejecting an unsigned or unbroadcast main transaction doesn’t change the on-chain token balance recorded for the Rango workflow. An earlier approval transaction is separate, however, and it may already have changed the ERC-20 allowance even though no swap occurred. Recheck the allowance, keep the original balance as the position state, and request new transaction data before attempting the adjustment again.