DeFi Fee Structures: What You Pay and Why
DeFi fees come from swaps, gas, liquidity pools and protocol charges. This guide explains each fee, who sets it and how to keep your costs down.
On this page
Short answer
DeFi fee structures are the charges you pay to trade, lend or provide liquidity on a decentralised finance protocol. They include the swap fee taken by the exchange, the gas fee paid to the network, the share paid to liquidity providers and any protocol fee kept by the project.
What are DeFi fee structures?
DeFi fee structures are the set of charges a user pays to trade, lend, borrow or provide liquidity on a decentralised finance protocol. They cover the swap fee taken by the exchange, the network gas fee paid to validators, the share of fees paid to liquidity providers, and any protocol fee kept by the project itself.
Every fee has a different job. The swap fee pays for the trade to happen on the exchange. The gas fee pays for the transaction to be recorded on the blockchain. The liquidity provider fee rewards the people who supply the tokens that make trading possible. The protocol fee, when one exists, funds development, audits and the team behind the project.
Fees matter because they decide whether a trade is worth doing at all. A small trade on a busy network can cost more in fees than the trade is worth, while the same trade on a cheaper chain can be a fraction of the price. The table below shows the main fees and who receives each one.
| Fee | Who sets it | Who receives it |
|---|---|---|
| Swap fee | The exchange or pool | Liquidity providers, sometimes the protocol |
| Gas fee | The network, by demand | Validators or miners |
| Protocol fee | The project team or token holders | Protocol treasury |
| Bridge fee | The bridge service | Bridge operators and relayers |
| Withdrawal fee | The protocol or wallet | The protocol or service provider |
How do swap fees work?
Swap fees are charged as a percentage of the amount traded, and the rate depends on the pool. Most automated market makers offer several fee tiers, such as 0.05% for stablecoin pairs, 0.3% for common pairs and 1% for volatile or thinly traded pairs. The pool creator or the protocol chooses the tier when the pool is created.
The fee is taken from the trade itself, so you do not pay it as a separate line item. If you swap 1,000 units of one token for another at a 0.3% fee, 3 units go to the fee and 997 units buy the new token. The split between liquidity providers and the protocol is set by the protocol, and some protocols send the whole fee to providers.
Fee tiers exist because different pairs carry different risks. A stablecoin pair barely moves in price, so providers accept a low fee in return for steady volume. A new token pair can swing sharply, so providers need a higher fee to cover the risk of holding it. DeFi basics explains how these pools are set up in the first place.
What is gas and why does the price change?
Gas is the fee paid to have a transaction processed and recorded on the blockchain. Every action in DeFi costs gas: a swap, a deposit, a withdrawal, a vote and even approving a token for the first time. The gas price rises when the network is busy and falls when it is quiet, because users bid for limited space in each block.
On some networks the gas fee is a few cents, and on others it can be tens of dollars during a busy hour. This is why the same swap can be cheap on one chain and costly on another. Gas is paid in the network's native token, so a user needs a small balance of that token before doing anything else.
Gas is separate from the swap fee, and both apply to the same trade. A trade that looks cheap because the swap fee is 0.05% can still be expensive if gas is high. Checking both numbers before confirming is the habit that saves money, and gas fees explained covers how network fees are calculated.
Who earns the fees in DeFi?
Liquidity providers earn most of the swap fees. When you deposit two tokens into a pool, you receive a share of the pool, and each trade in that pool pays you a share of its fee in proportion to your deposit. The more you deposit and the more the pool trades, the more fees you collect.
Protocol treasuries earn the protocol fee where one is switched on. Token holders sometimes vote on whether to turn it on, how high it should be and what the money is spent on. Some protocols keep it off to attract volume, and switch it on later once they have enough users.
Validators and miners earn the gas fee for processing transactions. Bridge operators earn bridge fees for moving assets between chains. Each party is paid for a different service, which is why a single action can carry three or four separate charges. How DeFi apps are built shows where each of these fees is set in the code.
How do fees differ between chains and exchanges?
Fees differ mainly because chains and exchanges compete on cost, speed and the pairs they support. A large exchange on a busy chain charges more gas but offers deep liquidity and tight prices. A smaller chain charges less gas but may have fewer pairs and wider price gaps, so the saving on gas can be lost on the trade itself.
Centralised exchanges charge a trading fee that is usually a flat percentage, and they hide the gas cost inside their own systems. Decentralised exchanges show every fee separately, which makes them easier to compare but harder to read at first. Some decentralised exchanges also offer fee discounts for holding their token or for trading large volumes.
Layer 2 networks sit between the two: they settle on a main chain but process trades off it, so gas is far lower while liquidity stays close to the main chain. The right choice depends on the size of the trade, how often you trade and which tokens you need. Comparing the total cost, not just the headline fee, is the only fair way to choose.
Example (hypothetical): a swap and a pool deposit
A user wants to swap 2,000 units of token A for token B on a decentralised exchange, then deposit the result into a liquidity pool. The pool charges a 0.3% swap fee and the network gas fee is 4 units at the time of the trade.
The swap fee is 2,000 x 0.3% = 6 units, so 1,994 units buy token B. Gas adds 4 units, so the total cost of the swap is 10 units, or 0.5% of the trade. The user then deposits token B into a pool with another user who deposits the same value, and the pool trades 100,000 units that week at 0.3%, which is 300 units of fees.
If the user's share of the pool is 10%, the user earns 30 units of fees that week. Over four weeks that is 120 units, which covers the 10 units paid to enter and leaves 110 units of profit, before any change in token prices. The arithmetic only holds if prices stay flat, which is why fee income alone never tells the whole story.
What are the common mistakes?
The most common mistakes with DeFi fees are ignoring gas, chasing the lowest swap fee, and forgetting that fees compound. A trade that costs 0.05% in swap fees but 20 units in gas is not cheap, and a pool that pays high fees may also lose value when token prices move against the deposit.
- Ignoring gas. Small trades on a busy chain can cost more in gas than the trade is worth.
- Chasing the lowest fee tier. A 0.05% pool with no volume earns nothing, while a 0.3% pool with steady volume pays regularly.
- Forgetting approvals. Approving a token costs gas too, and some wallets ask for approval on every trade.
- Counting fees as profit. Fee income is only profit once price changes and withdrawal costs are counted.
- Skipping the total. Always add swap fee, gas and any bridge fee before deciding a trade is worth it.
Fees are the running cost of using DeFi, and they are visible before you confirm. Reading them once, slowly, is cheaper than learning about them after the trade is done.
Key takeaways
- DeFi fees come in four kinds: swap, gas, liquidity provider and protocol fees
- Swap fees are a percentage of the trade, usually 0.05% to 1% depending on the pair
- Gas is paid separately and changes with network demand, so the same trade costs different amounts at different times
- Liquidity providers earn most swap fees, while treasuries and validators earn the rest
- Always add swap fee and gas together before deciding a trade is worth it
Frequently asked questions
What is the cheapest DeFi fee?
There is no single cheapest fee, because the total depends on the swap fee, the gas fee and the size of the trade. A low swap fee on a busy chain can cost more overall than a higher swap fee on a cheap chain, so compare the full total for your trade size.
Do I pay gas on every DeFi action?
Yes. Every action that writes to the blockchain costs gas, including swaps, deposits, withdrawals, token approvals and votes. Reading prices or checking a balance is free, because it does not change anything on the chain.
What is a protocol fee?
A protocol fee is a share of trading fees kept by the project itself instead of going to liquidity providers. It usually funds development, audits and operations, and token holders often vote on whether it is switched on.
Why are DeFi fees higher at busy times?
Gas prices rise when many people want space in the same block, because users bid against each other for processing. Fees fall again when demand drops, so waiting for a quieter hour can cut the cost of a trade.
Can fees make a small trade lose money?
Yes. If the swap fee plus gas is larger than the gain you expect from the trade, the trade loses money before it starts. This is why small trades work best on low-cost chains or during quiet hours.
Do liquidity providers always earn fees?
They earn a share of every trade in their pool, but the amount depends on trading volume and their share of the pool. Fee income can also be wiped out if token prices move against the deposit, so fees alone do not guarantee a profit.