Peripheral Smart Contracts For Interacting With Uniswap

About Uniswap

Uniswap is a popular decentralized trading protocol, known for its role in facilitating automated trading of decentralized finance (DeFi) tokens.

An example of an automated market maker (AMM), Uniswap launched in November 2018, but has gained considerable popularity this year thanks to the DeFi phenomenon and associated surge in token trading.

Uniswap aims to keep token trading automated and completely open to anyone who holds tokens, while improving the efficiency of trading versus that on traditional exchanges.

Uniswap creates more efficiency by solving liquidity issues with automated solutions, avoiding the problems which plagued the first decentralized exchanges.

In September 2020, Uniswap went a step further by creating and awarding its own governance token, UNI, to past users of the protocol. This added both profitability potential and the ability for users to shape its future — an attractive aspect of decentralized entities.

The Uniswap platform can support the exchange of any digital token that adheres to the Ethereum technical standard known as ERC-20. Uniswap uses smart contracts, which are enabled by blockchain technology, to function as an automated market maker.3 Uniswap users can securely create liquidity pools, provide liquidity, and swap a variety of digital assets.

As a decentralized exchange, Uniswap uses a permissionless design. The Uniswap protocol is available for anyone to use, with no ability of the Uniswap platform to selectively restrict access. Anyone who chooses can use Uniswap to trade digital assets, provide liquidity, or create a new market to exchange a new pair of digital assets.

The automation provided by smart contracts can make trading assets more efficient. Uniswap uses smart contracts to also avoid liquidity issues that traditionally affect centralized exchanges. The elimination of any rent-seeking third party, such as a centralized exchange or financial institution, can also reduce transaction processing fees.

What Is A UNI Token?

The native cryptocurrency token behind Uniswap, known as UNI, plays a key role in the maintenance as well as the operation of the network. All of the users that hold the token can participate in the maintenance and operation of the network by voting on proposals to further develop the Uniswap ecosystem.

Two smart contracts power Uniswap, one being the Exchange Contract and the other being the Factory Contracts. These are automated programs that perform specific functions when a set of pre-set conditions are met. When a new pool is created, each provider needs to set the initial price of the assets within the pool by supplying an equal value of both of the tokens.

How Does Uniswap Work? 

Uniswap pioneered the Automated Market Maker model, in which users supply Ethereum tokens to Uniswap “liquidity pools” and algorithms set market prices based on supply and demand. 

By supplying tokens to Uniswap liquidity pools, users can earn rewards while enabling peer-to-peer trading. Users supply tokens to liquidity pools, trade tokens, or even create and list their own tokens (using Ethereum’s ERC-20 token protocol). There are currently hundreds of tokens available on Uniswap, and many popular trading pairs are stablecoins like USDT.

Some of the potential advantages of decentralized exchanges like Uniswap include:

  • Self-governing: Funds are never transferred to any third party or generally subject to counterparty risk (i.e. trusting your assets with a custodian) because both parties are trading directly from their own wallets.
  • Global and permissionless: There is no concept of borders, or restrictions on who can trade. Anyone with a smartphone and an internet connection can participate.
  • Ease-of-use and pseudonymity: No account signup or personal details are required.

The Uniswap platform uses blockchain-based smart contracts to facilitate the decentralized trading of many different digital assets. Pairs of digital assets are swapped via liquidity pools, which use smart contracts to automatically rebalance after every trade. The Uniswap blockchain, which functions like an electronic ledger, is continually updated to reflect the trading activity occurring among Uniswap users. By functioning as an exchange without any involvement by a central authority, Uniswap is an automated market maker.

Uniswap operates using the Ethereum platform, which currently uses the proof-of-work operating method. (Ethereum is gradually transitioning to using only the proof-of-stake method.)Proof of work requires vast computing and energy resources, which are used to process transactions and generate new cryptocurrency.

Uniswap users can participate in the decentralized exchange in several ways:

  • Create new markets: Uniswap users can use smart contracts to create new markets for exchanging new pairs of digital assets.
  • Swap assets via existing markets: Uniswap can use the platform to swap digital assets, via decentralized markets that have already been created.
  • Provide liquidity and earn rewards: Uniswap users can provide liquidity by staking—agreeing to not trade or sell—their digital assets. Those who stake their digital currencies on the Uniswap platform are rewarded with UNI.
  • Participate in Uniswap governance: UNI token holders are empowered to govern the Uniswap platform, with voting power distributed in proportion to users’ UNI balances.

Participating in the Uniswap network requires connecting a compatible digital wallet. In addition, since the Ethereum platform collects fees for processing Uniswap transactions, Uniswap users need Ether (ETH) to pay any transaction fees that they incur.

Advantages And Disadvantages Of Uniswap


  • Enables the decentralized exchange of many digital assets
  • Smart contracts enable asset trading that may be cheaper and more efficient
  • Uniswap users can earn UNI by agreeing to not sell or trade their cryptocurrency holdings
  • Decentralized governance of the Uniswap platform enables anyone to participate


  • Uniswap only supports the exchange of Ethereum-compatible cryptocurrencies
  • Proof of work is an energy- and resource-intensive process
  • Users must own ETH to pay transaction processing fees
  • Using a decentralized exchange requires having a compatible, self-hosted wallet

