top of page
uniswap.png

Uniswap v3 is a decentralized exchange protocol and automated market maker (AMM) built on Ethereum that fundamentally redesigned how liquidity is provided and utilized in DeFi. Launched on the Ethereum mainnet in May 2021, v3 introduced a concept called "concentrated liquidity," which allows liquidity providers to allocate their capital within specific price ranges rather than across an infinite price spectrum . This design represents a significant departure from previous versions and aims to improve capital efficiency dramatically, with the protocol claiming up to a 4,000x improvement compared to Uniswap v2 .

Core Architecture and Design

At its foundation, Uniswap v3 is a binary smart contract system composed of many libraries that together form two main components: Core and Periphery contracts . The Core contracts provide the fundamental safety guarantees for all parties interacting with the protocol. They define the logic for pool generation, manage the pools themselves, and handle the interactions involving the respective assets within those pools . The Periphery contracts, by contrast, are designed to interact with one or more Core contracts but are not part of the core protocol itself; they exist to provide methods of interacting with the core that increase clarity and user safety .

The Core system consists of a single factory, a pool deployer, and the many pools that the factory creates . The factory defines the logic for generating pools. In a significant change from Uniswap v2, a pool in v3 is defined not just by the two tokens that make up the asset pair, but also by a fee tier. This means there can be multiple pools for the same asset pair, distinguished only by their swap fee . The pools themselves serve as automated market makers for the paired assets and additionally expose price oracle data, making them useful for a wide variety of system designs. They may also be used as an asset source for flash transactions .

A notable characteristic of the v3 Core contracts is the extensive attention given to gas optimization. This optimization results in a substantial reduction in gas costs for all protocol interactions compared to v2, though this comes at the cost of reduced code clarity . The Core contracts are also non-upgradeable by design, except for certain fee parameters, which means that vulnerabilities must be addressed through new deployments or periphery-level solutions rather than direct upgrades .

Concentrated Liquidity and Ticks

The most significant innovation in Uniswap v3 is concentrated liquidity. In earlier versions, liquidity was distributed uniformly across the entire price curve from zero to infinity, which meant that a large portion of capital was never actually used for trades because prices rarely moved to extremes. Uniswap v3 allows liquidity providers (LPs) to choose a specific price range in which they want their liquidity to be used by trades . This enables a denser concentration of liquidity at specific prices. Compared to the full-range liquidity model of v2, concentrated liquidity allows traders to make larger trades with less price impact . For LPs, it means their capital can be deployed far more efficiently—earning fees only within the chosen range but with much higher potential returns for the same amount of capital.

To achieve this price-range system, v3 pools discriminate the price range with ticks. Ticks are the boundaries between discrete price ranges, and a change of one tick always represents a price change of approximately 0.01% from the current price . The price corresponding to tick ii is given by the formula pi=1.0001ipi​=1.0001i, which maps discrete integer ticks to continuous prices . This exponential mapping means that as the tick index increases, prices rise slightly faster than linearly in tick space.

Not all ticks can be used for liquidity provision. Each Uniswap v3 pool specifies a tick spacing parameter, which restricts the set of valid ticks. Only ticks divisible by this spacing can be used to define a price range . Pools with higher fees have larger tick spacings, which means the minimum width of a liquidity position is wider. For example, a pool with a 1% fee might have a tick spacing of 200, corresponding to a price difference of about 2.02% between initializable ticks. In contrast, the USDC/ETH 0.05% fee pool has a tick spacing of 10, allowing for more granular price levels spaced about 10 basis points apart .

Variable Fee Tiers and Liquidity Positions

Another key innovation in Uniswap v3 is the introduction of variable fee tiers. Instead of a single fee applied to all trades in all pools, liquidity pools can be created with one of four fee rates: 0.01%, 0.05%, 0.3%, or 1% . This flexibility allows the protocol to accommodate different types of assets. As the Uniswap team noted, a fee that works well for volatile tokens might be too high for stablecoin pairs and too low for rarely traded tokens . Consequently, the same token pair may be traded across multiple pools with different fees. The most liquid pair, USDC/ETH, for instance, is actively traded in both the 0.05% and 0.3% fee pools . Research suggests that this fragmentation across fee tiers is driven by economies of scale, with low-fee pools primarily used by large, professional LPs who can afford to frequently update positions, while smaller retail LPs prefer higher-fee pools where rebalancing is less frequent .

When someone provides liquidity to a pool, they create a liquidity position. This position is defined by the amount of liquidity provided and the start tick and end tick (the price range) of the position . Because v3 pools allow users to choose any price range, it is possible to create positions that do not contain the current price of the pool. In such cases, the liquidity provider will pay only one type of token into the pool, creating a single-side liquidity position. If the range lies strictly above the current market price, only one token needs to be deposited; if it lies strictly below, only the other token is required. When the range contains the current price, both tokens must be deposited in proportions that depend on the position of the current price within the range .

A crucial change in v3 is that LP positions are no longer represented by fungible ERC-20 tokens. The changes in v3 made completely fungible liquidity tokens impossible because each position is unique in its price range . Instead, positions are managed through the Nonfungible Position Manager contract, which handles the logic for creating, adjusting, or exiting positions . This means that LP positions in v3 are represented as non-fungible tokens (NFTs), which introduces new complexities for tracking and composability but also opens possibilities for tokenizing increasingly sophisticated liquidity strategies over time .

Implications and Trade-offs

The design of Uniswap v3 creates a more flexible and capital-efficient system, but it also introduces new complexities and trade-offs. For liquidity providers, the benefits of concentrated liquidity come with the cost of more frequent monitoring and active management. LPs must now make strategic decisions about price ranges and fee tiers, and they may need to rebalance their positions as market prices move . This has led to new strategic behaviors in liquidity provision and has arguably made passive liquidity provision more challenging than in v2.

The protocol was initially launched under a Business Source License 1.1, which is effectively a time-delayed GPL license. This license restricted the use of the v3 source code in commercial or production settings for up to two years, at which point it would convert to a permanent GPL license . This was a notable change from the fully open-source approach of earlier versions and was intended to protect Uniswap's competitive position.

Uniswap v3 has been deployed not only on Ethereum mainnet but also on several Layer 2 scaling solutions. It was deployed on Optimism shortly after that service launched in July 2021, and on Arbitrum in September 2021 . These deployments leverage Optimistic Rollup technology to increase processing speed and reduce fees for users. The protocol also expanded to Polygon, an Ethereum-compatible blockchain network, in December 2021 .

In summary, Uniswap v3 represents a major evolution in automated market maker design. By introducing concentrated liquidity, variable fee tiers, and a tick-based price system, it offers significantly greater capital efficiency and flexibility compared to its predecessors. However, these innovations come with increased complexity for liquidity providers and a more fragmented pool landscape. The protocol's architecture, split between Core and Periphery contracts, reflects a careful balance between safety, gas efficiency, and user-facing functionality.

bottom of page