Agent skill

Liquidity Mining

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution.

MITAuto-check passed

Install Liquidity Mining

skills CLI
$ npx skills add ccashwell/evm-cortex --skill liquidity-mining -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex liquidity-mining --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/liquidity-mining .claude/skills/liquidity-mining && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
liquidity-mining
GitHub stars
131
Token cost
~1.8k tokens
SKILL.md length
109 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution.

  • Implementing liquidity mining programs
  • SKILL.md covers MasterChef Architecture, MasterChef-Style Implementation, Emission Schedule Patterns and Gauge-Based Allocation, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • LP incentive systems

What it does

Liquidity Mining is an agent skill from ccashwell/evm-cortex. Use when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution. Covers emission schedules, gauge systems, boost mechanics, and reward claiming.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Implementing liquidity mining programs
  • LP incentive systems
  • MasterChef-style reward distribution

Example prompts

  • “/liquidity-mining”

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are solidity).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Liquidity Mining loads about 1.8k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 109 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 109 words, ~1,847 tokens.

Download SKILL.mdSave it as .claude/skills/liquidity-mining/SKILL.md (or your agent's skills folder).
name
liquidity-mining
description
Use when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution. Covers emission schedules, gauge systems, boost mechanics, and reward claiming.

Liquidity Mining Patterns

MasterChef Architecture

The MasterChef pattern distributes a fixed emission rate across multiple pools, weighted by allocation points. Each pool accrues rewards to its stakers using the Synthetix per-token accumulator.

Pool reward rate = totalEmission * pool.allocPoint / totalAllocPoint
User reward = user.amount * (pool.accRewardPerShare - user.rewardDebt)

MasterChef-Style Implementation

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

contract MasterChef is Ownable {
    using SafeERC20 for IERC20;

    struct UserInfo {
        uint256 amount;      // LP tokens staked
        uint256 rewardDebt;  // subtracted from accumulated reward
    }

    struct PoolInfo {
        IERC20 lpToken;
        uint256 allocPoint;
        uint256 lastRewardTime;
        uint256 accRewardPerShare; // scaled by 1e12
    }

    IERC20 public immutable rewardToken;
    uint256 public rewardPerSecond;
    uint256 public totalAllocPoint;

    PoolInfo[] public poolInfo;
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    constructor(IERC20 _rewardToken, uint256 _rewardPerSecond) Ownable(msg.sender) {
        rewardToken = _rewardToken;
        rewardPerSecond = _rewardPerSecond;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function addPool(uint256 _allocPoint, IERC20 _lpToken) external onlyOwner {
        totalAllocPoint += _allocPoint;
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardTime: block.timestamp,
            accRewardPerShare: 0
        }));
    }

    function setPool(uint256 _pid, uint256 _allocPoint) external onlyOwner {
        totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    function pendingReward(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo memory user = userInfo[_pid][_user];
        uint256 accRewardPerShare = pool.accRewardPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));

        if (block.timestamp > pool.lastRewardTime && lpSupply > 0) {
            uint256 elapsed = block.timestamp - pool.lastRewardTime;
            uint256 reward = elapsed * rewardPerSecond * pool.allocPoint / totalAllocPoint;
            accRewardPerShare += reward * 1e12 / lpSupply;
        }

        return user.amount * accRewardPerShare / 1e12 - user.rewardDebt;
    }

    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) return;

        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }

        uint256 elapsed = block.timestamp - pool.lastRewardTime;
        uint256 reward = elapsed * rewardPerSecond * pool.allocPoint / totalAllocPoint;
        pool.accRewardPerShare += reward * 1e12 / lpSupply;
        pool.lastRewardTime = block.timestamp;
    }

    function deposit(uint256 _pid, uint256 _amount) external {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);

        if (user.amount > 0) {
            uint256 pending = user.amount * pool.accRewardPerShare / 1e12 - user.rewardDebt;
            if (pending > 0) {
                rewardToken.safeTransfer(msg.sender, pending);
            }
        }

        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
            user.amount += _amount;
        }

        user.rewardDebt = user.amount * pool.accRewardPerShare / 1e12;
        emit Deposit(msg.sender, _pid, _amount);
    }

    function withdraw(uint256 _pid, uint256 _amount) external {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "insufficient balance");
        updatePool(_pid);

        uint256 pending = user.amount * pool.accRewardPerShare / 1e12 - user.rewardDebt;
        if (pending > 0) {
            rewardToken.safeTransfer(msg.sender, pending);
        }

        if (_amount > 0) {
            user.amount -= _amount;
            pool.lpToken.safeTransfer(msg.sender, _amount);
        }

        user.rewardDebt = user.amount * pool.accRewardPerShare / 1e12;
        emit Withdraw(msg.sender, _pid, _amount);
    }

    function emergencyWithdraw(uint256 _pid) external {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(msg.sender, amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
}

Emission Schedule Patterns

solidity
// Halving schedule (like BTC)
function getRewardPerSecond() public view returns (uint256) {
    uint256 epoch = (block.timestamp - startTime) / EPOCH_DURATION;
    return initialRate >> epoch; // halve each epoch
}

// Linear decay
function getRewardPerSecond() public view returns (uint256) {
    uint256 elapsed = block.timestamp - startTime;
    if (elapsed >= totalDuration) return 0;
    return initialRate * (totalDuration - elapsed) / totalDuration;
}

Gauge-Based Allocation

Instead of owner setting allocPoints, let token holders vote on pool weights:

solidity
mapping(uint256 => uint256) public poolVotes; // pid -> total votes
mapping(address => mapping(uint256 => uint256)) public userVotes;

function vote(uint256 _pid, uint256 _weight) external {
    uint256 votingPower = veToken.balanceOf(msg.sender);
    require(_weight <= votingPower - usedVotes[msg.sender], "exceeded voting power");
    poolVotes[_pid] += _weight;
    userVotes[msg.sender][_pid] += _weight;
    usedVotes[msg.sender] += _weight;
    // allocPoints recalculated from poolVotes at epoch boundaries
}

Checklist

  • updatePool() called before any deposit/withdraw
  • rewardDebt updated after every balance change
  • emergencyWithdraw skips reward calculation (safety valve)
  • Pool allocation changes via massUpdatePools() to prevent stale accrual
  • Emission rate accounts for actual reward token balance
  • No duplicate LP token addresses across pools
  • Test reward distribution across multiple users and pools
  • Verify no reward loss from rounding in accRewardPerShare

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/liquidity-mining of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Liquidity Mining next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Liquidity Mining compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Liquidity Mining this skillccashwell/evm-cortex131—~1.8kAutomated safety check: PassMIT
Liquidation Heatmap AnalysisHKUDS/Vibe-Trading35k—~3kAutomated safety check: PassMIT
Strict Programming Practicescode-yeongyu/oh-my-openagent70k—~9.5kAutomated safety check: PassCustom licence
Referral Programalirezarezvani/claude-skills28k—~3.4kAutomated safety check: PassMIT
Swiftui Liquid Glasssickn33/agentic-awesome-skills47k2 repos~1kAutomated safety check: PassMIT
Soroban Liquidity Poolsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Reads open-position data and liquidation heatmaps to find liquidation clusters, cascade risk and stop-hunt zones, and uses them as support and resistance signals.

    35k GitHub stars~3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Strict Programming Practices

    code-yeongyu/oh-my-openagent

    Applies strict, type-first coding rules for Python, Rust, TypeScript and Go, loading the matching language reference before the agent writes or edits any code.

    70k GitHub stars~9.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Referral Program

    alirezarezvani/claude-skills

    When the user wants to design, launch, or optimize a referral or affiliate program.

    28k GitHub stars~3.4k tokensUpdated 1 mo ago
    Marketing & SEOAuto-check passed
  • Swiftui Liquid Glass

    sickn33/agentic-awesome-skills

    Implement or review SwiftUI Liquid Glass APIs with correct fallbacks and modifier order.

    47k GitHub starsUsed in 2 repos~1k tokens
    MobileAuto-check passed
  • Soroban Liquidity Pool

    sickn33/agentic-awesome-skills

    Automated market maker liquidity pool register: constant-product invariant curves, swap fee tiers, and LP token shares for Soroban DeFi.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • iOS 26 液态玻璃设计系统 — 适用于 SwiftUI、UIKit 和 WidgetKit 的动态玻璃材质,具有模糊、反射和交互式变形效果。

    276k GitHub starsUsed in 3 repos~1.7k tokens
    MobileAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 10 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 10 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 10 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 10 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 10 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 10 days ago
    Auto-check passed

Questions about Liquidity Mining

What does Liquidity Mining do?

A skill your agent uses when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution. Liquidity Mining is an agent skill from ccashwell/evm-cortex. Use when implementing liquidity mining programs, LP incentive systems, or MasterChef-style reward distribution.

When should I use Liquidity Mining?

Liquidity Mining fits situations like: implementing liquidity mining programs; LP incentive systems; masterChef-style reward distribution.

How do I install Liquidity Mining in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill liquidity-mining -a claude-code`. Or copy the skill folder (skills/liquidity-mining in ccashwell/evm-cortex) into .claude/skills/liquidity-mining in your project. Claude Code loads it when a task matches its description.

How do I install Liquidity Mining in Codex?

Run `npx skills add ccashwell/evm-cortex --skill liquidity-mining -a codex`. Or copy the skill folder (skills/liquidity-mining in ccashwell/evm-cortex) into .agents/skills/liquidity-mining in your project. Codex loads it when a task matches its description.

Can I use Liquidity Mining in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill liquidity-mining -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/liquidity-mining, .gemini/skills/liquidity-mining, .github/skills/liquidity-mining and .opencode/skills/liquidity-mining in your project.

What does Liquidity Mining need to run?

SKILL.md names no scripts, command-line tools or credentials: Liquidity Mining is instructions for the agent only.

Does Liquidity Mining access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Liquidity Mining safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Liquidity Mining use?

Liquidity Mining is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Liquidity Mining use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Liquidity Mining?

Skills that share tags, products or a category with Liquidity Mining: Liquidation Heatmap Analysis (HKUDS/Vibe-Trading, 35k stars), Strict Programming Practices (code-yeongyu/oh-my-openagent, 70k stars), Referral Program (alirezarezvani/claude-skills, 28k stars) and Swiftui Liquid Glass (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Liquidity Mining?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.