# Uniswap v3-core: Concentrated Liquidity Smart Contracts for Ethereum

> Uniswap v3-core contains the core Solidity smart contracts for the Uniswap V3 protocol, which introduced concentrated liquidity to automated market making on Ethereum. The npm package `@uniswap/v3-core` is the canonical deployment artifact used to test and build on top of the protocol.

**Uniswap/v3-core** — 🦄 🦄 🦄 Core smart contracts of Uniswap v3

- Repository: https://github.com/Uniswap/v3-core
- Website: https://uniswap.org
- Stars: 5,025 · Forks: 3,027
- Language: TypeScript
- License: NOASSERTION
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/uniswap-v3-core

## What Uniswap v3-core contains and who uses it

Uniswap v3-core is the repository for the foundational Solidity contracts of the Uniswap V3 protocol. The README describes it as containing the core smart contracts for the Uniswap V3 Protocol. The two primary contracts are UniswapV3Factory, which creates new trading pairs, and UniswapV3Pool, which holds the concentrated liquidity logic and executes swaps.

The intended users fall into three groups. Protocol developers who want to deploy the Uniswap V3 mechanism on a new chain or a local testnet use the factory bytecode from the npm package. Smart contract developers who want to build on top of V3, such as aggregators, yield optimizers, or limit order systems, import the Solidity interfaces from the package. Researchers and auditors who want to understand the concentrated liquidity math work directly with the library contracts in `contracts/libraries/`.

Higher-level functionality such as the swap router, non-fungible position manager, and liquidity migration contracts are in the separate `uniswap-v3-periphery` repository, which the README links to. The core repository holds only the minimal contracts necessary to create pools and execute swaps.

## Concentrated liquidity: how it differs from Uniswap v2

Uniswap v2 spreads liquidity uniformly across all prices from zero to infinity. A liquidity provider in a v2 ETH/USDC pool has capital deployed at every possible price, including prices far from the current market. Most of that capital earns no fees because trades only happen near the current price.

Uniswap v3 allows liquidity providers to concentrate their capital within a chosen price range. A provider who believes ETH will stay between $2000 and $3000 can deploy all their capital in that range. When the price is within the range, they earn fees proportional to their share of the active liquidity. When the price moves outside their range, their position becomes entirely one asset and earns no fees until the price returns.

This mechanism is the central innovation in v3-core. The README does not describe the concentrated liquidity math directly, but the library contracts in `contracts/libraries/` implement the tick-based system that tracks which liquidity positions are active at any given price. The Uniswap v3 whitepaper, linked in the RELATED SEARCHES, documents the mathematical foundation.

## Installing and using the npm package

The npm package `@uniswap/v3-core` provides the deployment artifacts and Solidity interfaces for use in development. The README describes how to import the factory bytecode for local testnet deployment:

```typescript
import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json'

// deploy the bytecode
```

Using the bytecode from the package ensures that the local deployment matches the contracts on Ethereum mainnet and public testnets. Recompiling from source can produce different bytecode if the Solidity compiler version or settings differ, which breaks any test that relies on matching the exact mainnet contract.

For Solidity contracts that interact with a Uniswap V3 pool, the interfaces can be imported directly:

```solidity
import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';

contract MyContract {
  IUniswapV3Pool pool;

  function doSomethingWithPool() {
    // pool.swap(...);
  }
}
```

The `package.json` lists the published files as the interfaces directory, the libraries directory, and the factory and pool artifacts JSON files. Tests and other development-only contracts are excluded from the published package.

## Repository layout and build tooling

The repository uses Hardhat as the Solidity development environment. The `package.json` scripts section shows two commands: `hardhat compile` to compile the contracts and `hardhat test` to run the test suite. TypeChain is configured to generate TypeScript types for each contract, which the test files use for type-safe contract interaction.

The `contracts/` directory is divided into `interfaces/`, `libraries/`, and `test/`. The interfaces are the public API for external integration. The libraries contain the tick math, position math, and full-precision arithmetic used by the pool contract. The test contracts are unlicensed and exist only for testing purposes.

Fuzz testing is configured through `echidna.config.yml`, and a MythX workflow is included in the GitHub Actions configuration. The README links to both the fuzz testing and MythX CI badges, indicating that the project applies both property-based and symbolic verification to the core contracts.

The `audits/` directory contains the security audit reports. The `bug-bounty.md` file describes the terms of the Uniswap V3 bug bounty program.

## Licensing: BUSL-1.1, GPL-2.0-or-later, and MIT exceptions

The licensing situation in v3-core is more complex than a single license. The primary license is the Business Source License 1.1 (BUSL-1.1). This is not an OSI-approved open-source license: it restricts production use of the code until a Change Date, after which the code converts to GPL-2.0-or-later.

