Last week we discussed interoperability which is about performing actions between various crypto ecosystems. Uniswap tackles a much more scoped problem which is swapping tokens within the Ethereum ecosystem.
Uniswap V1 (2018)
Key problem: exchanging one token for another is usually done via an order book (you have to trust that centralized exchanges like Coinbase keeps a list of people who want to buy and sell at various prices and that they match those trades fairly). Uniswap is a decentralized exchange implementing an automated market maker (AMM) protocol that does away with a centralized order book, relying only on a mathematical formula to determine the price of assets.
Key design:
Smart contracts with liquidity pools of an ERC20 token and ETH. You can imagine many pools with 2 types of tokens inside each pool (1 is an ERC 20 token like Chainlink’s LINK or Maker’s DAI, the other is ETH), those who add tokens to the pool are called liquidity providers (LPs)
Why would anyone be a liquidity provider? Because every trade has a 0.3% fee which is pooled and distributed back to LP’s proportion to how much liquidity they’ve provided
The mathematical formula determining price is X * Y = K. Many people have explained why this formula works, here’s Vitalik’s explanation, I’ll explain it below briefly below
Uniswap V2 (2020)
Key problem: In V1, to swap from one ERC20 token to the other, you’re actually swapping from Token A to ETH, then ETH to Token B. Why is this bad? Swappers pay fees twice, LP’s have to have exposure to ETH.
Key design:
You can now swap one ERC20 token for another without ETH in the middle. This is done via smart contracts with pools of arbitrary ERC20 token/ ERC20 token pairs (this is the main innovation of V2)
Other design changes which you can read about on your own include improving their price oracle (to have less manipulation), implementing flash swaps (a byproduct was making the 0.3% fee more flexible) , improving security (essentially, modularizing two functionalities so if one gets attacked at least it doesn’t affect the other)
Uniswap V3 (2021)
Key problem: In V1 and V2, liquidity is spread along the entire price curve (graph below) from 0 to infinity, this isn’t particularly capital-efficient since most trades actually happen within a smaller range of that curve. With the V1 and V2 design, as a trader, you have less depth of liquidity at the prices you want to trade at, as an LP you have capital that isn’t being used because it sits outside the range that anybody actually wants to trade at.
Key design:
Other design changes you can read about on your own include improving the price oracle again, making fees much more flexible (with initial fee tiers at 0.05%, 0.3% and 1%), and liquidity oracles.
DICTIONARY:
ERC20 is a token standard used by Ethereum, many projects have been built using it such as Chainlink (LINK), Maker (DAI), Tether (USDT), Shiba Inu (SHIB)
tldr math explanation:
X * Y = K, remember X is quantity of token A, Y is quantity of token B, K is the constant X * Y. Essentially, if you graph the constant K, it looks like the graph below. Let’s say token A in the graph is LINK and token B is ETH and we’re starting at the red dot on the left. If somebody swaps LINK for ETH, the relative balance of ETH to LINK in the pool decreases, we move from the left red dot to the right red dot. At the right red dot, you need to exchange more LINK to get the same amount of ETH as the left red dot. In other words - this formula models supply and demand to determine price.
Neither GC nor any of its advisory clients, including all GC-managed investment vehicles, holds any form of ownership or financial interest in the cryptocurrency or digital asset described in this post. GC has not performed any due diligence, research, analysis, or evaluation of the potential merits, if any, of this cryptocurrency or digital asset project and GC cannot verify any claims made by any promoter or supporter of the cryptocurrency or digital asset described. Nothing in this post should be seen as, nor is it intended to be, a recommendation or suggestion to invest in, purchase, sell, hold, trade, or participate in this or any cryptocurrency or digital asset project. GC in no way endorses or encourages anyone to circumvent or violate any applicable laws, rules, and regulations, including any applicable Anti-Money Laundering/Know-Your-Customer (AML/KYC) and related banking and financial regulations. (See Disclaimer below for further details.)
Disclaimer
Views expressed in “posts” (including podcasts, videos, newsletters, and social media) are those of the individual GC personnel quoted therein and are not the views of General Catalyst Group Management, LLC, “GC”) or its respective affiliates. GC is an investment adviser registered with the Securities and Exchange Commission. Registration as an investment adviser does not imply any special skill or training. The posts are not directed to any investors or potential investors, and do not constitute an offer to sell — or a solicitation of an offer to buy — any securities, cryptocurrencies, or any financial instrument or property, and may not be used or relied upon in evaluating the merits of any investment.
The contents in here — and available on any associated distribution platforms and any public GC online social media accounts, platforms, and sites (collectively, “content distribution outlets”) — should not be construed as or relied upon in any manner as investment, legal, tax, or other advice. You should consult your own advisers as to legal, business, tax, and other related matters concerning any investment. Any projections, estimates, forecasts, targets, prospects, or opinions expressed in these materials are subject to change without notice and may differ or be contrary to opinions expressed by others. Any charts or figures provided here or on GC content distribution outlets are for informational purposes only, and should not be relied upon when making any investment decision. Certain information contained in the content has been obtained from third-party sources. While taken from sources believed to be reliable, GC has not independently verified such information and makes no representations about the enduring accuracy of the information or its appropriateness for a given situation. In addition, posts may include third-party advertisements or links to websites not associated with GC in any way; GC has not reviewed such advertisements or websites and does not endorse any content contained therein. All content speaks only as of the date indicated and is subject to change at any time.
Under no circumstances should any posts or other information provided on this website — or on associated content distribution outlets — be construed as an offer soliciting the purchase or sale of any security or interest in any pooled investment vehicle sponsored, discussed, or mentioned by GC personnel. Nor should it be construed as an offer to provide investment advisory services; an offer to invest in an GC-managed pooled investment vehicle will be made separately and only by means of the confidential offering documents of the specific pooled investment vehicles — which should be read in their entirety, and only to those who, among other requirements, meet certain qualifications under federal securities laws. Such investors, defined as accredited investors and qualified purchasers, are generally deemed capable of evaluating the merits and risks of prospective investments and financial matters.
There can be no assurances that GC-managed investment vehicle’s objectives will be achieved or investment strategies will be successful. Any investment in a vehicle managed by GC involves a high degree of risk including the risk that the entire amount invested is lost. Any investments or portfolio companies mentioned, referred to, or described are not representative of all investments in vehicles managed by GC and there can be no assurance that the investments will be profitable or that other investments made in the future will have similar characteristics or results. A list of investments made by funds managed by GC is available here: https://www.generalcatalyst.com/portfolio/. Past results of GC’s investments, pooled investment vehicles, or investment strategies are not necessarily indicative of future results. Excluded from this list are investments (and certain cryptocurrencies or digital assets) for which the issuer has not provided permission for GC to disclose publicly. GC has no special role in any of cryptocurrency or related projects or power over their management. To the extent any GC-managed investment vehicle has any form of ownership or financial interest in a cryptocurrency, digital asset, or related project, GC does not undertake to continue to have any involvement in these projects other than as an investor and token holder, or holder of a form of economic or ownership interest, or right to a future ownership interest, and other token holders should not expect that it will or rely on it to have any particular involvement.
For other GC site terms of use, please go to https://www.generalcatalyst.com/terms-of-use/. Additional important information about GC, including our Form ADV Part 2A Brochure, is available at the SEC’s website:
http://www.adviserinfo.sec.gov