Skip to content

Commit 610603e

Browse files
authored
Merge pull request #91 from Uniswap/v1.1-staging
v2.0.0 staging
2 parents bde110c + 750c5fb commit 610603e

File tree

145 files changed

+8723
-2808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+8723
-2808
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
- uses: actions/checkout@v4
1313
with:
1414
submodules: recursive
15-
token: ${{ secrets.ORG_ACCESS_TOKEN }}
1615

1716
- name: Install Foundry
1817
uses: foundry-rs/foundry-toolchain@v1

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
1717
with:
1818
submodules: recursive
19-
token: ${{ secrets.ORG_ACCESS_TOKEN }}
2019

2120
- name: Install Foundry
2221
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1
@@ -30,6 +29,10 @@ jobs:
3029
forge build --sizes
3130
id: build
3231

32+
- name: Build rust project
33+
run: ./script/build_rust.sh
34+
id: build-rust
35+
3336
- name: Run Forge tests
3437
run: forge test --isolate -vvv
3538
id: test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ out/
66
.env
77

88
broadcast/
9+
10+
# Rust project
11+
**/target

.gitmodules

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@
1919
[submodule "lib/optimism"]
2020
path = lib/optimism
2121
url = https://github.com/ethereum-optimism/optimism
22-
[submodule "lib/merkle-distributor"]
23-
path = lib/merkle-distributor
24-
url = https://github.com/Uniswap/merkle-distributor
25-
[submodule "lib/openzeppelin-contracts-4.7"]
26-
path = lib/openzeppelin-contracts-4.7
27-
url = https://github.com/OpenZeppelin/openzeppelin-contracts.git
28-
branch = v4.7.3
22+
[submodule "lib/uerc20-factory"]
23+
path = lib/uerc20-factory
24+
url = https://github.com/Uniswap/uerc20-factory
2925
[submodule "lib/continuous-clearing-auction"]
3026
path = lib/continuous-clearing-auction
3127
url = https://github.com/Uniswap/continuous-clearing-auction
28+
[submodule "lib/blocknumberish"]
29+
path = lib/blocknumberish
30+
url = https://github.com/Uniswap/blocknumberish

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [2.0.0]
9+
Liquidity Launcher v2.0.0 is a major release with breaking changes. It is not backwards compatible with v1.0.0.
10+
11+
### Breaking changes
12+
- Renaming of existing contracts (strategies and factories)
13+
- Addition of `maxCurrencyAmountForLP` parameter to `MigratorParameters` struct
14+
- `ILBPInitializer` interface is used instead of the original direct integration with `IContinuousClearingAuction`
15+
- Significant directory structure changes
16+
17+
Integrators should update to v2.0.0 as soon as possible.
18+
19+
### Added
20+
- Refactored strategies to be more extensible and reusable [#84](https://github.com/Uniswap/liquidity-launcher/pull/84)
21+
- New base strategy contract: LBPStrategyBase
22+
- New strategy contracts: FullRangeLBPStrategy, AdvancedLBPStrategy, GovernedLBPStrategy, VirtualLBPStrategy
23+
- Refactored strategy contracts to inherit from StrategyFactory
24+
- New strategy factory contracts: FullRangeLBPStrategyFactory, AdvancedLBPStrategyFactory, GovernedLBPStrategyFactory [#87](https://github.com/Uniswap/liquidity-launcher/pull/87)
25+
- `maxCurrencyAmountForLP` parameter to the strategy contracts [#99](https://github.com/Uniswap/liquidity-launcher/pull/99)
26+
- New `ILBPInitializer` interface for LBP initializers [#83](https://github.com/Uniswap/liquidity-launcher/pull/83)
27+
- BTT unit testing suite [#96](https://github.com/Uniswap/liquidity-launcher/pull/96)
28+
- Periphery position recipient contracts: TimeLockedPositionRecipient, PositionFeesForwarder, BuybackAndBurnPositionRecipient [#82](https://github.com/Uniswap/liquidity-launcher/pull/82)
29+
- Documentation: Deployment Guide, Technical Reference [#110](https://github.com/Uniswap/liquidity-launcher/pull/110)
30+
31+
### Fixed
32+
- Fixed missing `DistributionInitialized` event [#94](https://github.com/Uniswap/liquidity-launcher/pull/94)
33+
34+
### Removed
35+
- Old strategy contracts: LBPStrategyBasic, VirtualLBPStrategyBasic
36+
- Local clone of uerc20-factory contracts repo [#97](https://github.com/Uniswap/liquidity-launcher/pull/97)
37+
- Outdated OZ dependency [#97](https://github.com/Uniswap/liquidity-launcher/pull/97)
38+
39+
## [1.0.0]
40+
41+
### Added
42+
- Initial release of Liquidity Launcher.
43+
44+
### Fixed
45+
N/A

README.md

Lines changed: 53 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# Liquidity Launcher
22

3-
_A modular system for bootstrapping deep liquidity on Uniswap v4._
3+
Liquidity Launcher is a comprehensive launch system built on Uniswap V4 that facilitates token creation, distribution, and liquidity bootstrapping.
44

5-
## Overview
6-
7-
Liquidity Launcher is a comprehensive launch system built on Uniswap v4 that facilitates token creation, distribution, and liquidity bootstrapping. The system provides a streamlined approach for projects to:
5+
## Table of Contents
6+
- [Overview](#overview)
7+
- [Installation](#installation)
8+
- [Docs](#docs)
9+
- [Deployment addresses](#deployment-addresses)
10+
- [Audits](#audits)
811

12+
## Overview
13+
Liquidity Launcher provides a streamlined approach for projects to:
914
- **Create** new ERC20 tokens with extended metadata and cross-chain capabilities
1015
- **Distribute** tokens through customizable strategies
1116
- **Bootstrap** liquidity using price discovery mechanisms
1217
- **Deploy** automated market making pools on Uniswap v4
1318

14-
The primary distribution strategy is a Liquidity Bootstrapping Pool (LBP) that combines a price discovery auction with automated liquidity provisioning with immediate trading liquidity.
15-
16-
## Warnings to Integrators
17-
18-
⚠️ **Rebasing Tokens and Fee-on-Transfer Tokens are NOT compatible with LiquidityLauncher.** The system is designed for standard ERC20 tokens and will not function correctly with tokens that have dynamic balances or transfer fees.
19-
20-
⚠️ **Always use multicall for atomic token creation and distribution.** When creating and distributing tokens, batch both operations in a single transaction with `payerIsUser = false` to prevent tokens from sitting unprotected in the LiquidityLauncher contract where anyone could call `distribute()`.
19+
The primary distribution strategy is a Liquidity Bootstrapping Pool (LBP) that combines a price discovery auction with automated liquidity provisioning that delivers immediate trading liquidity.
2120

2221
## Installation
22+
This project uses Foundry for development and testing. To get started:
2323

2424
```bash
2525
# Clone the repository with submodules
@@ -33,9 +33,16 @@ git submodule update --init --recursive
3333
curl -L https://foundry.paradigm.xyz | bash
3434
foundryup
3535

36+
# Install Rust (if not already installed)
37+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
38+
rustup
39+
3640
# Build the project
3741
forge build
3842

43+
# Build rust project
44+
./script/build_rust.sh
45+
3946
# Run tests
4047
forge test --isolate -vvv
4148
```
@@ -44,36 +51,47 @@ The project requires the following environment variable for testing:
4451

4552
- `QUICKNODE_RPC_URL`: An Ethereum mainnet RPC endpoint for fork testing
4653

54+
## Docs
55+
- [Technical Reference](./docs/TechnicalReference.md)
56+
- [Changelog](./CHANGELOG.md)
57+
- [Deployment Guide](./docs/DeploymentGuide.md)
58+
4759
## Deployment Addresses
4860

49-
### LiquidityLauncher
61+
### Liquidity Launcher
62+
The LiquidityLauncher contract can be deployed to the same address on all networks with the canonical Permit2 deployment address (0x000000000022D473030F116dDEE9F6B43aC78BA3).
63+
64+
| Version | Address | Commit Hash |
65+
|---------|---------|------------|
66+
| v1.0.0 | 0x00000008412db3394C91A5CbD01635c6d140637C | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d |
5067

51-
| Network | Address | Commit Hash | Version |
52-
|---------|---------|------------|---------|
53-
| Mainnet | 0x00000008412db3394C91A5CbD01635c6d140637C | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
54-
| Unichain | 0x00000008412db3394C91A5CbD01635c6d140637C | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
55-
| Base | 0x00000008412db3394C91A5CbD01635c6d140637C | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
56-
| Sepolia | 0x00000008412db3394C91A5CbD01635c6d140637C | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
68+
> No changes have been made to the LiquidityLauncher contract since v1.0.0.
5769
58-
### LBPStrategyBasicFactory
70+
### FullRangeLBPStrategyFactory
71+
The FullRangeLBPStrategyFactory contract is deployed to different addresses on different networks as it uses the deployed Position Manager and Pool Manager contracts from Uniswap v4.
5972

60-
| Network | Address | Commit Hash | Version |
61-
|---------|---------|------------|---------|
62-
| Mainnet | 0xbbbb6FFaBCCb1EaFD4F0baeD6764d8aA973316B6 | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
63-
| Base | 0xC46143aE2801b21B8C08A753f9F6b52bEaD9C134 | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
64-
| Unichain | 0x435DDCFBb7a6741A5Cc962A95d6915EbBf60AE24 | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
73+
| Version | Chain | Address | Commit Hash |
74+
|---------|-------|---------|------------|
75+
| v2.0.0 | Mainnet | 0x65aF3B62EE79763c704f04238080fBADD005B332 | |
76+
| v2.0.0 | Unichain | 0xAa56d4d68646B4858A5A3a99058169D0100b38e2 | |
77+
| v2.0.0 | Base | 0x39E5eB34dD2c8082Ee1e556351ae660F33B04252 | |
78+
| v2.0.0 | Sepolia | 0x89Dd5691e53Ea95d19ED2AbdEdCf4cBbE50da1ff | |
6579

66-
### VirtualLBPStrategyFactory
80+
### AdvancedLBPStrategyFactory
81+
The AdvancedLBPStrategyFactory contract is deployed to different addresses on different networks as it uses the deployed Position Manager and Pool Manager contracts from Uniswap v4.
6782

68-
| Network | Address | Commit Hash | Version |
69-
|---------|---------|------------|---------|
70-
| Mainnet | 0x00000010F37b6524617b17e66796058412bbC487 | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
71-
| Sepolia | 0xC695ee292c39Be6a10119C70Ed783d067fcecfA4 | fd5be9b7a918ca3d925d985dff9bcde82b3b8a9d | v1.0.0-candidate |
83+
| Version | Chain | Address | Commit Hash |
84+
|---------|-------|---------|------------|
85+
| v2.0.0 | Mainnet | 0x982DC187cbeB4E21431C735B01Ecbd8A606129C5 | |
86+
| v2.0.0 | Unichain | 0xeB44195e1847F23D4ff411B7d501b726C7620529 | |
87+
| v2.0.0 | Base | 0x9C5A6fb9B0D9A60e665d93a3e6923bDe428c389a | |
88+
| v2.0.0 | Sepolia | 0xdC3553B7Cea1ad3DAB35cBE9d40728C4198BCBb6 | |
7289

7390
## Audits
74-
- 10/1 [OpenZeppelin](./docs/audit/Uniswap%20Token%20Launcher%20Audit.pdf)
75-
- 10/20 [ABDK Consulting](./docs/audit/ABDK_Uniswap_TokenLauncher_v_1_0.pdf)
76-
- 10/27 [Spearbit](./docs/audit/report-cantinacode-uniswap-token-launcher-1027.pdf)
91+
- 1/20/2026 [Spearbit](./docs/audit/uniswap-liquidity-launcher-v2.0.0.pdf)
92+
- 10/27/2025 [Spearbit](./docs/audit/report-cantinacode-uniswap-token-launcher-1027.pdf)
93+
- 10/20/2025 [ABDK Consulting](./docs/audit/ABDK_Uniswap_TokenLauncher_v_1_0.pdf)
94+
- 10/1/2025 [OpenZeppelin](./docs/audit/Uniswap%20Token%20Launcher%20Audit.pdf)
7795

7896
### Bug bounty
7997

@@ -83,97 +101,9 @@ The files under `src/` are covered under the Uniswap Labs bug bounty program [he
83101

84102
security@uniswap.org
85103

86-
## Core Components
87-
88-
### LiquidityLauncher
89-
90-
The main entry point contract that orchestrates token creation and distribution. It provides two primary functions:
91-
92-
`createToken` deploys a new token through a specified factory contract. The launcher supports different token standards including basic ERC20 tokens (UERC20) and Superchain tokens (USUPERC20) that can be deployed deterministically. Tokens are created with metadata support including description, website, and image URIs.
93-
94-
`distributeToken` transfers tokens to a distribution strategy which handles the actual distribution logic. The system uses Permit2 for efficient token transfers, allowing users to approve once and execute multiple transactions without additional approvals.
95-
96-
### Token Factories
97-
98-
The system includes two token factory implementations:
99-
100-
**UERC20Factory** creates standard ERC20 tokens with extended metadata. These tokens support Permit2 by default and include on-chain metadata storage. The factory uses CREATE2 for deterministic addresses based on token parameters.
101-
102-
**USUPERC20Factory** extends the basic factory with superchain capabilities. Tokens deployed through this factory can be created on multiple chains with the same address, though only the home chain holds the initial supply. This enables seamless cross-chain token deployment while maintaining consistency across networks.
103-
104-
### Distribution Strategies
105-
106-
The distribution system is modular, allowing different strategies to be implemented. The main implementation is:
107-
108-
**LBPStrategyBasic** implements a Liquidity Bootstrapping Pool strategy that splits the token supply between a price discovery auction and liquidity reserves. The auction determines the initial price, which is then used to bootstrap a Uniswap v4 pool. After the auction completes, the contract migrates the liquidity to v4, creating both a full-range position and potentially a one-sided position for optimal capital efficiency.
109-
110-
The strategy validates parameters to ensure reasonable configurations, such as checking tick spacing and fee tier validity.
111-
112-
**VirtualLBPStrategy** is a derived contract inheriting from LBPStrategyBasic which supports token vesting and other advanced features.
113-
114-
## Warnings
115-
116-
Users should be aware that it is trivially easy to create a LBPStrategy and corresponding Auction with malicious parameters. This can lead to a loss of funds or a degraded expereience. You must validate all parameters set on each contract in the system before interacting with them.
104+
### Whitepaper
117105

118-
Since the LBPStrategyBasic cannot control the final price of the Auction, or how much currency is raised, it is possible to create an Auction such that it is impossible to migrate the liquidity to v4. Users should be aware that malicious deployers can design such parameters to eventually sweep the currency and tokens from the contract.
119-
120-
We strongly recommend that a token with value such as ETH or USDC is used as the `currency`.
121-
122-
### Supporting Infrastructure
123-
124-
**Permit2Forwarder** handles token approvals through the Permit2 protocol, providing a unified approval interface that reduces the number of transactions users need to sign.
125-
126-
**HookBasic** provides Uniswap v4 hook functionality, allowing the LBP strategy to act as a hook for the pools it creates.
127-
128-
## Contract Interactions
129-
130-
### Typical Launch Flow
131-
132-
The typical flow for launching a token involves several coordinated steps:
133-
134-
#### 1. Token Creation and Distribution
135-
136-
- Use multicall to atomically call `LiquidityLauncher.createToken()` and `LiquidityLauncher.distributeToken()`
137-
- Set `payerIsUser = false` since tokens are already in the launcher after creation
138-
139-
For the LBP strategy, the distribution configuration includes:
140-
141-
- **Allocation Split**: Division between auction and liquidity reserves
142-
- **Pool Parameters**: Fee tier and tick spacing for the Uniswap v4 pool
143-
- **Auction Parameters**: Duration, pricing steps, and reserve price
144-
- **LP Recipient**: Address that will receive the liquidity position NFT
145-
146-
#### 2. Auction Phase
147-
148-
The distribution strategy deploys an auction contract and transfers the allocated tokens. The auction runs according to the specified parameters, allowing users to bid for tokens at decreasing prices.
149-
150-
#### 3. Price Discovery Notification
151-
152-
Once the auction completes, it transfers the raised funds to the LBP Strategy and the strategy
153-
grabs the final clearing price.
154-
155-
#### 4. Migration to Uniswap v4
156-
157-
After a configurable delay (`migrationBlock`), anyone can call `migrate()` to:
158-
159-
- Validate a v4 pool can be created
160-
- Initialize the Uniswap v4 pool at the discovered price
161-
- Deploy liquidity as a full-range position
162-
- Create an optional one-sided position
163-
- Transfer the LP NFT to the designated recipient
164-
165-
**Note:** To optimize gas costs, any minimal dust amounts are foregone and locked in the PoolManager rather than being swept at the end of the migration process.
166-
167-
## Key Interfaces
168-
169-
**ILiquidityLauncher** defines the main launcher interface for creating and distributing tokens.
170-
171-
**IDistributionContract** implemented by contracts that receive and distribute tokens. The `onTokensReceived()` callback ensures contracts are notified when they receive tokens.
172-
173-
**IDistributionStrategy** implemented by factory contracts that deploy distribution contracts. The `initializeDistribution()` function creates new distribution instances.
174-
175-
**ITokenFactory** defines the interface for token creation factories, standardizing how different token types are deployed.
106+
The [whitepaper](./docs/whitepaper.pdf) for Liquidity Launcher.
176107

177108
## License
178-
179-
The contracts are covered under the MIT License (`MIT`), see [MIT_LICENSE](./LICENSE).
109+
This repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.

0 commit comments

Comments
 (0)