Uniswap

From DefiLlama
Revision as of 04:14, 24 April 2022 by Moleman (talk | contribs) (formatting and simplifying)
Jump to navigation Jump to search

The Uniswap protocol is a permissionless peer-to-peer system designed for exchanging cryptocurrencies. The protocol was founded by Hayden Adams in 2018.

Design and Usage

Uniswap uses an Automated Market Maker (AMM) model. 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 price of the two assets shifts, and a new market rate (price) for both is determined. [1]

Liquidity Providers

A liquidity provider (LP) is someone who deposits a pair of tokens to a smart contract. In return, they're compensated with a percentage of the trading fees for the given pair. [2]

Swaps

Swaps are the most common use. For users, swapping is straightforward: a user selects an ERC-20 token that they own and a token they would like to trade it for. Executing a swap sells the currently owned tokens for the proportional amount of the tokens desired, minus the swap fee, which is awarded to liquidity providers. [3]

Slippage

When transactions are submitted to Ethereum, their order of execution is established by the amount of "gas" offered as a fee for executing each transaction. The higher the fee offered, the faster the transaction is executed. The transactions with a lower gas fee will remain pending for an indeterminate amount of time. During this time, the price environment in which the transaction will eventually be executed will change, as other swaps will be taking place. [4]

Sources