Dive into Decentralized Exchanges (DEXes) and Swaps

Module 2.4: Dive into Decentralized Exchanges (DEXes) and Swaps

Aqua Protocol (Stablecoin on TON)


This article highlights the functionality and evolution of decentralized exchanges (DEXs), focusing on Uniswap as an example. It explores token trading opportunities, liquidity management, and innovations introduced in each subsequent version of Uniswap. Other DEXs and their contributions to the DeFi space are also mentioned.

On decentralized exchanges, transactions between users are conducted directly through smart contracts, allowing full control over one’s assets without relying on centralized intermediaries.

Regarding the services on these exchanges, there are many options! The main feature is, of course, token trading. Users can buy, sell, or exchange a wide range of cryptocurrencies and tokens directly from their wallets. This direct exchange between participants is one of the key features of decentralized exchanges, giving users more control and freedom in their cryptocurrency operations.

On decentralized exchanges, users have full control over their crypto portfolios. They can easily track their balances, view order and transaction history, and monitor the performance of their assets. Those who wish to contribute can provide liquidity to pools on decentralized exchanges and receive rewards for it. Liquidity pools are the cornerstone of the DeFi world and decentralized exchanges. Through them, users can perform various operations with digital assets: trade, exchange, borrow, or lend. Typically, pool participants invest token pairs, creating opportunities for traders to make exchanges. In return, they receive a portion of the transaction fees.

Some decentralized exchanges (DEXs) support cross-chain swaps, allowing users to switch freely between different blockchain networks without being tied to centralized services. Additionally, these platforms offer a way to level up with yield farming. Users can invest their tokens in pools and receive additional tokens or other pleasant bonuses in return. Though this comes with some risks, it’s a fairly good path to passive income, don’t you think?

Another interesting point is that some decentralized exchanges allow you to add your tokens to the platform. This is especially useful for projects seeking more visibility and liquidity. There are also “governance tokens” that enable token holders to participate in voting on protocol updates, fees, and other important matters.

Decentralized exchanges are the true gateways to the world of DeFi, where a variety of services are available, including lending, borrowing, and even decentralized stablecoins, all accessible directly from the exchange platform. And these exchanges continue to evolve daily, with Uniswap being a prime example of this.

Remember the first version of Uniswap launched in 2018? It was a real innovation in the world of cryptocurrencies. It introduced a new model — Automated Market Maker (AMM). Users could create liquidity pools for trading various tokens and receive a portion of the fees for it. However, there were some difficulties. For example, swapping two ERC20 tokens required two steps, which wasn’t always convenient. Plus, the first version of Uniswap sometimes faced issues like high slippage during large transactions. But as time goes on, everything improves, and we see how Uniswap evolves further.

Uniswap version 2, which appeared in 2020, made important changes. It modernized the AMM model to support direct token exchanges, significantly reducing slippage and increasing capital efficiency. Additionally, Uniswap version 2 introduced Flash Swaps, allowing users to borrow from the liquidity pool without upfront costs. All that was required was to return the borrowed amount in the same transaction, including a fee. This greatly expanded trading possibilities on the platform.

Uniswap version 3, released in 2021, focused on improving capital efficiency and liquidity distribution. Now, liquidity providers can choose specific price ranges for their assets, increasing their yield due to more efficient capital use. This version also introduced various commission tiers to meet different risk levels and trading volumes. Importantly, Uniswap V3 integrated with Ethereum’s second-layer solution, Optimism, to reduce transaction fees and increase platform scalability.

In 2023, the draft code for Uniswap version 4 was released, offering potential improvements. One of the key changes was the introduction of a hook, allowing for the customization of liquidity pools. This opens doors for developers to add various features, including integrating different oracles and investing unused liquidity in lending protocols to earn commissions. Another significant change is storing all liquidity pools in one contract, saving on gas fees and reducing the cost of creating a pool by 99%.

Each new version of Uniswap brings various improvements, highlighting the continuous perfection of decentralized exchanges. Moreover, many other decentralized exchanges are also actively exploring new features. For example, Balancer is an automated market maker offering users greater flexibility in providing liquidity.

It seems that the TON blockchain has its own exchanges, such as Megaton, StonFi, and Dedust, based on the Uniswap V2 model. This is an interesting development, and we hope that current technologies reflecting modern trends and user needs will appear in the TON blockchain over time. The evolution of blockchain technology continues, and new possibilities always inspire innovations and improvements.

This course was prepared by Julia Palamarchuk (co-founder of Aqua Protocol — the first CDP stablecoin on the TON blockchain, over-collateralized by liquid staking tokens).

Follow us on Twitter: @aquaprotocolxyz

Telegram channel: https://t.me/aquaprotocolxyzchannelen

Telegram community: https://t.me/aquaprotocolxyz

Website: https://aquaprotocol.xyz/



Aqua Protocol (Stablecoin on TON)

AquaUSD is the first TON-native decentralised over-collaterized interest-bearing stablecoin backed by liquid-staked assets