Blog

How Uniswap works

Cover Image for How Uniswap works
Aswin Pyakurel

Here is a brief outline of how Uniswap works:

 

- Uniswap is a set of **smart contracts** that run on the **Ethereum blockchain**⁴. It allows users to swap any **Ethereum token** without intermediaries or custodians⁴.

- Uniswap uses an **automated market maker (AMM)** algorithm to set the prices of tokens based on their supply and demand¹². The algorithm is based on a **constant product formula**, which calculates the price of a token based on the proportion of the token's supply and the total liquidity of the pool¹².

- Uniswap relies on **liquidity pools** to provide liquidity for each token pair. Liquidity pools are collections of tokens that are locked in a smart contract by **liquidity providers** who earn fees for each trade.

- Uniswap is a **layer 1 solution**, which means it operates directly on the Ethereum blockchain. However, it also supports some **layer 2 solutions**, such as Optimism and Arbitrum, which allow faster and cheaper transactions off-chain.

- Uniswap uses an underlying protocol called **Uniswap V3**, which introduces features such as concentrated liquidity, multiple fee tiers, range orders, and non-fungible liquidity positions. These features aim to improve capital efficiency, flexibility, and user experience for traders and liquidity providers.

- Uniswap is secured by the Ethereum network's consensus mechanism, which prevents double-spending or censorship attacks. It also has a governance token called **UNI**, which allows holders to vote on proposals that affect the protocol's development and direction⁴.


More Stories

Cover Image for Is NFT useful?

Is NFT useful?

Aswin Pyakurel
Cover Image for Create solana dapp

Create solana dapp