Close Menu
  • Instructions
  • News
    • DeFi
    • Smart Contract
    • Markets
    • Web3
    • Adoption
    • Memecoins
    • Analysis
    • Mining
    • Scams
    • Security
  • Education
    • Learn
    • Wallets & Exchange
  • Documentaries
  • Videos
    • Alessio Rastani
    • Altcoin Buzz
    • Coin Bureau
    • Dapp University
    • DataDash
    • Digital asset News
    • EllioTrades Crypto
    • MMCrypto
    • Lark Davis
    • Ivan on Tech
    • Benjamin Cowen
  • Market
    • Crypto Market Cap
    • Heat Map
    • Converter
    • Metal Prices
    • Stock prices
  • Bonus Books
  • Tools
What's Hot

TON Price Prediction: $1.50 Target as Technical Indicators Signal Potential 13% Rally

May 2, 2026

The Cheap Foreign Labor Regime Blocking Agricultural Intelligence

May 2, 2026

Meteora reports $1.5 million OTC scam loss in Q1 MET report

May 2, 2026
Facebook X (Twitter) Instagram
Recession Profit AlertsRecession Profit Alerts
  • Instructions
  • News
    • DeFi
    • Smart Contract
    • Markets
    • Web3
    • Adoption
    • Memecoins
    • Analysis
    • Mining
    • Scams
    • Security
  • Education
    • Learn
    • Wallets & Exchange
  • Documentaries
  • Videos
    • Alessio Rastani
    • Altcoin Buzz
    • Coin Bureau
    • Dapp University
    • DataDash
    • Digital asset News
    • EllioTrades Crypto
    • MMCrypto
    • Lark Davis
    • Ivan on Tech
    • Benjamin Cowen
  • Market
    • Crypto Market Cap
    • Heat Map
    • Converter
    • Metal Prices
    • Stock prices
  • Bonus Books
  • Tools
Recession Profit AlertsRecession Profit Alerts
Home»DeFi»Differences With V1 and V2
DeFi

Differences With V1 and V2

October 14, 2023No Comments6 Mins Read

  • 1 Uniswap V3 allows to operate in bounded ranges smaller than (0,∞)
  • 2 It provides UNI governance and designs various compensation structures
  • 3 In Uniswap V3 it is possible to create multiple pools for each pair of tokens, also with different swap fees

Uniswap V3, an advanced version of Uniswap V1 and Uniswap V2, is an Automated Market Maker (AMM) that gives liquidity providers more control over price ranges in which their deposited capital is used without significantly impacting liquidity fragmentation and gas efficiency.

Uniswap V3 also works on the similar constant product [x*y=k] with additional features. These are:

Concentrated liquidity: Liquidity providers are given the opportunity to concentrate liquidity by limiting it within an arbitrary price range. In previous versions, liquidity was distributed along the reserve curve [x*y=k] where x and y are reserves of assets X and Y respectively, while k is a constant. The earlier version provided liquidity over the entire price range (0, ∞), while V3 provides liquidity over the smaller (finite) range than (0, ∞). Liquidity was concentrated in a finite range known as Position. A position only needs to maintain a liquidity reserve to facilitate trading between this range and therefore acts as constant product pools within larger reserves, virtual reserves within the range.

Uniswap V3 White Paper Summary: Differences from V1 and V2

Figure: Simulation of virtual liquidity

A position must hold sufficient assets in reserve X to cover price movements up to the upper limit, because price increases would deplete X reserves. And in the case of Y, it must hold enough assets in reserve Y to cover the downward price movement up to the lower limit. The chart above shows the relationship for a position on a range [pa,pb] and a current price pc€ [pa,pb] and xreal and yreal represent the real reserves of the position.

See also  Gensyn AI is Live on KyberSwap – Bridging Decentralized Compute and DeFi

What happens if the price leaves the position range? The liquidity of the position is no longer active and no fees are incurred. At this point the reserve consists of a single asset, as the reserves of the other asset must be completely depleted. When the price returns to the position, liquidity becomes active again. The real reserve of the position is calculated using

where L is the amount of liquidity provided and is calculated as √k. The graphical representation of the above equation is

Uniswap V3 White Paper Summary: Differences from V1 and V2

Figure: real reserves

