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.

referencesVESTING.md

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

Vesting Mechanics

Linear token vesting for pre-allocated recipients in Doppler tokens.


VestingData Struct

struct VestingData {
    uint256 totalAmount;      // Total tokens allocated to this address
    uint256 releasedAmount;   // Tokens already claimed
}

Source: DERC20.sol (lines 60-63), Source: CloneERC20.sol (lines 46-49)


Vesting Formula

Linear vesting over vestingDuration seconds starting at vestingStart:

if (block.timestamp < vestingStart + vestingDuration) {
    vestedAmount = totalAmount * (block.timestamp - vestingStart) / vestingDuration;
} else {
    vestedAmount = totalAmount;  // Fully vested
}

availableAmount = vestedAmount - releasedAmount;

Source: DERC20.sol (lines 264-273)

Timeline:

vestingStart                     vestingStart + vestingDuration
     |--------------------------------|
     0%        linear growth        100%

Constraints

DERC20 (Standard Token)

Constraint Value Purpose
MAX_PRE_MINT_PER_ADDRESS_WAD 0.2 ether (20%) Cap per recipient
MAX_TOTAL_PRE_MINT_WAD 0.2 ether (20%) Cap for all vesting
MAX_YEARLY_MINT_RATE_WAD 0.02 ether (2%) Inflation cap

Source: DERC20.sol (lines 44-50)

CloneERC20 (Cloneable Token)

Constraint Value Purpose
MAX_PRE_MINT_PER_ADDRESS_WAD 0.8 ether (80%) Cap per recipient
MAX_TOTAL_PRE_MINT_WAD 0.8 ether (80%) Cap for all vesting
MAX_YEARLY_MINT_RATE_WAD 0.02 ether (2%) Inflation cap

Source: CloneERC20.sol (lines 33-39)


Release Function

Claims all available vested tokens to the caller:

function release() external hasVestingStarted {
    uint256 availableAmount = computeAvailableVestedAmount(msg.sender);
    getVestingDataOf[msg.sender].releasedAmount += availableAmount;
    _transfer(address(this), msg.sender, availableAmount);
}

Source: DERC20.sol (lines 253-257)

Key points:

  • Reverts if vestingStart == 0 (vesting not started)
  • Claims entire available amount (no partial claims)
  • Tokens held by contract until claimed

Initialization

Vesting recipients are set at token deployment:

constructor(
    ...
    uint256 vestingDuration_,
    address[] memory recipients_,  // Vesting recipients
    uint256[] memory amounts_,     // Amount per recipient
    ...
) {
    vestingStart = block.timestamp;
    vestingDuration = vestingDuration_;

    for (uint256 i; i < length; ++i) {
        getVestingDataOf[recipients_[i]].totalAmount += amounts_[i];
        // Validate per-address cap
        require(
            getVestingDataOf[recipients_[i]].totalAmount <= maxPreMintPerAddress,
            MaxPreMintPerAddressExceeded(...)
        );
        vestedTokens += amount;
    }

    // Validate total cap
    require(vestedTokens <= maxTotalPreMint, MaxTotalPreMintExceeded(...));

    // Mint vested tokens to contract (held until claimed)
    _mint(address(this), vestedTokens);

    // Mint remaining to recipient (typically Airlock)
    _mint(recipient, initialSupply - vestedTokens);
}

Source: DERC20.sol (lines 114-163)


Inflation Minting

Inflation minting can begin after pool unlock according to token configuration and schedule.

Source: DERC20.sol (lines 183-215)

Activation: Inflation starts when unlockPool() is called (after migration).


Errors

Error Cause
VestingNotStartedYet() Calling release() before vesting initialized
MaxPreMintPerAddressExceeded(amount, limit) Recipient allocation exceeds cap
MaxTotalPreMintExceeded(amount, limit) Total vesting exceeds cap
MaxTotalVestedExceeded(amount, limit) Vested amount >= initial supply
MaxYearlyMintRateExceeded(amount, limit) Mint rate > 2%
MintingNotStartedYet() Calling mintInflation() before unlockPool()

Example: Calculate Vesting

// Parameters
const vestingStart = 1700000000n;  // Unix timestamp
const vestingDuration = 31536000n; // 1 year in seconds
const totalAmount = 1000000n * 10n**18n; // 1M tokens

// Current time
const now = 1715000000n; // ~6 months later

// Calculate vested
const elapsed = now - vestingStart;
const vestedAmount = totalAmount * elapsed / vestingDuration;
// Result: ~476,190 tokens vested (47.6%)

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