V3 Whitepaper

What Makes Uniswap Unique?

Uniswap exists to create liquidity — and therefore trading and the value that trading provides — for the DeFi sphere.

One of the major AMMs in operation at present, the protocol functions using a formula for automated exchange — X x Y = K. Founder Hayden Adams describes himself as the inventor of the particular implementation of the formula on Uniswap.

Uniswap is not just a decentralized exchange; it attempts to solve the issues that platforms such as EtherDelta experienced with liquidity.

By automating the process of market making, the protocol inceventizes activity by limiting risk and reducing costs for all parties. The mechanism also removes identity requirements for users, and technically anyone can create a liquidity pool for any pair of tokens.

According to Uniswap, their governance token (UNI) was created in order to “officially enshrin[e] Uniswap as publicly-owned and self-sustainable infrastructure while continuing to carefully protect its indestructible and autonomous qualities.”

Uniswap V2 launched on Nov. 2, 2018, and introduced new features like ERC-20 pairs, price oracles, flash swaps and more. The latest version — Uniswap V3, launched on the mainnet on May 5, 2021. It features greater capital efficiency for liquidity providers, better execution for traders and enhanced infrastructure. Uniswap price reached an all-time high (ATH) of $44.97 leading up to the mainnet launch of V3. Since it’s launch there has been substantial interest in it’s UNI to AUD and UNI to EUR price pairs.

How Many Uniswap (UNI) Coins Are There In Circulation?

The total supply of Uniswap’s governance token, UNI, is 1 billion units. These will become available over the course of four years, after which Uniswap will introduce a “perpetual inflation rate” of 2% to maintain network participation.

Token distribution currently consists of the following: 60% to Uniswap community members, i.e. users, 21.51% to team members, 17.8% to investors and 0.69% to advisors. The latter three distributions will occur according to a four-year vesting schedule.

Out of the majority set to go to users, 15% can be claimed by those who used Uniswap prior to Sep. 1, 2020. These even include users who submitted transactions which were never successful — they are eligible for 400 UNI.

The UNI token serves the purpose of enabling shared community ownership in the growth and development of the decentralized protocol. This allows UNI holders to participate in the governance of the Uniswap protocol and wider ecosystem, in a neutral and trustless manner. The success and adoption of Uniswap products will positively impact Uniswap price, hence incentivizing token holders to contribute to the self-sustaining development of the ecosystem.

Four years after the UNI token launch, in September 2024, a perpetual inflation rate of 2% annually will take effect. This is to ensure that participation in the Uniswap ecosystem continues, by disincentivizing passive holders.

6 Things To Know Before You Buy Uniswap (UNI)

1. Uniswap is both a cryptocurrency and a decentralized exchange

Learning about Uniswap starts with the Uniswap exchange, a decentralized cryptocurrency exchange that offers peer-to-peer trading.

With a centralized exchange, such as Coinbase, the exchange monitors and facilitates transactions. You also need to register for an account. A decentralized exchange is different because there’s no third party involved and no registration required. You just connect a crypto wallet to Uniswap’s app, and you can trade cryptocurrencies.

Decentralized finance (DeFi) applications have grown quite a bit this year. And Uniswap ranks among the biggest decentralized exchanges by trading volume.

What about the Uniswap cryptocurrency? It’s a governance token, meaning holders can vote on proposed changes to the Uniswap exchange. Its success is tied in to the exchange because if the exchange gets more popular, it will likely lead to more people wanting to buy the token.

2. The exchange operates as an automated market maker

The Uniswap exchange is an automated market maker. This is a type of decentralized exchange that offers various pairs of tokens to trade. Prices are set using mathematical formulas, and trades occur using smart contracts.

For this to work, the exchange has liquidity pools. Each liquidity pool has funds for a pair of cryptos. It draws from liquidity pools when users make trades.

Let’s say you want to trade your Ethereum (ETH) for Dai (DAI). You’d go to the swap page on Uniswap and connect a crypto wallet. Next, you’d enter the amount of Ethereum you want to trade and select Dai as the cryptocurrency you want to receive.

Uniswap would immediately calculate the amount of Dai it will pay you for your Ethereum. If you confirm the trade, Uniswap will pay you the Dai out of its Ethereum/Dai pool. There would also be a transaction fee, called a gas fee, which is always paid in Ethereum.

But where do the funds in those pools come from? That’s where Uniswap’s users come in.

3. Users can lend their crypto to Uniswap

To have enough funds in its liquidity pools, Uniswap rewards users who lend their own crypto. You can choose the “Add liquidity” option to lend crypto to any of Uniswap’s pools.

When adding liquidity, you need to contribute equivalent amounts of both cryptocurrencies to the pool. For example, if you choose the Ethereum/Dai pool, you’d need to lend Ethereum and Dai.

In return for your contribution, Uniswap will pay you a share of the gas fees for that liquidity pool. Continuing the example above, every time someone traded Ethereum and Dai, you’d get a share of the gas fees.

4. It runs on the Ethereum blockchain

