CEX vs DEX: Coexistence or Challenge for Survival?
The recent bear market in the world of cryptocurrencies has been fatal for a number of centralised financial exchanges and services. FTX and Celsius in the first place have raised a huge fuss and perplexity over the proper administration of these new financial giants, raising the profile of the decentralised
The recent bear market in the world of cryptocurrencies has been fatal for a number of centralised financial exchanges and services. FTX and Celsius in the first place have raised a huge fuss and perplexity over the proper administration of these new financial giants, raising the profile of the decentralised finance sector. In this article of Spaziocrypto's Web3 Guide, we aim to make a comparison between CEX vs DEX, in order to help the reader evaluate the best option according to their needs.
Main Differences Between CEX and DEX
In outlining the fundamental differences between centralised (CEX) and decentralised (DEX) exchanges, features emerge that profoundly affect the dynamics of cryptocurrency-related digital finance. This in-depth study will reveal how these differences can affect the security, accessibility and management of funds, providing a clear overview of the choices investors and users must consider. Let's now explore the distinguishing characteristics that delineate the comparison between centralised and decentralised exchanges, outlining how these differences can shape the fate of both.
How Does a Centralised Exchange Work?
Everyone who has ever considered purchasing Bitcoin has interfaced with a centralised exchange (CEX), i.e. a marketplace that allows for the exchange of cryptocurrencies. These platforms tend to be user-friendly and intuitive even for the less experienced. They offer a lot of liquidity and have a dedicated customer service that protects users in case of problems or questions.
On the other hand, there is a crucial aspect to consider: to provide such services and security, centralised exchanges exercise total power and control over financial resources. This concerns both the platform's own funds, but also those of users. In fact, when users deposit their assets in the exchange, these come under the control of the exchange itself. This means that, although they are technically owned by the user, control and management of the cryptocurrencies are handed over to the exchange. The famous expression 'not your keys, not your coins' has its origin in this concept.
Centralisation vs Decentralisation Crypto
Decentralised finance (DeFi) represents a viable alternative, allowing the user to perform operations similar to those performed on a CEX, but retaining 100% custody of their assets thanks to blockchain technology.
After opening your crypto wallet on a chain, through a decentralised exchange (DEX) you will be able to exchange your assets without the intervention of intermediaries, but sacrificing ease of use. However, the absence of intermediaries also implies a lack of protection for the user, who must operate with caution to avoid common mistakes related to slippage, in the case of exchanges, or impermanent loss, in the case of liquidity providers.
Because it is decentralised, anyone can use the platform from either side. In fact, any user can use the service without registration or KYC (Know Your Customer) procedures in order to trade assets, or provide the liquidity to make trades possible, receiving in return the fees paid by traders.
How does a Decentralised Exchange (DEX) work?
Unlike CEXs, DEXs do not usually use order books to facilitate trading. Instead, they mainly use the Automated Market Maker (AMM).
A common approach is the 'constant product' mechanism (x * y = k), which determines asset prices as a function of the ratio of the total DEX reserves of each of the assets involved. This has the advantage of tending to keep reserves in relative equilibrium: a scarce asset would be very expensive.
However, DEXs still tend to offer similar prices to CEXs. This is because careful traders or bots can quickly profit from any discrepancy in prices through arbitrage. If a given pool contained few ETH, this would be priced higher than the market price. This would allow traders to buy ETH elsewhere and sell it back into the pool at a higher price. Gradually the volume in the pool would increase, reducing the price until it matched the market price.
Uniswap, the first DEX on Ethereum, introduced this mechanism. However, to date, the evolution of DEX has allowed for order book-based mechanisms, which can allow for the opening of leveraged positions, on synthetic assets, perpetuals or options. GMX represents the most popular decentralised derivatives exchange to date, offering instruments that are quite rare for traditional finance. DeFi allows one to break free from legal constraints and offer instruments that would require lengthy bureaucratic procedures, with more flexibility. GMX, for instance, offers trading on perpetuals to anyone with a cryptocurrency wallet. These contracts do not have an expiry date, unlike the more popular futures, which further facilitates leveraged margin trading.
Risks of DeFi
Decentralised Finance (DeFi) opens the door to an unprecedented landscape of financial opportunities, but like any innovation, there are many associated risks. Understanding the potential obstacles and vulnerabilities that may arise is crucial to operating consciously. This chapter focuses on analysing the risks associated with DeFi, in particular decentralised exchanges, to ensure a more informed view of the elements to consider when navigating the sea of decentralised finance.
Automated Market Maker (AMM) and Impermanent Loss
The AMM system is functional, but introduces a risk to liquidity providers. The risk, mentioned above, is called "impermanent loss". Liquidity providers retain the right to withdraw assets from the pool to which they have contributed at any time, but the exact number of tokens may vary. The system cannot guarantee all providers their exact tokens, because the ratio of different tokens held in the pool changes with trading. As the ratio adjusts to reflect current prices in the broader market, the pool will progressively contain a greater amount of the token that is losing value, and vice versa.
This means that a liquidity provider will tend to take out a greater amount of the token that has lost value and a smaller amount of the token that has gained value, relative to their initial assets. Therefore, they will end up booking a lower profit than if they had simply kept their assets in the wallet. To compensate for the risk, the liquidity provider is rewarded through the exchange fees paid by the users.
Naturally, as a result of other price movements, the ETHs in the pool may rise again, as the "impermanent" loss is not realised until I withdraw my liquidity from the pool.
Very common is the practice of incentivising liquidity provision by offering additional tokens in certain pools as a reward. This gave rise to the phenomenon of "liquidity mining" and the explosion of the, now long gone, DeFi summer of 2020.
Slippage Crypto: How Does It Work?
The user who simply wishes to trade assets, must pay attention to the liquidity of both the DEX and the specific pool to avoid the risk of slippage during transactions.
The slippage occurs when an order is executed at a different price than expected. It is precisely the difference between the expected price and the final price. Slippage also occurs in traditional markets, but its effects are more pronounced in DeFi and DEX.
The causes of slippage are basically twofold: high volume trades on illiquid pairs and the normal day-to-day trading done by various users. When a large (or even a moderate sized) order is placed on an illiquid pool to manage the size of the order, slippage occurs.
Because the AMM system calculates the price of tokens based on the ratio of assets in the pools, a large order on a pool with little liquidity could drastically impact the execution price. This is because the order placed by the user takes enough tokens from one asset and adds enough from the other to significantly alter the ratio between the two and, consequently, the price.
Slippage is a common problem in uncommon token pools.
It can also occur in highly liquid pools between popular asset pairs such as BTC/ETH. This occurs because transactions on DEX are not instantaneous - the blockchain has to confirm the exchange - and therefore the price of the asset, or the ratio of assets in the pool, can change in the time it takes for the blockchain to confirm the transaction. This can make DeFi trading difficult, as traders are not 100 per cent certain of the price they will pay for an asset until the exchange is executed.
There are several ways to minimise slippage, but due to the nature of the phenomenon, it is impossible to eliminate it entirely. For most DEX, it is possible to set a slippage tolerance percentage, allowing the user to determine how much % slippage they are willing to tolerate in order to perform the exchange.
With regard to slippage due to changes in asset prices in the market due to daily trading, trading on Layer 2 and fast blockchains such as Solana, or increasing the fee gas (so that the transaction is processed first) are some of the main ways to avoid this. A highly liquid pool tends to maintain price stability even with large-volume orders.
Another way to avoid slippage through large-volume orders is to split purchases into several trades, in order to allow traders and arbitrageurs to rebalance the pool, before placing a further trade.
The evolution of DeFi has led to the emergence of aggregation protocols (aggregators) such as 1inch precisely to help high volume traders avoid liquidity problems when using DEX.
High volume trading on a CEX will certainly be easier, due to the huge liquidity provided by market makers with whom the CEX partners and the order book system capable of processing a very high number of transactions per second. The order book is nothing more than a list of buy and sell orders where the highest buy and the lowest sell are executed first, it is the same system used by traditional banks.
DYOR (Do Your Own Research)
Because decentralised exchanges allow anyone to add liquidity and add new pools, it is essential to do your own research to ensure the authenticity of the asset before buying it. Or, inexperienced developers may have created an either smart contract with exploitable bugs, or malicious for the purpose of emptying the wallet of those who interact with it. In any case, research on each project is crucial as in the jungle of centralised finance, there is no protection and everyone is responsible for their own actions. Do your own research.
Conclusions: A Challenge Without Winners
In spite of episodes of less-than-optimal management, there are examples of carefully administered centralised exchanges. Moreover, at present, decentralised finance is still in its infancy on Bitcoin's blockchain, a simple exchange being an extremely complex operation even for the most experienced in the field. For most users, choosing to use a centralised exchange is certainly the simplest and most convenient choice. CEXs will undoubtedly continue to play a key role in introducing and engaging new users to the cryptocurrency landscape, while also offering greater guarantees of security and stability as regulation of the sector progresses.
Decentralised Finance (DeFi) on the other hand continues its evolutionary path, offering significant improvements in terms of ease of use. This suggests that coexistence, rather than conflict for survival, is the most likely prospect, as both models adapt and enrich each other in a constantly changing digital financial ecosystem.
When it comes to deciding which type of service to use, it all comes down to two things: if you are primarily interested in ease of use and are not comfortable with total control of your portfolio, a CEX is probably the best option for you. If, on the other hand, lower costs and more control over your funds are more important, then a DEX is the right choice. In any case, we at SpazioCrypto strongly recommend that you learn the procedures for withdrawing your cryptocurrencies from a centralised exchange and how to store them in a safer wallet that you can control, in order to keep your assets safe in the long run.
Read Next
Marketing in the Times of Web3
Airdrop is a token distribution technique, but in a broader marketing sense, dating back to 2014, but widely used as of 2018.
Why use VPN to mine cryptocurrencies
In Italy, but actually often also abroad, people go mining using VPN networks. Why, however, is this so important? There are several reasons: let us explore them together.
DePIN: Decentralised Physical Infrastructure Networks
Based on blockchain principles, DePIN projects offer a number of advantages over traditional centralised infrastructures.
Crypto Indices: How They Work And Their Potentiality
Crypto indices are emerging as key tools for understanding and maximising the potential of the overall cryptocurrency market trend.