You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_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.
4
4
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)
8
11
12
+
## Overview
13
+
Liquidity Launcher provides a streamlined approach for projects to:
9
14
-**Create** new ERC20 tokens with extended metadata and cross-chain capabilities
10
15
-**Distribute** tokens through customizable strategies
11
16
-**Bootstrap** liquidity using price discovery mechanisms
12
17
-**Deploy** automated market making pools on Uniswap v4
13
18
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.
21
20
22
21
## Installation
22
+
This project uses Foundry for development and testing. To get started:
The LiquidityLauncher contract can be deployed to the same address on all networks with the canonical Permit2 deployment address (0x000000000022D473030F116dDEE9F6B43aC78BA3).
> No changes have been made to the LiquidityLauncher contract since v1.0.0.
57
69
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.
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.
@@ -83,97 +101,9 @@ The files under `src/` are covered under the Uniswap Labs bug bounty program [he
83
101
84
102
security@uniswap.org
85
103
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
117
105
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.
176
107
177
108
## 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