Several files carry dual licenses. All files in `contracts/interfaces/` may also be licensed under GPL-2.0-or-later, as indicated in their SPDX headers. Some files in `contracts/libraries/` may also be licensed under GPL-2.0-or-later. The `FullMath.sol` library file is licensed under MIT. All files in `contracts/test/` are unlicensed.

For developers who want to import the interfaces and build Solidity contracts that interact with the Uniswap V3 pool, the GPL-2.0-or-later dual license on the interfaces directory is the relevant grant. For teams who want to fork or modify the core pool contract itself for production deployment before the BUSL Change Date, the BUSL-1.1 restrictions apply. Legal review is necessary before any commercial deployment that goes beyond importing the interfaces.

## Uniswap v3-core versus Uniswap v2-core and Curve

Uniswap v2-core is the predecessor. Its constant-product AMM is simpler: a single invariant `x * y = k` governs all trades, and liquidity is distributed uniformly across all prices. This makes v2 easier to reason about and audit, and it remains widely deployed. v3-core's concentrated liquidity adds significant complexity to the tick-based accounting system.

Curve is another major AMM on Ethereum, optimized for stable asset pairs such as USDC/USDT or ETH/stETH. Curve uses a StableSwap invariant that provides tighter prices near parity than a constant-product AMM. Uniswap v3 can approximate Curve's behavior for stable pairs by concentrating liquidity in a narrow range around 1:1, but Curve's specialized invariant is more capital-efficient for assets that should always trade close to each other.

For general-purpose token pairs where the price can range widely, Uniswap v3's concentrated liquidity model is more flexible than Curve. For stable pairs, the choice between concentrated Uniswap v3 liquidity and Curve depends on the exact stability of the peg and the rebalancing cost when positions go out of range.

## Maintenance and upgrade considerations

The last push to the Uniswap v3-core repository was on 2026-07-30. The repository has no GitHub releases listed, but the `package.json` shows version 1.0.1. The contracts deployed on Ethereum mainnet are immutable: once deployed, they cannot be changed. This means v3-core is effectively frozen from a protocol perspective, and the repository activity reflects ongoing maintenance of the tooling (tests, TypeScript types, build scripts) rather than protocol changes.

For any chain other than Ethereum mainnet and the public testnets where Uniswap V3 is officially deployed, deploying v3-core requires the team to run their own deployment and potentially seek a separate license from Uniswap Labs. The BUSL-1.1 terms govern this.

The `hardhat test` command runs the full test suite. The test files are in TypeScript and use the generated TypeChain types. The `mocha-chai-jest-snapshot` dependency adds snapshot testing. Teams forking v3-core for research should run the full test suite to confirm that their modifications do not break the existing invariants.

## Conclusion

Uniswap v3-core is the right artifact for developers building protocols, aggregators, or testing environments that need to deploy or interact with the Uniswap V3 pool mechanism on an EVM chain. It is not a user interface, not a router, and not a complete AMM product: the higher-level swap router and position manager live in the separate `uniswap-v3-periphery` repository. Before building on top of it, read the BUSL-1.1 LICENSE, verify that the interfaces directory's GPL-2.0-or-later files cover your use case, and import the factory bytecode from the npm package rather than recompiling to ensure you test against the same code deployed on mainnet.

## FAQ

### What is the Uniswap v3 core npm package?

The `@uniswap/v3-core` npm package publishes the ABI and bytecode for UniswapV3Factory and UniswapV3Pool, plus the Solidity interface files for the pool and libraries. Importing the bytecode from the package ensures local test deployments match the contracts on Ethereum mainnet.

### What license does Uniswap v3-core use?

The primary license is Business Source License 1.1 (BUSL-1.1), which restricts production commercial use until a Change Date. Files in contracts/interfaces/ are dual-licensed as GPL-2.0-or-later. FullMath.sol is MIT licensed. Test contracts are unlicensed. Review the full LICENSE file before commercial deployment.

### How is Uniswap v3 different from Uniswap v2?

Uniswap v2 spreads liquidity uniformly across all prices. Uniswap v3 allows liquidity providers to concentrate capital within a chosen price range, earning fees only when the price is within that range. This concentration can increase fee earnings per unit of capital but requires active management when the price moves outside the chosen range.

## Sources

- [Issues](https://github.com/Uniswap/v3-core/issues)
- [Project website](https://uniswap.org)
- [README](https://github.com/Uniswap/v3-core/blob/main/README.md)
- [Uniswap/v3-core on GitHub](https://github.com/Uniswap/v3-core)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/uniswap-v3-core
