Overview of the UNISwap Protocol
The UNISwap Protocol is a peer-to-peer1 system designed for exchanging ERC-20 cryptocurrencies on the Ethereum blockchain. The protocol is implemented as a set of persistent, non-upgradable smart contracts; designed to prioritize censorship resistance, security, self-custody, and to function without any trusted intermediaries who may selectively restrict access.
There are currently three versions of the UNISwap Protocol. V1 and V2 are open source and licensed under GPL. V3 is open source with slight modifications. Each version of Uniswap, once deployed, will function in perpetuity, with 100% uptime, provided the continued existence of the Ethereum blockchain.
Protocol, Interface, Labs
We should make clear the distinctions between the different areas of "UNISwap", some of which may confuse new users.
- UNISwap Labs: The company which developed the UNISwap Protocol, along with the web UNISwap.
- The UNISwap Protocol: A suite of persistent, non-upgradable smart contracts that together create an automated market maker, a protocol that facilitates peer-to-peer market making and swapping of ERC-20 tokens on the Ethereum blockchain.
- The UNISwap Interface: A web interface that allows for easy interaction with the UNISwap Protocol. The interface is only one of many ways one may interact with the UNISwap Protocol.
- UNISwap Governance: A governance system for governing the UNISwap Protocol, enabled by the UNI token.
What is UNISwap Protocol?
The UNISwap Protocol is an open-source protocol for providing liquidity and trading ERC20 tokens on Ethereum. It eliminates trusted intermediaries and unnecessary forms of rent extraction, allowing for safe, accessible, and efficient exchange activity. The protocol is non-upgradable and designed to be censorship resistant.
The UNISwap Protocol and the UNISwap Interface were developed by UNISwap Labs.
How do I use the UNISwap Protocol?
To create a new liquidity pool, provide liquidity, swap tokens, or vote on governance proposals, head over to the UNISwap Interface and connect a Web3 wallet. Each transaction on Ethereum generates GAS fees denominated in GWEI or ETH.
How does UNISwap Protocol work?
UNISwap is an automated market maker. In practical terms, it is a collection of smart contracts that define a standard way to create liquidity pools, provide liquidity, and swap assets.
Each liquidity pool contains two assets. The pools keep track of aggregate liquidity reserves and the pre-defined pricing strategies set by liquidity providers. Reserves and prices are updated automatically every time someone trades. There is no central order book, no third-party custody, and no private order matching engine.
Because reserves are automatically rebalanced after each trade, a UNISwap pool can always be used to buy or sell a token — unlike traditional exchanges, traders do not need to match with individual counterparties to complete a trade.
How does the UNISwap Protocol compare to a typical market?
To understand how the UNISwap Protocol differs from a traditional exchange, it is helpful to first look at two subjects: how the Automated Market Maker design deviates from traditional central limit order book-based exchanges, and how permissionless systems depart from conventional permissioned systems.
Order Book VS AMM
Most publicly accessible markets use a central limit order book style of exchange, where buyers and sellers create orders organized by price level that are progressively filled as demand shifts. Anyone who has traded stocks through brokerage firms will be familiar with an order book system.
The UNISwap protocol takes a different approach, using an Automated Market Maker (AMM), sometimes referred to as a Constant Function Market Maker, in place of an order book.
At a very high level, an AMM replaces the buy and sell orders in an order book market with a liquidity pool of two assets, both valued relative to each other. As one asset is traded for the other, the relative prices of the two assets shift, and a new market rate for both is determined. In this dynamic, a buyer or seller trades directly with the pool, rather than with specific orders left by other parties. The advantages and disadvantages of Automated Market Makers versus their traditional order book counterparts are under active research by a growing number of parties. We have collected some notable examples on our research page.
The second departure from traditional markets is the permissionless design of the UNISwap Protocol. Permissionless design means that the protocol’s services are entirely open for public use, with no ability to selectively restrict who can or cannot use them. Anyone can swap, provide liquidity, or create new markets at will. This is a departure from traditional financial services, which typically restrict access based on geography, wealth status, and age.
Where can I find more information?
For research into the economics of AMMs, game theory, or optimization research, check out our research page.
For new features implemented in V3 that expand and refine the AMM design, see the V3 Concepts page.