This allows the market to decide where to allocate liquidity and create as many positions as fit within the price range. Rational Liquidity Providers can reduce the cost of their capital by concentrating their liquidity in a narrow band around current prices and then continuing to add/remove tokens as the price moves.

Architectural changes: Some of the changes that occurred from V1 and V2 to V3 were necessary to support concentrated liquidity positions, while others are general improvements. The improvements include (i) Multiple pools per pair: Uniswap V3 enables multiple pools for each token pair, with different swap fees, while all pools are created by the same factory contract and creating contracts with three different fee categories 0.05%, 0.30 makes possible. % and 1%, while this was only 0.30% in V1 and V2. Additional rate structures can be implemented in V3. (ii) Non-fungible liquidity: In V3, compiling fees is not possible because fees are stored separately and kept as tokens in which fees are paid.

See also  Parity plans partial transition to decentralized teams in Polkadot’s ecosystem, impacting staff

Management: In Uniswap V3, UNI governance has more flexibility to change the portion of swap fees that apply to the protocols and is also able to implement additional layer fee structures. It also has the power to transfer ownership to another address.

Oracle: V3 does not require users of the oracle to externally track previous values ​​of the accumulator. In V3 it is possible to calculate the arithmetic mean TWAP (time-weighted average price) and the geometric mean TWAP (V3 follows the sum of the logbook prices). It adds a liquidity accumulator that is tracked in addition to the price accumulator that accumulates 1/L per second.

Geometric mean TWAP can be calculated between time period t1 and t2,

Implement concentrated liquidity

  • Draw and achieve: Ranges are specified as a range of signed integer indices: a lower tick (il) and an upper tick (iu). Ticks represent the prices at which the virtual liquidity of the contract can change. There is a check mark at each price p, an integer power of 1.0001. Representing ticks by an integer index i, prices are given by,

p(i) = 1.0001i

When liquidity is added to a range and one or both ticks are not yet used as an upper or lower limit in any of the existing positions, the tick is initialized. Not all ticks can be initialized. The pool is initialized with a parameter known as the tick distance, so all ticks that can be initialized must be divisible by the tick distance. If the drawing distance is smaller, closer and more accurate ranges are possible.

  • Global state: The Global State of the contract includes seven storage variables relevant to swaps and liquidity positions.
See also  Aave DAO approves $25M funding grant, token allocation for Aave Labs

From a liquidity and price point of view, only one changes at a time. Price changes when trading within a tick and liquidity changes when crossing a tick or when mining or burning liquidity. L is calculated as xy and P is calculated as y/x.

The current tick can be calculated from P. At any given time the equation should be true: ic=[log1.0001P]

In Uniswap V3, fees are collected in the tokens themselves rather than in liquidity. The global state of fees represents the total amount of fees earned per unit of Virtual Liquidity L. The global state keeps track of the total accumulated uncollected protocol fees in each token and these are collectible by UNI governance.

Single-tap swap: When exchanging one token for another, the pool contract first calculates the new P using the formula P= y/L and calculates the amount of token0 or token1 to send using one of the two formulas: y =P .L or x=(1/P). L

Tick-indexed state: The contract must store information about each tick to track the amount of net liquidity to be added or removed when the tick is exceeded, and to track the fees earned above or below that tick.

Position Indexed State: Each position structure tracks three values ​​including liquidity, lower tick and upper tick to know the position’s liquidity and uncollected fees.

Source link

Differences

Related Posts

Maple Finance’s SYRUP Token Now Available on Revolut in UK and EU

May 2, 2026

Altura Enables On-chain Lending With AVLT on Morpho

May 2, 2026

What does Lido’s targeted rsETH fix mean for LDO and EarnETH holders?

May 2, 2026

Synbo Protocol Partners With DeBox Social to Accelerate DeFi Fund Growth With Web3 Community Engagement

May 2, 2026
Top Posts

AAVE Price Prediction: Critical Support Test Could Trigger 25% Drop to $70 Range

April 21, 2026

ZachXBT Exposes US Law Firm Gerstein Harrow’s $71M Grab of Stolen Lazarus Funds

May 2, 2026

Ethereum Stolen from the Hacked Crypto Platform Were Transferred to Multiple Addresses!

September 23, 2023

Type above and press Enter to search. Press Esc to cancel.