Skip to content

Nemil21/v4-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v4-contracts

Smart contracts for token deployment on Uniswap V4. This repo contains onchain code for token deployment, token pre-launch distribution, and LP fee management.

Fee structure and rewards

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.

Deployed Contracts

Base Mainnet

Core Contracts

Hooks

LP Lockers

MEV Modules

Extensions

Usage

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;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors