No partner integrations
This repository contains smart contracts for the LGE (Liquidity Generation Event) - a novel liquidity-first mechanism for launching new tokens on Uniswap v4. Creators bootstrap liquidity with a dutch auction. Only if 100% liquidity is achieved is the LGE a success, otherwise participants claim their ETH back loosing nothing.
- LGEManager.sol - Factory Contract.
The main entry point for deploying new LGE campaigns.
Key Features:
- Deploys an ERC20 token;
- Deploys a hook along with the token;
- LGEToken.sol - ERC20 Token.
A capped ERC20 token with administrative functions.
Key Features:
- Fixed total supply - 17,745,440,000 tokens, 18 decimals;
- Burnable tokens;
- Capped total supply;
- Admin-controlled metadata and image updates;
- Minting restricted to the LGE hook only;
- LGEHook.sol - Uniswap v4 Hook.
The core LGE mechanism that handles deposits, liquidity provision, and pool creation.
Key Features:
- LGE duration: 5,000 blocks;
- deposit() function: users deposit ETH to purchase tokens at the calculated price;
- withdraw() function: retrieve ETH if LGE fails;
- claimLiquidity() function: claim LP position after successful LGE;
- LGECalculationsLibrary.sol - Price Calculations.
Helper library for price and liquidity calculations.
Key Features:
- Calculates token price based on min/max values, current block, and a start block;
- Calculates sqrt for the pool initialisation;
- Dynamic Pricing: Token price decreases linearly from
maxTokenPricetominTokenPriceover the stream period - Deposit Structure: Users deposit ETH where:
- 50% goes toward liquidity provision
- 50% remains for rewards and tokenomics
- Fair Distribution: Dutch auction prevents sniping, ensures early buyers don't have unfair advantage and allows price discover.
Success Criteria: All tokens (cap amount) must be sold.
If successful:
- Uniswap v4 pool is automatically created
- Initial liquidity is added (50% of ETH + all tokens)
- Pool parameters (may change for MVP based on feedback and more testing):
- Fee: 1% (10,000 basis points)
- Tick spacing: 1
- Full range liquidity (MIN_TICK to MAX_TICK)
If failed:
- Users can withdraw their deposited ETH
The current open issue is the precision loss that happens during minting a position. It uses exact half of the ETH needed to mint a liquidity, however it also uses smaller amount of tokens. Ideally, what we want to achieve is using exact amount of ETH + exact amount of tokens to create a liquidity position. We're currently investigating the best way to achieve this with minimal precision loss.
Current test coverage is ~80%. The main tests are located in the test directory, LGEHook.t.sol. The tests cover various scenarios, including successful and failed LGEs.
Ethereum Sepolia Testnet (not verified)
| Contract Name | Contract Address |
|---|---|
| LGEManager | 0x80b151Bd4Ed017692F395E2F0395f0c84071A56B |
| LGECalculationsLibrary | 0x74C6B2321BeD36FB92E9c88fc33D2A77ED7bBe57 |
MIT

