With the revelation that most brokerage apps are beholden to hedge fund market makers, it is more important than ever to explore alternatives. By leveraging the power of decentralization, Uniswap is among the better ones.
Uniswap as a Pioneering DeFi Protocol
Since the eruption of Decentralized Finance (DeFi) last summer, from $1 billion to surpassing $30 billion in total locked value in January, Uniswap has become somewhat synonymous with DeFi. This is no coincidence. Uniswap pioneered the practical solution for the problem of liquidity. In turn, this spiked the growth of the entire DeFi ecosystem. Currently, Uniswap holds the 4th position on DeFi Pulse’s ranking, accounting for $3.5 billion of locked assets.
Like almost all DeFi platforms, Uniswap operates on the Ethereum blockchain, allowing traders to swap any ERC20 token, encompassing a large number of altcoins and stablecoins. With May’s upgrade to Uniswap V2, people were able to directly swap ERC20 tokens, in addition to security and other technical improvements.
In the previous article on Automated Market Makers, you found out that Uniswap has a prominent position within the DeFi ecosystem because it removes the need for sellers and buyers to create a demand.
In a traditional market not taking advantage of a decentralized blockchain, market makers serve as liquidity providers in the form of large institutions — hedge funds and exchanges such as NYSE and NASDAQ.
In the DeFi space, there is no such centralized, human oversight that oils the cogs of liquidity, bringing potential corruption with it, as we’ve seen with the Robinhood-Citadel scandal. Like with everything blockchain-related, DeFi liquidity is accomplished through the implementation of mathematical equations — liquidity pools. By employing these equations, liquidity pools set balances and token prices depending on the demand for tokens in each pool.
Such automated market makers (AMMs) eliminate arbitrary fees, mismanagement, and the risk of hacking, as is often the case with centralized exchanges.
Uniswap’s Inner Workings
Developed by Hayden Adams, a former Siemens engineer, it directly drew inspiration from the programmable nature of Ethereum. Adams launched the Uniswap protocol in November 2018, as an automated community tool to exchange tokens without costly fees and intervention from the middlemen.
Uniswap’s automated pricing mechanism via liquidity pools is called the Constant Product Market Maker Model. This simply means that traders can swap any ERC20 token by adding another ERC20 token equivalent in value.
For example, if you needed to exchange, Uniswap (UNI), for Ethereum ETH, you would first create a liquidity pool with paired tokens, such as UNI. Each side of the pair would be equivalent in value — $100 worth in UNI and $100 worth in ETH. The easiest way to do this would be with the MetaMask wallet, as explained in the Yield Farming article.
In mathematical terms, this means that the XRM-ETH pair follows the equation X*Y = k.
- X → UNI
- Y → ETH
- k → constant value
This equation represents the balance between UNI and ETH. If a trader taps into that liquidity pool and buys ETH, the supply of ETH decreases, thus increasing its value. Likewise, if a trader taps into the pool to buy UNI, its supply decreases, thus increasing its value.
In whichever scenario, Uniswap balances out the token values, based on the economic law of supply and demand, as token pairs remain in a 1:1 value ratio. Moreover, if a new ERC20 token is created, it can be listed on Uniswap without permission. It only needs a new smart contract and the accompanying liquidity pools.
Whenever someone adds funds into these swap pools, they become liquidity providers, earning a flat trading fee of 0.3%. This means that the more the pool is filled with your tokens, the greater is your stake for that flat percentage, which is called yield farming. If you have MetaMask already installed, simply go here to access the Uniswap exchange and connect it to MetaMask wallet.
As you may have noticed, each DeFi protocol has its own token. In the case of Uniswap, this is UNI, which serves as a governance token. This means that holders of UNI tokens can vote on the changes on the Uniswap protocol/network. After you have deposited your liquidity provider tokens, you can claim the UNI tokens within the same interface as you see above if you click on the UNI tab, which is next to Pool.
Following the upgrade to V2, Uniswap increased its DeFi market share by about 600% in a month. Since then, we have seen a consolidation of many innovative DeFi platforms, with yearn.finance leading the way in forming partnerships. With yield farming gains surging into the mainstream, much like Bitcoin had, Maker, Aave, and Compound have overtaken Uniswap’s popularity, as they each bring something new to the table.
With the MetaMask wallet in hand, you can easily switch between them, making arbitrary barriers a thing of the past. Uniswap developers are hard at work improving the platform and adding new features. If you want to participate in this long-reaching endeavor, you can visit their official Twitter account to provide feedback and suggestions.
Lastly, when engaging in DeFi protocols, it is always a good idea to use tokens with proven security features which lessens the chance of a hack. Likewise, safeguard your private key, recovery phrase and your MetaMask password. Maximally fortified security in the form of Ledger Nano S is always a good call to make. You can learn how to connect your Trezor or Ledger Hardware Wallet to MetaMask here.