Skip to content

withtally/Uniswap-CCA-Token-Launcher-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CCA Token Launcher

CCA Token Launcher Boilerplate

A starter kit for building fair token launch platforms on Uniswap V4

Quick Start · Packages · How It Works · Networks


This code is unaudited. The contracts are not safe for production use. Do not deploy with real funds without a thorough, independent security audit.

What This Is

This is a boilerplate monorepo for building a token launch platform using Uniswap V4's Continuous Clearing Auction (CCA) mechanism. It gives you everything you need out of the box: smart contracts, a blockchain indexer, a web frontend, and a TypeScript SDK.

Fork it, customize it, and build your own launch platform.

Quick Start

Prerequisites: Node.js 20+, Yarn, Foundry

git clone https://github.com/dennisonbertram/Uniswap-CCA-Token-Launcher-Boilerplate.git
cd Uniswap-CCA-Token-Launcher-Boilerplate
yarn install

Set up environment variables:

cp packages/indexer/.env.example packages/indexer/.env.local
cp packages/frontend/.env.example packages/frontend/.env.local

Add your keys to each .env.local:

Variable Where Required
ALCHEMY_API_KEY Indexer Yes
NEXT_PUBLIC_ALCHEMY_API_KEY Frontend Yes
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID Frontend Yes

Run everything locally:

yarn dev:full             # Anvil fork + indexer + frontend
yarn dev:full --automine  # Same, with instant blocks

Or run packages individually:

yarn dev:frontend         # Next.js frontend only
yarn dev:indexer          # Ponder indexer only
cd packages/contracts && forge test   # Run contract tests

Packages

Package Stack Purpose
contracts Foundry Solidity contracts -- auction, vesting, fee splitting, token creation
frontend Next.js Web UI for creating launches and placing bids
indexer Ponder Indexes on-chain events, serves GraphQL + REST APIs
sdk TypeScript Programmatic interface for integrating with the protocol

Each package has its own README with detailed setup instructions.

How It Works

Bidders submit ETH during a timed auction window. A single clearing price is determined from aggregate supply and demand. All raised ETH flows directly into a Uniswap V4 liquidity pool -- none is retained by the issuer. Team and investor allocations are vested atomically via Sablier.

Bidders --> CCA Auction --> Clearing Price --> Uniswap V4 LP
                                 |
                          Vesting Streams (Sablier)

Contract architecture:

LaunchOrchestrator (entry point)
 |- VotesERC20Factory         Create the token
 |- LiquidityLauncher         Start the CCA auction
 |- FeeSplitterFactory        Deploy fee-splitting LP holder
 |- VestingDistributor        Create Sablier vesting streams
 '- FeeSplittingPositionRecipient   Hold LP NFT, collect V4 fees

Networks

Core contracts are deployed at identical addresses across all supported chains via CREATE2:

Network Chain ID CCAFactory
Ethereum 1 0x0000ccaDF55C911a2FbC0BB9d2942Aa77c6FAa1D
Base 8453 0x0000ccaDF55C911a2FbC0BB9d2942Aa77c6FAa1D
Unichain 130 0x0000ccaDF55C911a2FbC0BB9d2942Aa77c6FAa1D

Full address list: docs/reference/contract-addresses.md

Documentation

Topic Location
System design docs/architecture/
Contract addresses & ABIs docs/reference/
Security analysis docs/security/

Security

This is a boilerplate. The contracts have not been professionally audited. See docs/security/ for internal analysis and known considerations. Do not use in production without a full independent security review.

Contributing

See CONTRIBUTING.md. Report security issues via SECURITY.md.

License

MIT -- Copyright (c) 2024 Dennison Bertram

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors