Liquidswap fees: Pool trading charges and Aptos gas
· updatedLiquidswap fees cover pool trading charges, while Aptos separately charges gas for executing the transaction. Original V0 pools have published defaults of 0.3% for uncorrelated pairs and 0.04% for stable pairs. Those percentages describe configurable pool fees, not a permanent price for every swap. V1 uses a base fee plus a volatility-dependent component, so its cost needs a pool-specific quote. Gas is paid in APT and varies with execution and storage requirements. Price impact and slippage also affect the amount received. Comparing costs therefore requires the same input amount, the relevant pool version and a distinction between quoted output and network charges.
Bottom line: A fee-inclusive output quote already reflects pool charges, while Aptos gas remains a separate cost for the transaction's fee payer.
Pool charges shape output while gas pays for execution
The trading fee affects the token exchange inside the pool, while gas pays for executing the transaction on Aptos. In an original-pool exact-input swap, the pricing calculation applies the fee to the supplied input. It then calculates output using the relevant curve and reserves. The original router's output estimate includes that fee treatment, so the trading charge already affects the quoted receipt. Gas creates a separate charge against the transaction's fee payer.
Subtracting the trading fee again from a fee-inclusive output quote understates the expected receipt. Gas belongs alongside the quote as a separate network cost.
Amounts in different tokens need a common valuation basis before they can form one monetary total. That conversion adds another changing input: the exchange value of APT relative to the accounting currency. A pool percentage and a gas amount cannot be added directly because they use different units.
V0 defaults and the parameters that bound them
V0 separates its trading-fee setting from the pricing curve, with different defaults for stable and uncorrelated pools. An authorized fee administrator can change an individual pool's stored rate within the permitted bounds. The pool's fee getter returns a numerator and denominator, allowing an integration to display the configured percentage. The defaults below describe the original V0 schedule, not a live quote for a particular pool.
| V0 parameter | Published value | Constraint or interpretation |
|---|---|---|
| Uncorrelated-pool trading fee | 0.3% default | Configurable from 0.01% to 1% |
| Stable-pool trading fee | 0.04% default | Configurable from 0.01% to 1% |
| Trading-fee denominator | 10 000 | One numerator unit represents 0.01% |
Token amounts also enter contracts as integers in their smallest units. Fee arithmetic therefore includes rounding, which matters when displaying very small amounts. V0.5 retained much of the original pool structure in a separate deployment. Its own pool configuration remains relevant to the trading charge. The release reduced the gas required by stable-swap arithmetic; that change does not establish a lower trading percentage for every V0.5 pool.
How does V1 calculate its dynamic trading fee?
V1 calculates its trading fee by combining a base component with a volatility-dependent component. Its concentrated-liquidity pools supply tokens through price bins. The pool's configured parameters and recent activity determine the resulting rate.
The base component uses a base factor together with the bin step. Bin step describes spacing between adjacent price levels. It influences fee calculation alongside the base factor, so spacing alone does not identify the trading charge.
Recent bin movement feeds a volatility accumulator, which influences the variable component under the pool's volatility-control setting. A swap that crosses bins can change that accumulator during execution.
Elapsed time also affects the volatility reference. Configured time windows determine whether the reference persists, falls or resets after a quiet period. Two quotes for the same pair can consequently reflect different recent trading histories.
A configured ceiling limits the combined fee, and the model bounds its volatility accumulator. These controls limit the dynamic calculation without making every swap cost the same. Pool getters expose the parameters; an amount-specific quote shows their effect on output.
Where does the treasury share come from?
In V0, treasury revenue comes from an allocation of the trading fee that the pool collects. The remaining fee income stays with liquidity providers through pool accounting. The treasury allocation is configurable, and integer arithmetic affects the exact token amounts. V1 also directs protocol fees to the treasury under its own configuration. The original allocation does not establish V1's split. Aptos gas pays network charges separately from the pool's fee distribution.
Price impact and slippage change the cost comparison
A lower trading percentage can still produce a worse exchange if the pool offers insufficient liquidity at favorable prices. Price impact describes how the trade itself changes its average execution price. Original pools follow their pricing curves, while a V1 trade can consume liquidity across several price bins. Available depth therefore affects the output alongside the fee. Comparing fee-inclusive output for the same input amount captures both effects more usefully than comparing percentages alone.
Slippage describes exchange-price movement between the quote and execution. In an original-pool exact-input swap with a minimum-output check, execution aborts if the calculated output is below the supplied minimum. Slippage tolerance is an execution allowance, not an additional percentage paid to the treasury. Widening that allowance permits a poorer receipt if the price moves. A low network charge does not compensate for a materially worse exchange price.
What does the Aptos gas estimate include?
An Aptos gas estimate covers transaction execution and storage costs under the network's gas schedule. Computation, state access and newly allocated storage can affect the charge. Network conditions influence the gas unit price, while APT's market value changes the dollar equivalent. A fixed dollar estimate therefore cannot describe every Liquidswap operation.
The transaction declares a maximum gas amount and a gas unit price. The first limits gas units, and execution aborts if that limit is exceeded; the second prices each unit in octas, the smallest units of APT. Their product defines the transaction's upper fee bound. Actual gas consumption determines the gross charge, so raising the maximum does not automatically spend the whole allowance.
Storage refunds can change the net balance effect when execution releases eligible state. The net network charge equals gas used multiplied by gas unit price, minus any storage refund. That refund concerns Aptos storage accounting and does not change the trading percentage. Simulation estimates gas for a specific payload and blockchain state. Later execution can encounter different state and consume a different amount.
Flashloan charges depend on the pool version
Original Liquidswap flashloans use the pool's standard fee rules, while V1 has a separately configured flashloan fee. V1's volatility-dependent swap component does not apply to that flashloan charge. Both designs require borrowing and repayment, including the required fee, within one transaction. Aptos also charges for executing the complete transaction, including any other contract work that it contains.
Fee earnings and the cost of managing liquidity
Liquidity-provider income depends on the trades that a position actually serves and the fee allocation that applies. Original pools accumulate the provider's portion in their reserves. V1 assigns fee participation to liquidity in bins that swaps use, so total pool volume cannot establish an individual position's earnings. Redemption returns accumulated fees with the relevant liquidity share. Changes in the assets' value remain separate from the trading income that the position earns.
Adding liquidity, withdrawing it and replacing an allocation also require on-chain execution. Their network costs follow the work and storage involved in each transaction. V1 liquidity provision can also incur a composition fee, separate from gas. Gross fee income therefore differs from income after liquidity-management costs. A trading-fee percentage alone cannot establish the return on deposited capital.
If trading leaves a position's funded V1 bins, fee income stops while any later repositioning still incurs execution costs.
What to know about Liquidswap fees
-
Can a failed Liquidswap swap still consume gas?
- A swap that aborts during execution still incurs Aptos gas charges if the network commits the transaction. The failed transaction does not complete the intended exchange. A transaction discarded before execution has a different status, so a wallet error alone does not establish a charge. The committed transaction record identifies its status and gas consumption.
-
Does paying a higher gas unit price improve my exchange rate?
- A higher gas unit price affects network processing priority, not the pool's pricing formula. It does not lower the configured trading fee or add liquidity at a better price. Pool state can change before execution, so paying more gas does not fix the final exchange rate or reserve an earlier quote.
-
Why can a first liquidity deposit have a different gas cost from later deposits?
- A first deposit can create account storage that later deposits reuse. Original liquidity scripts register an LP coin for the account when needed, and storage allocation can affect Aptos fees. The difference concerns network execution and storage costs. It does not establish a special first-deposit trading fee or a universal surcharge.
-
Will a direct contract call avoid the pool's trading charge?
- A direct call still obeys the core pool's fee rules. Different routers or custom calls can change execution work and gas consumption, while the core retains its trading-fee enforcement. Removing peripheral price checks also changes the protection around accepted output, so a cheaper execution path can carry a different trade-off.
-
Can splitting a swap into smaller trades reduce its total fees?
- Splitting the input does not by itself reduce a V0 pool's proportional trading fee while its rate remains unchanged. Integer rounding can affect small amounts, and separate transactions each incur network charges. V1 calculations also respond to bin movement and trading history. Splitting therefore provides no universal reduction in the combined cost.
-
How can a V0 treasury allocation change while the trading rate stays the same?
- V0 exposes separate settings for the pool's trading fee and its treasury allocation. An authorized change to the allocation can alter how collected fees divide between the treasury and liquidity providers while leaving the trading percentage unchanged. The actual distribution still follows the contract's integer arithmetic and configured bounds.
-
Are trading-fee earnings the same as staking rewards?
- Trading-fee income and staking rewards use different accounting. Swap activity generates pool fees, while staking contracts calculate rewards from their funded reward supply, reward period and eligible stakes. A reward display does not establish the trading fee charged to swappers. Reward entitlement follows the particular staking pool's terms.