Swapr adjustable fees change through governance and pool configuration
Swapr adjustable fees are pool swap charges whose update mechanism depends on the pool version and configuration. Original V2-style pools support authorized rate changes. Swapr V3 on Gnosis Chain adds dynamic fees, while some specialized pools have used fixed rates. The applicable percentage affects swap input; it doesn't include network gas costs or explain the full price impact of a trade.
Updated:
In the original pool design, the swap charge and protocol revenue share affect different calculations. Changing the swap rate alters pricing. Changing protocol fee collection affects how accrued pool value is shared with the protocol and liquidity providers.
A pool's active fee setting determines its swap charge, while liquidity depth and network costs also affect the cost of an exchange.
The Swap Input Behind the Percentage
The swap-fee percentage measures the fee component relative to the tokens entering the pool during an exchange. In the original V2-style design, the pair calculates that input from its balances and reserves. The fee doesn't apply to the wallet's entire balance or directly to the output-token quantity. The pair accounts for it within its pricing constraint, so an output quote already incorporating the fee shouldn't receive the same deduction twice. Expressing the fee in input-token units also distinguishes the token amount from its value in another asset.
From Stored Parameter to Effective Input
The V2-style parameter
swapFee
uses a denominator of 10,000, so its stored integer must be converted into a percentage.
The original pair code initializes this parameter to 25, equivalent to 0.25% of swap input.
That initialization describes the code default. An authorized update can replace it for an individual pair, making the active stored value relevant to the trade. Divide the stored integer by 100 to express the rate as a percentage.
For input amount A and stored fee f , the fee component is A × f ÷ 10,000. The effective input for constant-product pricing is A × (10,000 - f ) ÷ 10,000. Both quantities use the input token's units. The full input enters the pool's balance; effective input expresses its treatment in the invariant calculation. It doesn't imply a separate transfer to a fee recipient during that swap.
Pool reserves and trade size also determine output, and on-chain integer arithmetic can round calculated amounts.
Who Can Change a V2-Style Pool's Fee?
A V2-style pair accepts fee changes only from its factory, which restricts updates to its authorized
feeToSetter
address. That address can call the factory's pair-specific fee setter. The update targets a particular pair, so it doesn't automatically change every pool's rate. A wallet holding liquidity tokens doesn't automatically gain permission to call the setter. The rate remains a pool parameter until an authorized update changes it; trade volume doesn't itself trigger a new rate in this V2-style design.
The original pair contract rejects a
swapFee
value above 1,000, equivalent to a 10% input fee.
This ceiling applies to that implementation; it doesn't describe V3's fee rules. A proposed governance change also leaves the stored parameter untouched until the authorized on-chain update occurs. The code limit and the active trading charge therefore answer different questions, even though both use the same parameter scale.
Dynamic and Fixed Fees in Swapr V3
Swapr V3 on Gnosis Chain supports dynamic fees through its Algebra-based pool design, so volatility can affect the charged rate. A dynamic design doesn't require every pool to use variable fees. On February 16, 2024, Swapr described sDAI-EURe and sDAI-WXDAI pools using fixed 0.01% swap fees.
| Pool or Configuration | Fee Model | Documented Rate | Applicability |
|---|---|---|---|
| Original V2-style pair | Factory-adjustable stored rate | 0.25% code initialization | Default can change through authorized updates |
| Gnosis Chain V3 dynamic pool | Volatility-responsive rate | Variable | Applies to pools using dynamic mode |
| V3 sDAI-EURe pool | Fixed configuration | 0.01% in the February 2024 report | Historical pool setting |
| V3 sDAI-WXDAI pool | Fixed configuration | 0.01% in the February 2024 report | Historical pool setting |
The fixed examples differ in the asset paired with sDAI, so they concern different trades despite sharing a reported rate. Those percentages describe the February 2024 configurations, and later pool changes can alter them. Concentrated liquidity also doesn't dictate the fee mode: price ranges describe where a position participates, while pool configuration governs its charge. Range width and fee adjustment can affect different parts of a provider's earnings.
Protocol Revenue and LP Fee Income
The protocol-fee switch in the original pair design controls whether the protocol can receive newly minted liquidity-provider (LP) tokens. A nonzero
feeTo
recipient enables the mechanism. During liquidity minting or burning, the pair checks growth against its recorded reserve baseline. It can mint LP tokens to that recipient when the baseline exists, the square root of the reserve product has increased, and integer rounding leaves a positive issuance. The configurable
protocolFeeDenominator
influences this allocation. The protocol receives a pool ownership share through this mechanism, rather than a separately transferred slice of every incoming swap.
A zero
feeTo
address disables that minting path. It doesn't set the pool's swap fee to zero; the separate
swapFee
parameter still controls pricing.
Protocol LP-token issuance reduces existing providers' proportional ownership in those original pairs. V3 adds range participation: an out-of-range position doesn't earn new swap fees. Trading volume and competing active liquidity also affect fee income. A higher pool percentage can therefore coexist with lower provider earnings, while an unchanged percentage can produce different earnings as trading activity changes.
Does a Lower Pool Fee Mean a Cheaper Swap?
A lower pool fee reduces one pricing component, while liquidity depth, trade size, and network costs also affect the exchange. The reserve curve changes the exchange rate as a trade consumes liquidity. This price impact can outweigh a lower fee. A comparison needs a common trade-size basis and consistent asset values, with each network's execution costs accounted for separately. Network gas pays for execution on the selected chain, and its cost can change independently of pool governance.
A quote's output amount reflects the pool fee and available liquidity for a particular trade size. Comparing costs on a common basis requires valuing any separate network charge in the same unit. The swap-fee percentage alone doesn't provide that conversion. An authorized update changes the rate used in V2-style pricing. A dynamic pool recalculates its rate under the conditions governing its fee model.
Frequently asked questions about Swapr adjustable fees
Does a V2-Style Fee Change Apply to Both Swap Directions?
The original V2-style pair uses the same stored swapFee parameter for both input-token directions. Its invariant calculation applies that parameter to whichever token enters the pool. Reversing a trade changes the input token and reserve relationship, so matching fee percentages don't imply matching output amounts.
Can I Derive an Eco-Routed Trade's Fee From Swapr's V2 Default?
Swapr's V2-style code default doesn't establish the fee of an eco-routed trade. Eco-routing considers supported trading protocols, so execution can occur outside Swapr's native pools. The selected protocol's rules, together with any pools it uses, determine the applicable fees; a default from another pool isn't a substitute.
Is the Proposed SWPR Fee Split a Percentage of My Entire Swap?
The initial SWPR tokenomics proposal allocated protocol revenue 70% to the Swapr Treasury and 30% to the SWPR Fee Share, so those percentages describe a proposed division of collected protocol fees rather than additional percentages charged on the full input amount of each trade.
Can an Authorized V2-Style Fee Update Set the Rate to Zero?
The original V2-style pair code permits a zero swap-fee parameter in an authorized update. Its unsigned parameter cannot be negative, and its validation caps the upper value without imposing a positive minimum. This permitted configuration doesn't establish any pool's active rate or eliminate network transaction costs.
Are Swap Fees and DIY Farming Rewards Calculated on the Same Base?
DIY farming rewards use a campaign's allocated reward token, while pool swap fees arise from trading input. Campaign creators choose the reward token, reward amount, and start and end times. That allocation doesn't establish a pool's swap-fee rate or represent a fixed deduction from each trade.