UniswapV2 — Diving in the world of decentralized exchanges

Simon Busch
9 min readDec 25, 2023

--

What is Uniswap ?

Uniswap is like a digital marketplace where you can trade cryptocurrencies directly with others without needing a traditional intermediary like a bank. It’s a decentralized exchange (DEX) built on blockchain technology, meaning it runs on a network of computers instead of a central server.

Imagine you have tokens and want to swap them for another type. Uniswap enables this by using smart contracts, self-executing agreements that automatically handle transactions without a middleman. Users can trade various cryptocurrencies securely and quickly.

What makes Uniswap unique is its automated market maker ( AMM ) system. Instead of matching buyers and sellers like traditional exchanges, it uses liquidity pools. These pools consist of pairs of tokens contributed by users. The price of tokens adjusts based on the ratio of tokens in the pool, ensuring fair pricing without relying on order books.

Users can also earn fees by providing liquidity to these pools. This concept of decentralized trading and liquidity provision makes Uniswap a popular platform in the world of decentralized finance (DeFi), allowing users to trade cryptocurrencies in a decentralized, permissionless, and trustless manner.

Basic math

--

--

Simon Busch

Full Stack JS/TS @code4rena building the future of smart contract auditing. Solidity/blockchain security learner 🚀