Index of every page on this site: llms.txt
All skills
Run it yourself

Reference for Doppler token creation, vesting, inflation, and factory selection across DERC20, DERC2080, CloneERC20, and CloneDERC20VotesV2 paths.

Use this Skill: https://skilld.dev/gh/whetstoneresearch/doppler-skills/token-lifecycle

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesFACTORIES.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Token Factories

Deployment patterns for Doppler tokens via factory contracts.


Factory Types

Factory Token Type Deployment Gas Cost
TokenFactory DERC20 CREATE2 Higher
CloneERC20Factory CloneERC20 ERC1167 proxy Lower

TokenFactory

Deploys full DERC20 tokens using CREATE2 for deterministic addresses.

function create(
    uint256 initialSupply,
    address recipient,      // Receives non-vested tokens (Airlock)
    address owner,          // Token owner (governance)
    bytes32 salt,           // Deterministic deployment salt
    bytes calldata data     // Encoded token parameters
) external returns (address)

Source: TokenFactory.sol (lines 20-51)

Token Data Encoding

bytes memory tokenData = abi.encode(
    string name,
    string symbol,
    uint256 yearlyMintRate,    // WAD-scaled (0.02e18 = 2%)
    uint256 vestingDuration,   // Seconds
    address[] recipients,      // Vesting recipients
    uint256[] amounts,         // Amounts per recipient
    string tokenURI            // Metadata URI
);

Features

  • Full DERC20 bytecode deployed
  • Includes ERC20Votes and ERC20Permit
  • Max 20% vesting cap
  • Higher gas cost but full feature set

CloneERC20Factory

Deploys minimal proxy clones pointing to a shared implementation.

function create(
    uint256 initialSupply,
    address recipient,
    address owner,
    bytes32 salt,
    bytes calldata tokenData
) external returns (address asset)

Source: CloneERC20Factory.sol (lines 44-75)

How It Works

  1. Factory deploys implementation contract in constructor
  2. create() clones the implementation via ERC1167
  3. Clone is initialized with provided parameters
constructor(address airlock_) ImmutableAirlock(airlock_) {
    IMPLEMENTATION = address(new CloneERC20());
    // Initialize implementation to prevent re-initialization attacks
    CloneERC20(IMPLEMENTATION).initialize(...);
}

function create(...) {
    asset = LibClone.cloneDeterministic(IMPLEMENTATION, salt);
    CloneERC20(asset).initialize(...);
}

Source: CloneERC20Factory.sol (lines 20-24, 61-74)

Features

  • Minimal proxy (ERC1167) pattern
  • Significantly lower deployment gas
  • Max 80% vesting cap
  • No voting rights
  • Uses Solady libraries

Token Data Parameters

Both factories accept the same encoded parameters:

Parameter Type Description
name string Token name (e.g., "My Token")
symbol string Token symbol (e.g., "MTK")
yearlyMintRate uint256 Inflation rate in WAD (max 0.02e18)
vestingDuration uint256 Vesting period in seconds
recipients address[] Addresses receiving vested tokens
amounts uint256[] Token amounts per recipient
tokenURI string Metadata URI for the token

Choosing a Factory

Use Case Recommended Factory
DAO with governance voting TokenFactory (DERC20)
Gas-sensitive deployment CloneERC20Factory
Need ERC20Permit TokenFactory (DERC20)
High vesting allocation (>20%) CloneERC20Factory
Standard token launch Either works

Deployment Example

// Via Airlock.create()
Airlock.create(
    CreateParams({
        initialSupply: 1_000_000 ether,
        numTokensToSell: 500_000 ether,
        numeraire: WETH,
        tokenFactory: address(cloneERC20Factory),
        tokenFactoryData: abi.encode(
            "My Token",           // name
            "MTK",                // symbol
            0.02 ether,           // 2% yearly mint rate
            365 days,             // 1 year vesting
            [founder, advisor],   // recipients
            [100_000 ether, 50_000 ether], // amounts
            "ipfs://..."          // tokenURI
        ),
        ...
    })
);

Variants

TokenFactory80 / DERC2080

Alternative factory with 80% vesting cap (like CloneERC20 but with voting):

Constant DERC20 DERC2080
Max per address 20% 80%
Max total 20% 80%

Source: DERC2080.sol, Source: TokenFactory80.sol

CloneERC20Votes / CloneERC20VotesFactory

Cloneable tokens WITH voting rights:

contract CloneERC20Votes is ERC20, ERC20Votes, Initializable, Ownable

Source: CloneERC20Votes.sol

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill is a technical reference for token lifecycle and factory deployment in the Doppler protocol, fetching verified source code from the official whetstoneresearch GitHub repository.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • Runlayer8mo

    3 files scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 4f654fe. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 9 months ago
metadata
{
  "author": "doppler",
  "version": "2.0"
}

README badge

README badge for whetstoneresearch/doppler-skills/token-lifecycle