# Why transaction fees depend on DEX?

Since today ETH transaction fees become so high, I (and possibly many people) want to save money by reducing these fees.

I notice that transaction fees are cheeper in some DEXs compared to those of the others, even if you want to swap exactly same amount of token. (For example, Uniswap's transaction fee is much cheeper than that of 1 inch.) Why such kind of things happen? And what determines the transaction fee? If I can know the background, I believe it would be helpful for finding best DEXs saving our token.

Transaction fee is composed calculated as follows: gas amount * gas price = fee.

The gas price is something you decide when you send the transaction - basically it says how much you are willing to pay to get your transaction processed. The fees are very high currently because many people are willing to pay a big gas price to get their transaction processed (fast). So basically the more you pay the faster you get your transaction processed.

The other factor, gas amount depends on the complexity of the transaction. Each operation the transaction has to perform costs gas. So the more complicated the processing logic is in the DEX the more gas it will cost.

So you have some control over both of these input values:

1. use the right gas price to get your transaction processed reasonably fast, but don't use too big a value either. You can use for example https://ethgasstation.info/ to estimate what gas price to use.

2. Find a DEX which has a low complexity, and therefore gas usage. If one DEX has a gas usage of x and another of 2x, the other costs twice as much to use.

• So can we say that the transaction cost is cheap in Uniswap because it adopt very simple formula x * y = const. with trading? Sep 12, 2020 at 1:44
• Well, yes, it's cheap because there is not much processing (simple functionality) and therefore small gas usage Sep 12, 2020 at 4:02