Liquidswap fees must be separated from gas and price impact
Updated on
Liquidswap fees are only one part of the total cost of an Aptos swap. Compare the pool fee, expected output, minimum accepted output and network gas separately, then reconcile the executed output and gas from the confirmed transaction.
The short version: A fair comparison keeps pool charges, price impact, slippage limits and Aptos gas separate until the transaction settles.
Cost entries for a like-for-like comparison
A like-for-like comparison uses the same transaction shape, fixed amount, asset identifiers, contract family and observation time. It also separates charges from exchange-rate effects and execution limits. Adding every visible field together would count some items twice because fee allocations divide an existing charge rather than create another one.
| Entry | Cost classification | What determines it | Applicable scope |
|---|---|---|---|
| V0.5 swap fee | Direct pool charge | Pool-specific fee configuration | Selected stable or uncorrelated V0.5 pool |
| V1 base fee | Base pool charge, if enabled | Base factor and bin step | Selected V1 pair and bin-step pool |
| V1 variable fee | Dynamic pool charge | Volatility parameters and bins crossed | Selected V1 pool when the variable component applies |
| Treasury allocation | Share of the pool fee | Pool or governance configuration | Allocated from the fee, not added again |
| Liquidity-provider allocation | Share of the pool fee | Contract version and liquidity used | Pool providers, with active-bin scope in V1 |
| Aptos gas | Separate network charge | Gas used and gas unit price | Transaction fee payer, which may differ from the sender |
| Price impact | Exchange-rate effect | Input size and available pool liquidity | Selected pool state during execution |
The trader pays the pool fee through the swap calculation. Liquidity providers and the treasury receive configured portions, so neither allocation belongs beside the full fee as another trader charge. V1 narrows provider earnings to liquidity in bins used by the swap.
Price impact also reduces economic value without producing a separate transfer labeled as a fee. Slippage tolerance is different again: it defines acceptable movement between quote and execution. A borrowing rate, bridge charge or exchange withdrawal fee belongs outside the Liquidswap pool comparison unless another service introduced it.
What turns a quoted output into a final amount?
For an exact-input swap, the pool state at execution decides the final token output, provided it satisfies the transaction’s encoded limit. A quote estimates the output from the state read before submission. It does not reserve liquidity or freeze V1 fee variables while the wallet request remains unsigned or pending.
Amounts to keep separate
Expected output
The expected output is the estimate returned for the specified input under the selected pool’s reserves, price bins and fee parameters. It normally reflects the pool calculation, including its swap fee. It does not absorb the separate Aptos gas charge because gas uses the network’s accounting rather than the output-token calculation.
Minimum accepted output
The minimum output is the lowest result the signed transaction authorizes. Liquidswap routers use this value as a slippage check and abort the swap when execution would return less. The distance between expected and minimum output is therefore tolerance for state movement, not an amount automatically paid to another party.
An exact-output transaction reverses the constraint. The desired output stays fixed while a maximum input caps what the router may spend, and any unused input returns to the account. Comparing exact-input with exact-output activity requires matching the accepted constraint as well as the displayed amounts.
V0.5 and V1 use different fee logic
The selected contract family determines which fee model applies. Treating every Liquidswap pool as one fee tier can produce a false comparison even when the input and output asset labels look identical.
V0.5 pool configuration
V0.5 supports separate stable and uncorrelated curves. Its pool fees are configurable, as is the division between liquidity providers and the treasury. The applicable values must come from the selected pool’s configuration rather than a remembered default. That preserves differences between pools without presenting an old setting as permanent.
V1 dynamic calculation
Liquidswap V1 calculates its base fee by multiplying the pool’s base factor by its bin step.
The total V1 swap fee adds a variable component to that base. A volatility accumulator responds to factors including bins crossed and elapsed time between transactions. The parameter set also imposes a maximum fee. Since these inputs belong to a particular pool, another bin-step pool for the same pair can produce a different cost structure.
Liquidity providers earn from bins the swap actually uses, while a configured protocol portion goes to the treasury. Provider fees accumulate with the position and can be collected when liquidity is withdrawn. The treasury component remains a configured allocation rather than another volatility-driven charge.
Aptos gas belongs beside the swap quote
Every Aptos transaction carries a gas unit price specified in the network’s native token. The settled network charge follows actual gas use and the gas unit price, while the maximum gas amount is an execution cap rather than the final bill. Record gas in APT separately from token output and note the transaction’s fee payer. Converting both into one currency requires a clearly chosen market price and timestamp, which are comparison inputs rather than Liquidswap protocol facts.
Why can two similar swaps settle at different costs?
Two swaps diverge when the pool, fee parameters, liquidity state, input size or network gas changes. Matching token symbols and a similar displayed amount do not establish a like-for-like comparison.
Pool liquidity can move between the quote and execution. In V1, crossing a different set of bins can also affect the variable fee calculation. The later transaction may therefore receive a different output even when its sender chooses the same nominal input and slippage setting.
Trade size changes price impact because the swap consumes available liquidity along its pricing path. This effect belongs in the realized exchange rate, not in the fee column. A benchmark price can reveal the difference, but both observations need the same time basis and compatible asset units.
Asset symbols alone cannot identify an Aptos asset or Liquidswap pool. A sound record keeps the full asset types, contract version and pool identity. For V1, it also keeps the bin step. That prevents a comparison from joining transactions governed by different contracts or fee settings.
A reproducible quote-to-settlement record
A reproducible comparison pairs the pre-submission quote with the confirmed transaction rather than relying on screenshots taken at unrelated times. For an exact-input swap, the quote side needs the exact input, expected output, minimum output, asset identities, pool identity, contract version and observation time. For an exact-output swap, record the desired output and maximum input instead.
The settlement side needs transaction status, actual token balance changes, gas used and gas unit price. For an exact-input record, compare the output received with the expected output first. For an exact-output record, compare the actual input spent with the expected input. Keep the gas record separate until both values can be converted with the same valuation method and timestamp.
For an exact-input swap, quote deviation can be expressed as expected output minus received output, divided by expected output. Effective exchange cost needs a separate benchmark and identical decimal handling. Neither formula should add the treasury and provider portions after the full pool fee, since those portions divide the same charge.
This record shows the difference between the quote and pool execution, whether the result met the acceptance boundary and the Aptos gas charge. It also keeps unrelated bridge, borrowing and exchange charges from being mislabeled as Liquidswap fees.
Worth knowing
Is slippage paid to Liquidswap as a fee?
No. Slippage tolerance sets an execution boundary rather than transferring a charge. Liquidity providers and the treasury receive configured allocations from the pool swap fee, while unused tolerance is not paid to either party. A router may execute when the available output meets the encoded minimum; otherwise, it aborts the swap. Changing the tolerance affects acceptance but does not increase the fee by itself.
Can the maximum gas amount be treated as the final network charge?
No. The maximum gas amount caps how many gas units the transaction may consume before aborting. The settled Aptos charge depends on actual gas use and the gas unit price recorded for the transaction. A wallet may display the cap or an estimate before signing, so use the confirmed transaction values when reconciling cost. Keep this APT charge separate from the pool’s output-token calculation.
Who receives the fee charged by a Liquidswap pool?
Liquidity providers and the pool treasury receive configured portions of the swap fee. The precise division belongs to the selected pool and contract version, so it should not be inferred from an unrelated pool. In V1, provider earnings attach to liquidity in bins the swap uses. The treasury allocation and provider allocation divide the pool fee; they are not two additional charges placed on top of it.
How should exact-input and exact-output transactions be compared?
Compare the constraint each transaction fixes. An exact-input swap fixes the amount spent and protects the trade with a minimum output. An exact-output swap fixes the amount received and limits spending with a maximum input, returning any remainder. Normalize both records to the same assets, decimals, pool and observation time. Then compare realized exchange value and Aptos gas without treating the two transaction shapes as identical.
Does rejecting a wallet request create an Aptos gas charge?
No. Rejecting the request before submission leaves no transaction for Aptos to execute, so it creates no on-chain gas charge. A signed request the wallet submits is a different state, even if the application later reports an error. Check whether a transaction hash and ledger result exist before classifying the event. This distinction prevents an unsubmitted prompt from being mistaken for a failed paid transaction.
Are bridge and exchange withdrawal charges included in a Liquidswap quote?
No. A Liquidswap pool quote concerns the selected on-chain swap and its pool calculation. A bridge fee, centralized-exchange withdrawal charge or borrowing cost comes from a separate operation or service. Keep those entries in an end-to-end budget when they apply, but label them separately. Combining them under Liquidswap fees would obscure who charged each amount and which action created it.
Can pools using the same token symbols have different fee behavior?
Yes. Symbols are display labels and do not uniquely identify an Aptos asset, contract family or pool. Distinct V0.5 pools can have different configured fees, while V1 pairs can differ by bin step and dynamic parameters. Compare full asset types and the actual pool identity before comparing costs. Otherwise, two rows carrying familiar symbols may describe contracts with different pricing and fee logic.