Trading Costs of Decentralized Liquidity Pools and Centralized Limit Order Book Exchanges — Part 1: Exchange Fees

David Jeong
5 min readNov 20, 2021

--

Introduction to the Series

As crypto markets mature and traders get more sophisticated, the decentralization and usability of DeFi will eventually to fall to the side of the bottom line, trading costs. Trading algorithms will not use UniSwap for its simple UI or wallet integrations because the only feature that won’t be abstracted away will be trade quality. A trader has one goal, to get the best price for the order they are given. One of the many considerations to minimize trading costs is venue selection. In this series of blog posts, let’s consider how decentralized liquidity pools (DEX/LP) and centralized limit order book exchanges (CEX/LOB) compare across the main components of transaction costs.

  • Exchange/Gas Fees
  • Spread Cost
  • Implicit (Liquidity/Opportunity) Cost

Exchange Fees in Traditional Finance

Exchange fees are often the cheapest cost for trading in traditional finance. There are some obvious considerations to minimizing exchange fees (choose exchanges with lower fees and post more), but it doesn’t take long before a trade gets big enough that the liquidity and execution driven trading costs outweigh exchange fees. Nevertheless, it is important to look at the difference in exchange fees of CEXs and gas fees of DEXs in the current environment when gas fees can potentially be prohibitive.

Crypto Exchange Fees

A centralized LOB exchange (CEX) will charge a fee to access the exchange via fees that are paid upon the completion of the trade. These fees are usually calculated based on dollars (or sometimes shares) traded. It is very normal for a CEX to offer a flexible fee structure that encourages higher client volumes and higher on book liquidity via discounts for clients with high volumes and discounts/rebates for posting liquidity (maker). For example, today’s Coinbase Pro fee structure is posted as:

Source: Coinbase Pro (2021.11.20)
Source: Coinbase Pro

Network Gas Fees

The equivalent of a exchange fee for a DEX would be gas fees to access the network. Unlike the CEX exchange fees, there is no fee structure and gas fees are unrelated to the size of the execution and capacity (as all DEX trades are taker). The only factor of gas fee costs that could be correlated with trade parameters is that gas fees of trades during volatility could spike by a few multiples.

For a trading algorithm, the comparison for exchange/gas fees for a trade can be broken down by looking at the individual executions of the order. Note: a trading algorithm will almost always slice a bigger order into smaller “child” orders, I will touch more on this in the implicit cost section.

Optimizing for Minimum Exchange/Gas Fees

For CEX, where fee is the fee structure table, capacity is take/make status of the execution:

For DEX, where gas is the gas price elected by the trader at any given time:

As a result, for a trading algorithm to decide which exchange to choose to minimize exchange/gas fees, the main considerations will be

  • How many slices do I expect to have? The more slices I plan, the more times I will need to pay gas fees on a DEX. This applies to accessing multiple liquidity pools, using bridge currencies, and trading across time. Since a CEX fees are assessed on the notional traded, it does not scale with the number of slices.
  • What are the DEX network gas fees? Some networks are much more expensive than others. UniSwap, which runs on ETH, can cost upwards of $100 in gas fees, but Radium on Solana will cost less than $0.01. Other alternatives like SushiSwap on the Binance Smart Chain are also much cheaper at ~$0.10. UniSwap is also releasing a Layer 2 DEX on Optimism, which would reduce the fees drastically.
  • How often do I expect to cross the spread and take liquidity on CEX? This could be somewhat related to the trading engine’s urgency (more urgent orders will take more than passive ones who can afford to wait). However, it is hard to predict this and this will be up to the execution strategy (endogenous) and the market conditions (exogenous).
  • What is the notional value of the order? As orders get bigger, exchange fees will scale upwards, whereas gas fees will stay the same. However, it could be argued that as orders get bigger, the need for more child orders will be required (we will revisit this in implicit cost section).
  • How much volume do I trade per year? With bigger investors, exchange fees will get smaller, but gas fees will not.
Source: https://consensys.net/reports/web3-report-q3-2021/

Although the worst case, Ethereum is unfortunately one of the most common cases and on UniSwap, gas fees can run over $100 per swap. This means for a trader who trades roughly $200M on Coinbase Pro, paying on average 6bps (average of maker/taker 10/2bps) of exchange fees, a comparable execution will need to be at least $70 100 on a DEX for the gas fee to be equivalent to exchange fees. This kind of volume could be normal for an equity exchange, a round lot of AMZN is ~$300 000, but most liquidity pools in crypto assets are not as deep (Chainlink, the 20th in terms of market cap is at $12B whereas the 20th largest company, Walmart has a market cap of $400B) and as we will see in the latter sections, it won’t be optimal to trade in such big slices.

The Future of Exchange/Gas Fees

New chains are starting to offer much lower gas fees, notably, a Solana DEX swap can be done with gas fees of less than 1 cent. As mentioned above, there are Layer 2 DEX solutions and Ethereum itself is also moving towards a PoS framework that will further reduce gas fees. This trend opens the doors to exchange fees being worse than gas fees, but it is important to note that crypto exchange fees are also in its infancy and are very high. As more exchanges start crowding the market, exchange fees will naturally go down. On stock exchanges, it is normal for maker fees to be rebates instead, offering market makers an incentive to post quotes. Both types of exchanges are on a trend to reduce the exchange fee, so in the long run, it may be a moot point. However, until these future trends realize, I would argue that gas fees on DEXs are much more prohibitive than exchange fees.

--

--