Uniswap was built on Ethereum’s blockchain technology. That’s why users on Uniswap need to pay gas fees with Ethereum.

The issue is that Ethereum is congested due to its popularity. There are more transactions than Ethereum’s blockchain can handle, which drives up fees and slows down processing times.

In addition, gas fees depend on the congestion at the time of a transaction, not the amount of the transaction. This makes Uniswap a poor choice if you’re only trading a small amount. It doesn’t make sense to pay $30 in fees for a $50 trade.

Ethereum has been going through a series of upgrades toward its next version, Ethereum 2.0. The upgrades should drastically decrease processing times and gas fees. But the process likely won’t be completed until 2022. Until then, Ethereum’s issues will affect Uniswap.

5. It has inspired a range of competitors

Uniswap is far from the only game in town. There are quite a few decentralized exchanges that operate similarly. Here are a few examples:

  • PancakeSwap
  • SushiSwap
  • BurgerSwap
  • Curve
  • DODO

One advantage several other exchanges offer is that they run on the Binance Smart Chain, which currently has much lower fees than Ethereum. PancakeSwap, in particular, has had success as a less expensive alternative to Uniswap.

6. You can buy the Uniswap token or trade for it

If you want to invest in Uniswap, there are a couple ways you can do it. The first is to buy it through an exchange like any other cryptocurrency. Several top cryptocurrency exchanges list Uniswap. Here are a few popular options:

  • Coinbase
  • Gemini
  • Binance

You can also trade for it on the Uniswap exchange. To do that, you would need to buy another cryptocurrency first and transfer it to a crypto wallet. On the Uniswap app, you would connect your wallet, and then make your trade.

How Token Price Is Determined

Another important element of this system is how it determines the price of each token. Instead of an order book system where the price of each asset is determined by the highest buyer and lowest seller, Uniswap uses an automated market maker system. This alternative method for adjusting the price of an asset based on its supply and demand uses a long-standing mathematical equation. It works by increasing and decreasing the price of a coin depending on the ratio of how many coins there are in the respective pool.

It’s important to note that whenever someone adds a new ERC20 token to Uniswap, that person has to add a certain amount of the chosen ERC-20 token and an equal amount of another ERC-20 token to start the liquidity pool.

The equation for working out the price of each token is x*y=k, where the amount of token A is x and the amount of token B is y. K is a constant value, aka a number that doesn’t change.


For example, Bob wants to trade chainlink (LINK) for ether using the Uniswap LINK/ETH pool. Bob adds a large number of LINK to the pool which increases the ratio of LINK in the pool to ether. Since the value K must remain the same, it means the cost of ether increases while the cost of link in the pool decreases. So the more LINK Bob puts in, the less ether he gets in return because the price of it increases.

The size of the liquidity pool also determines how much the price of tokens will change during a trade. The more money, aka liquidity, there is in a pool, the easier it is to make larger trades without causing the price to slide as much.


Arbitrage traders are an essential component of the Uniswap ecosystem. These are traders that specialize in finding price discrepancies across multiple exchanges and use them to secure a profit. For example, if bitcoin was trading on Kraken for $35,500 and Binance at $35,450, you could buy bitcoin on Binance and sell it on Kraken to secure an easy profit. If done with large volumes it’s possible to bank a considerable profit with relatively low risk.

What arbitrage traders do on Uniswap is find tokens that are trading above or below their average market price – as a result of large trades creating imbalances in the pool and lowering or raising the price – and buy or sell them accordingly. They do this until the price of the token rebalances in line with the price on other exchanges and there is no more profit to be made. This harmonious relationship between the automated market maker system and arbitrage traders is what keeps Uniswap token prices in line with the rest of the market.

Is Uniswap a Good Investment?

Below are some reasons to buy Uniswap:

1. Uniswap is a giant DEX

Uniswap is the largest decentralised exchange by trading volume. The platform is also a giant in the DeFi space, so the asset is undoubtedly popular among crypto enthusiasts.

2. A proven track record

Since it was launched in 2018, Uniswap has continued to operate smoothly. There have been issues down the line, but those growing pains have been smoothed out, and Uniswap is now a giant in the crypto industry.

3. Much upside to consider

With the market downturn right now, most large-cap coins – including UNI – are available at discounts. You can purchase the coin now, and rest assured that gains will come over time.

Uniswap Price

Currently, UNI trades at $10.71, Up 0.09% in the past 24 hours but down 39.05% in the past week. The asset’s performance mirrors that of the broader market, which is up by 6.76% in the past 24 hours.


This still is a good time to get in on UNI. The coin is down 765 from its all-time high, meaning that there is a lot of upside for it. Once the market flips bullish, we expect more gains for the coin.

Uniswap Price Prediction

Recently, there have been several Uniswap price predictions, with people giving their opinions about where the asset will be in the future. WalletInvestor is most prominent, forecasting a price of $28.35 for UNI by the end of 2022 and $63.5 by 2025, Digital Coin has set a target of $20.88 by the end of 2022 for UNI, while the year-end forecast from Price Prediction stands at $23.46.



Post a comment

Your email address will not be published.

We use cookies to give you the best experience.