Bungeeexchange route comparison weighs output, gas costs, and estimated time across compatible swap routes
Bungeeexchange route comparison weighs destination output, execution costs, and estimated time across routes meeting the same swap requirements. For a fixed input, token quantities are directly comparable when the destination token and network match. Gas charges, spending permissions, and provider restrictions can change which option fits the transfer. Bungee API v1 has a documented migration path to Socket Swap V3, so route fields must match the integration version. In V3, route tags express different ranking priorities, while each quote carries its own expiry. The largest output and shortest estimated duration answer different questions; neither measure establishes a universal winner.
Key takeaway: A larger quoted output represents an advantage only when destination assets, input quantities, and execution costs remain comparable.
Quotes, route tags, and execution data
The quote describes the proposed exchange, route tags express ranking priorities, and transaction data describes execution requirements. Socket routing supplies candidates for both same-chain and cross-chain swaps.
Swap V3 returns a flat
routes
array, with
quoteId
and
expiresAt
identifying each direct transaction quote and its validity window. An optional
approval
object describes potential token-spending requirements. The returned
txData
supplies execution data for a ready route, while
statusCheck
describes tracking.
MAX_OUTPUT
prioritizes output,
FASTEST
identifies speed, and
MIN_INPUT
becomes relevant to output-targeted quotes.
SUGGESTED
supplies a recommendation. These tags describe candidates returned for the request, after provider filters and quote mode restrict the comparison. Legacy Bungee response groups, including
autoRoute
and
manualRoute
, have different shapes.
What makes output and gas costs comparable?
Comparable output values refer to the same destination asset, network, and quote objective, with consistent units throughout the calculation. When returned, output.minAmountOut reports the minimum output separately from the quoted output.amount. Compare quotes with the same slippage tolerance. The input basis matters too: holding input fixed isolates output differences, while holding output fixed shifts comparison to the required input.
Token quantities and dollar valuations
A token amount expressed in base units becomes a display quantity by dividing by 10 raised to the token’s decimals. Use the applicable token metadata, because a symbol does not establish decimals or destination token identity.
output.valueInUsd
gives a dollar valuation for comparison; it is not an extra token payment to the receiver.
Integrator fees in the output
Socket Swap V3 reports client-facing output amounts net of configured integrator fees.
An integrator’s configured fee fraction equals
feeBps
divided by 10,000, so the applicable rate changes with that setting. Direct bridge routes without a swap take the fee on the input side; deducting it again would count that fee twice.
Gas as a separate cost input
The route also exposes
gasFee
for execution-cost comparison. A native-token gas quantity and an output-token quantity need a common valuation basis before subtraction. Read what the returned gas estimate covers before combining fields. Treat any required approval transaction as a separate execution requirement, since an approval object alone does not prove another transaction is necessary.
How should speed and quote expiry affect route selection?
Use
estimatedTime
to compare expected durations, and use
expiresAt
to identify quotes whose validity window has ended. Estimated duration concerns anticipated execution, while the timestamp limits how long the quote can remain usable.
FASTEST
helps rank candidates when timing matters, but its estimate does not fix the actual completion time.
Swap V3
quotes past their returned
expiresAt
timestamp must be discarded.
A fresh quote may return different output, gas estimates, or candidates. Comparing an expired quote with a current one mixes observations from different validity windows. Keep the requested parameters consistent after refreshing, and recalculate any ranking affected by the returned values.
A worked trade-off between output and estimated time
A higher-output quote can justify a longer estimated duration only while the other comparison conditions remain equivalent. This hypothetical comparison uses quotes for the same fixed input, destination asset, and network, with equal execution costs. Both remain unexpired and meet the same permissions and funding requirements.
The higher-output quote offers 742.64 units of the destination token with an estimated duration of 86 seconds. The faster quote offers 740.18 units with an estimated duration of 53 seconds. Subtracting their output quantities gives 2.46 token units, while subtracting their time estimates gives 33 seconds.
On those assumptions, the higher-output quote offers 2.46 additional quoted token units with an estimated duration 33 seconds longer. A timing preference favors the shorter estimate; an output preference favors the larger quantity. Changing gas costs, the destination token, or expiry can invalidate that conclusion. An estimate supplies no fixed arrival deadline.
Restrictions change which routes enter the comparison
Funding requirements and optional execution features define eligible candidates before output or speed can decide between them.
Origin funding requirements
Direct
tx
routes require an integration able to submit the origin transaction. Deposit routes use a funding address, while
cex-withdraw
identifies exchange-withdrawal funding and requires an exchange identifier. A deposit preview with
activationRequired=true
lacks
txData
and
depositData
until activation. Its quoted terms are not yet executable funding instructions.
Incognito provider selection
In Swap V3,
incognito=true
restricts direct
tx
quotes to provider IDs
houdini
and
changenow
. The mode supports Ethereum Virtual Machine (EVM) and Solana routes, requires
refundAddress
, and excludes output-targeted quoting. It also excludes deposit and
cex-withdraw
flows. Separating sending and receiving wallets in the transaction path does not establish universal anonymity or erase every record.
Destination contract requirements
A route intended to run destination contract logic needs more than a token transfer. Swap V3 requires
destinationPayload
and
destinationGasLimit
together, with
receiverAddress
identifying an
IBungeeExecutor
contract. This option applies to supported
tx
routes and excludes deposit-address routes and Sui destinations. Those requirements remove otherwise attractive quotes from consideration when they cannot perform the intended destination action.
Fixed input and target output rank different quantities
EXACT_INPUT
holds
inputAmount
constant and compares quoted outputs; output-targeted modes ask the API to determine the required input.
EXPECTED_OUTPUT
targets
outputAmount
with estimated input, whereas
EXACT_OUTPUT
solves for the input required to meet that output amount. Output modes require
outputAmount
and omit
inputAmount
.
Output-targeted quoting is available only on eligible direct
tx
providers in
Socket Swap V3.
Matching quotes may carry
MIN_INPUT
, allowing ranking by the smaller required input for the specified output. Supported same-chain decentralized exchange (DEX) simulation can inform a fixed-input comparison, but output quote types do not support that simulation.
Ranking a quote and confirming delivery remain separate
A selected quote describes proposed execution, while the status response identifies how far the actual route has progressed.
quoteId
connects tracking to the chosen route.
PENDING
and
IN_PROGRESS
do not confirm destination delivery.
COMPLETED
denotes delivered funds;
FAILED
,
EXPIRED
, and
REFUNDED
identify other terminal outcomes. Source confirmation can therefore coexist with an unfinished destination transfer.
For routes carrying
destinationPayload
,
isDestPayloadExecuted
separately records whether the destination calldata ran successfully. A transfer can deliver funds even when that action fails. The receiver balance and an intended contract outcome answer different completion questions. Route comparison ranks compatible, valid quotes; estimated time and quoted value do not establish a completed transfer.
Bungeeexchange route comparison questions worth asking
When does an ERC-20 approval object require another transaction?
Another approval transaction is needed only when the existing allowance is below the quoted approval.amount. The quote does not read the wallet’s on-chain allowance. It can return approval whenever a route could require it, even when permission already exists. Compare allowance for the specified token, owner, and approval.spenderAddress; native-token inputs return no approval.
Can an intermediary contract submit a direct transaction route?
The quote must name an intermediary contract in contractCaller when that contract will call AllowanceHolder for a userOps=tx route. The holder normally requires the signing wallet to be the caller. Otherwise the intermediary call can revert with CallerNotSignedUser. This authorization applies to the intermediate caller; it does not turn the contract address into the output recipient.
How should output.quotedAmount be read on a simulated route?
The optional output.quotedAmount field on a simulated route records the amount before simulation adjustments. Use output.isSimulated to identify simulated output, and distinguish the adjusted amount from the earlier quote. Same-chain DEX simulation drops reverting routes and adjusts amounts to reflect simulation. Those results describe the simulation, without fixing the eventual execution price.
What happens when inclusion and exclusion filters name the same provider?
The API does not permit overlapping provider IDs in includeProvider and excludeProvider. Both parameters accept comma-separated public provider IDs. Remove the overlap before requesting routes.
Does a missing provider mean it has stopped supporting the swap?
A missing provider establishes only that the response contains no selectable quote from it. Provider filters, requested capabilities, and simulation can narrow the returned choices. For same-chain DEX simulation, includeQuoteRejections=true can expose rejected providers. Absence alone does not establish a permanent compatibility change or a provider outage.
Who covers transaction fees for a sponsored same-chain Solana quote?
The sponsor covers transaction fees and associated token account rent when a same-chain Solana quote uses solanaSponsorAddress. This sponsorship requires a Solana origin. Keep its scope separate from receiving gas tokens for later transactions: paying the swap’s execution costs does not, by itself, establish a balance of native tokens for subsequent activity.