Smart contracts for token deployment on Uniswap V4. This repo contains onchain code for token deployment, token pre-launch distribution, and LP fee management.
When tokens are deployed, dynamic fee Uniswap V4 pools are created using custom hooks. Users are able to choose between static or dynamic fee pools. All user LP fees can be collected on the ClankerFeeLocker contract and can be managed on the ClankerLpLocker contract.
- Clanker: 0x1525fE6d64235e2E27396748eccDF9BA4b0512aB
- ClankerFeeLocker: 0x737Ab4Af4f4d2FC4a52D1399f70a33E390499f8E
- HookDeployer: 0x425F8F1b6660175dCaB8b7e06Ee7d5e8e52f1E0B
- ClankerHookStaticFee: 0x73E74c090446ad7c9745EBa3c26F3E1a9680E8CC
- ClankerHookDynamicFee: 0xab29E4cb49980a6aC152515bb69470e0dEDC68cC
- ClankerHookStaticFeeV2: 0x1f6C7744a0B0393db8E96D3aaA023146828028cC
- ClankerHookDynamicFeeV2: 0x7deBE6943ACEFE85c4EE81Aadd736466e07528cC
- ClankerPoolExtensionAllowlist: 0x965B1640e5ea6168c5Bb5d7e1b6791d98B7B3c74
- ClankerLpLockerMultiple: 0x3Fa6e767B48e0f24aF3753F432669C1ac2bd7437
- ClankerMevBlockDelay: 0x95a533Ff8D88885D845380830133f7d83441994d
- ClankerMevTimeDelay: 0x72D44705AcAD6E449d55A00b0653948CCD0d721B
- ClankerSniperAuctionV0: 0x5652A06e8733a7f9DEDb1398E0C3E972a8f01030
- ClankerSniperAuctionV2: 0x65186f1c2a6AddE9f8BeC91D89D54DBfeD4Ba7a4
- ClankerVault: 0xAc94FBBd8FE7Ca4ce453d8B589aC4f2A367c6105
- ClankerAirdrop: 0xe6B17FC6F534b4c1808e82241f94c7d85a02ea9a
- ClankerAirdropV2: 0xe98087772a6285EE82e2156c98FCc24a40f0f344
- ClankerUniv4EthDevBuy: 0xb189aF8AC989107c2F7B72aAC0C8F6a1F0f25F05
Token deployers should use the Clanker::deployToken() function to deploy tokens. Deployers are able to configure the deployments in a variety of ways, including:
- Sending portions of the token supply to a vault or airdrop via
Extensions - Splitting the LP rewards between multiple recipients
- Specifying multiple initial liquidity positions with custom tick ranges
- Performing devBuys from the pool during token launch
- Choosing between
Note that the follow parameters are needed for deployment:
// callable by anyone when the factory is not deprecated
function deployToken(DeploymentConfig memory deploymentConfig)
external
payable
returns (address tokenAddress);
/**
* Configuration settings for token creation
*/
struct DeploymentConfig {
TokenConfig tokenConfig;
PoolConfig poolConfig;
LockerConfig lockerConfig;
MevModuleConfig mevModuleConfig;
ExtensionConfig[] extensionConfigs;
}
struct TokenConfig {
address tokenAdmin;
string name;
string symbol;
bytes32 salt;
string image;
string metadata;
string context;
uint256 originatingChainId;
}
struct PoolConfig {
address hook;
address pairedToken;
int24 tickIfToken0IsClanker;
int24 tickSpacing;
bytes poolData;
}
struct LockerConfig {
address locker;
// reward info
address[] rewardAdmins;
address[] rewardRecipients;
uint16[] rewardBps;
// liquidity placement info
int24[] tickLower;
int24[] tickUpper;
uint16[] positionBps;
bytes lockerData;
}
struct ExtensionConfig {
address extension;
uint256 msgValue;
uint16 extensionBps;
bytes extensionData;
}
struct MevModuleConfig {
address mevModule;
bytes mevModuleData;
}