The Defiant

What is Uniswap?

This Uniswap primer explains the basics for one of DeFi most used platforms.

By: Rahul Nambiampurath Loading...

What is Uniswap?

In 2021, the GameStop/AMC short squeeze episode demonstrated how traditional finance is full of obfuscation. Retail traders expected their trades to execute immediately. However, it turned out that an investor’s trade goes through several intermediaries, multiple congressional hearings and lawsuits later showed.

Brokers, clearinghouses, and market makers are intertwined with overlapping interests, best exemplified by Robinhood’s payment for order flows (PFOF) business, which sells its trading data to hedge funds on the side.

As an automated market maker (AMM), Uniswap does away with obfuscation and centralization. Embracing decentralized finance (DeFi) instead of centralized finance (CeFi), Uniswap has exploded in popularity. Its total value locked (TVL) has multiplied 137 times since February 2020, to $7.5B. (TVL shows how much cryptocurrency is committed to a protocol and is a key measure of its strength.)

Uniswap’s total value locked within smart contracts over two years. Source: DeFiLlama.com

Let’s take a closer look at Uniswap’s mechanics:

How Does Uniswap Work?

Mapping the Protocol: Source:Uniswap

If you wanted to exchange one fiat currency for another, such as USD/EUR, you would do so in the foreign exchange or FOREX market. However, any time FOREX traders make a bid (buy order), it has to be matched with the opposing ask (sell order). To ensure that such trades are matched expediently, market makers are in charge of covering ask and bid spreads.

DeFi AlphaPremium Content
Start for free

In other words, market makers (MMs) ensure market liquidity. Without it, trading of any kind grinds to a halt. For their services, MMs earn a tiny percentage of the action, so they count on massive volumes for profits. The same applies to the stock market as well.

IntoTheBlock Report: How DEXs Use Incentives and Tokenomics to Generate Revenue
IntoTheBlock Report: How DEXs Use Incentives and Tokenomics to Generate Revenue

IntoTheBlock Report: How DEXs Use Incentives and Tokenomics to Generate Revenue

In this exclusive report, IntoTheBlock explores the financial structure of decentralized exchanges and how they produce revenue.

The Defiant The Defiant

Citadel Securities, Credit Suisse Securities, and Goldman Sachs are some of the biggest market makers. Even the world’s largest bank, JPMorgan Chase, has its own market maker at the New York Stock Exchange, Virtu Financial.

Uniswap upends that entire model. Uniswap is an automated market maker (AMM), which means that it uses a decentralized liquidity protocol powered by smart contracts. Rather than covering ask/bid spreads itself, Uniswap gives traders the opportunity to do so.

It is they who receive the bulk of the cut whenever a trader makes currency (token) swaps. This AMM backbone is called liquidity mining, and investors themselves are the liquidity providers.

Uniswap’s Liquidity Mining Explained

The measure of stock/FOREX markets’ liquidity is how long it takes between a trader’s entry into the market and the trade’s execution/settlement. In traditional finance, market makers (MMs) make it happen. But how would decentralized finance bring liquidity into the market if there is no big market maker?

Previously, this was not possible without blockchain’s smart contracts. In the last two years, every activity that can be legally conceived, can be tokenized thanks to the development of Ethereum blockchain and its ERC-20 tokens that serve as smart contracts.

In practice, this means the following happens when using Uniswap to exchange tokens:

  • If you wanted to buy an NFT, you would have to exchange your stablecoins, such as USDT, for Ethereum’s native currency — ETH. As a decentralized exchange using its AMM protocol, Uniswap provides this with liquidity pools.
  • Therefore, Uniswap’s ETH/USDT token pair liquidity pool is readily available as stacked tokens within smart contracts.
  • When a trader taps into such a pool, they give a small cut to the liquidity providers, also called liquidity miners.
  • Anyone can become a liquidity provider by staking their tokens in the liquidity pools. This way, they generate passive income when other traders use their locked tokens to make swaps.

As you can see, Uniswap addressed the problem of decentralized liquidity, and the incentive structure as well. The elegance of decentralized finance is that everyone can become a market maker through blockchain smart contracts. Uniswap is just there to automate the process.

ETH/USDT liquidity pool has $172 million funds locked on both sides of the trade, resulting in $77.39k fees given out to liquidity providers, with a smaller cut to Uniswap team itself.

It is a simple matter of connecting a MetaMask wallet to one of Uniswap’s hundreds of token pair pools and adding liquidity. The above ETH/USDT pool is highly popular, as is usually the case with token pairs that hold stablecoins. After all, stablecoins serve as a bridge between fiat currencies and crypto assets.

Uniswap’s Brief History

The initial version of Uniswap: Hayden Adams

Of course, although Uniswap should be viewed more as a DeFi protocol than a company, it is made by people. Like everyone else, they need money to keep pushing the DeFi envelope.

Hayden Adams founded Uniswap in New York City in October 2017.

Adams studied mechanical engineering at the State University of New York at Stony Brook. After getting laid off from Siemens, he was seeking new opportunities and his college friend Karl Floersch, provided it: blockchain engineering work at ConsenSys, the trailblazing DeFi dev shop.

ConsenSys developed MetaMask, now the most popular non-custodial wallet with 21M users. Diving deep into Ethereum’s ecosystem of smart contracts, both Adams and Floersch focused on decentralized finance. It was at Devcon 3, an Ethereum confab in Cancun, Mexico, where they conducted a Uniswap demo.

Things snowballed from there, with Pascal Van Hecke, one of Devcon 3’s attendees, giving Adams a grant. During this time, another Stony Brook alum joined them, Uciel Vilchis. Fast forward to March 2018, and Uniswap rose to a fully-featured demo. However, this happened in the crypto market’s downturn, so Adams was starting to run low on cash.

Yet, Adams persisted and made contact through Floersch with none other than Vitalik Buterin, the co-founder of Ethereum. This happened during South Korea’s Deconomy 2018 conference. In the end, Adams received a $100,000 grant through the Ethereum Foundation, and that provided enough financial security to advance the Uniswap project.

Adams first named the protocol Unipeg (Unicorn + Pegasus). However, more practically-minded Buterin hinted that Uniswap would make more sense as in — Universal Swap of tokens.

How Does Uniswap Make Money?

Just like Ethereum has its native ETH, the Uniswap platform has its own native UNI. This is the governance and utility token of the network, through which the development team monetizes its cut from liquidity pool trades.

This is a relatively recent innovation, launched in September 2020, at 4B UNI, when the DeFi market was really heating up. Moreover, Uniswap traders can use UNI tokens to vote on the team’s proposals, such as the protocol’s fee structure. Of course, their voting power is proportional to the amount of tokens they hold.

The Uniswap team’s UNI token allocation is set to be almost equally divided between the community (60%) and developers/investors by 2024. Image credit: Uniswap.

As Uniswap became more popular due to its intuitive interface and cheaper trading, it gained $10 million TVL by April 2019. This milestone attracted Venture Capital (VC) firms such as Paradigm, Union Square Ventures, Andreessen Horowitz, SV Angel, Coinbase, ParaFi Capital, and many others. Altogether, they have invested $13.8 million in Uniswap since 2019.

What Does the Future Hold for Uniswap?

As they say, imitation is the greatest flattery. Uniswap has no shortage of copycats, such as SushiSwap or Uniswap DEX. After all, Uniswap’s open-source code is easy to copy and slightly tweak. However, after initial promises of higher liquidity yields, they deflated while Uniswap remained steadfast.

Unfortunately, Uniswap’s main obstacle came from Ethereum itself. The biggest smart contract platform with over $109B TVL is undergoing a transition itself, from proof-of-work to fully proof-of-stake consensus with the upcoming Beacon Chain merger. As a result, Ethereum gas fees have not been affordable, to say the least.

Token swapping fees on DeFi platforms would put West Union to shame. Source: crypto.com

Thankfully, there are a number of Layer 2 (L2) scalability solutions to the rescue. These are akin to highways that plug into Ethereum’s existing one to alleviate its congestion. Some of the most popular ones are Arbitrum, dYdX, Optimism, and Loopring. Each has Uniswap in their offering of DApps with drastically lower gas fees.

Top 5 L2 scalability solutions making Uniswap trading affordable. Source: l2beat.com

Moreover, Uniswap has gone through a major overhaul with its V3 upgrade. It gives liquidity providers an expanded set of tools to customize the allocation of their locked tokens. Furthermore, Uniswap V3 adds a multi-tier fee structure, depending on the risk they are willing to take.

Speaking of risk, Uniswap liquidity providers still have to consider impermanent loss (IL) in their staking game. IL happens when locked tokens gain a different price from the time they were staked, regardless of whether the price went up or down. If the disparity is greater in any direction, IL is costlier.

For this reason, liquidity miners should use a tool like APY.vision to gain an overview of IL across liquidity pools. With that said, if they have large trading volumes, a 0.3% fee on every token swap usually makes up for IL. Uniswap V3’s new features are all about customizable capital allocation to reduce that risk.

On a final note, when Ethereum upscales its core network, we are likely to see new investment winds into all DeFi apps, including Uniswap. While L2 networks do work, they pose a few extra steps more than is optimal for mainstream DeFi adoption.

Rahul Nambiampurath is a contributing writer to The Defiant.

Subscribe to DeFi Daily Newsletter and Get Smarter on DeFi & Web3.

80k+ investors informed every day.