Agent skill

Token Bonding Curves

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models.

MITAuto-check passed

Install Token Bonding Curves

skills CLI
$ npx skills add ccashwell/evm-cortex --skill token-bonding-curves -a claude-code

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

GitHub CLI
$ gh skill install ccashwell/evm-cortex token-bonding-curves --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/token-bonding-curves .claude/skills/token-bonding-curves && 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
token-bonding-curves
GitHub stars
131
Token cost
~1.6k tokens
SKILL.md length
205 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models.

  • Implementing bonding curve token sales
  • SKILL.md covers Concept, Curve Types, Linear Bonding Curve… and Bancor Formula, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Automated market makers with supply-dependent pricing

What it does

Token Bonding Curves is an agent skill from ccashwell/evm-cortex. Use when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models. Covers linear, polynomial, logarithmic, and Bancor-style curves.

Its SKILL.md is about 1.6k 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 bonding curve token sales
  • Automated market makers with supply-dependent pricing
  • Continuous token models

Example prompts

  • “/token-bonding-curves”

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

Token Bonding Curves loads about 1.6k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 205 words of instructions outside code blocks.

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

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). 205 words, ~1,615 tokens.

Download SKILL.mdSave it as .claude/skills/token-bonding-curves/SKILL.md (or your agent's skills folder).
name
token-bonding-curves
description
Use when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models. Covers linear, polynomial, logarithmic, and Bancor-style curves.

Token Bonding Curves

Concept

A bonding curve is a mathematical function that defines the price of a token as a function of its supply. As supply increases, price increases along the curve. Tokens are minted on buy and burned on sell, with a reserve backing the curve.

price = f(supply)
cost_to_buy(n) = integral(f, supply, supply + n)
proceeds_from_sell(n) = integral(f, supply - n, supply)

Curve Types

CurveFormulaBehavior
Linearprice = m * supply + bSteady price increase
Polynomialprice = a * supply^nAccelerating increase (n>1)
Logarithmicprice = a * ln(supply) + bDecelerating increase
Sigmoidprice = a / (1 + e^(-k*(supply-mid)))S-curve with plateau
Bancorprice = reserve / (supply * CW)Connector weight model

Linear Bonding Curve Implementation

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

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

contract LinearBondingCurve is ERC20, ReentrancyGuard {
    uint256 public immutable slope;      // price increase per token (in wei per token)
    uint256 public immutable basePrice;  // starting price (in wei per token)
    uint256 public reserveBalance;

    constructor(uint256 _slope, uint256 _basePrice)
        ERC20("BondingToken", "BOND")
    {
        slope = _slope;
        basePrice = _basePrice;
    }

    /// @notice Price at a given supply level
    function priceAtSupply(uint256 supply) public view returns (uint256) {
        return basePrice + (slope * supply / 1e18);
    }

    /// @notice Cost to buy `amount` tokens at current supply
    /// @dev Integral of linear function: base*amount + slope*(s1^2 - s0^2) / (2 * 1e18)
    function getBuyCost(uint256 amount) public view returns (uint256) {
        uint256 s0 = totalSupply();
        uint256 s1 = s0 + amount;
        uint256 baseCost = basePrice * amount / 1e18;
        uint256 slopeCost = slope * (s1 * s1 - s0 * s0) / (2 * 1e36);
        return baseCost + slopeCost;
    }

    /// @notice Proceeds from selling `amount` tokens at current supply
    function getSellProceeds(uint256 amount) public view returns (uint256) {
        uint256 s0 = totalSupply();
        require(amount <= s0, "exceeds supply");
        uint256 s1 = s0 - amount;
        uint256 baseCost = basePrice * amount / 1e18;
        uint256 slopeCost = slope * (s0 * s0 - s1 * s1) / (2 * 1e36);
        return baseCost + slopeCost;
    }

    function buy(uint256 minTokens) external payable nonReentrant {
        uint256 cost = getBuyCost(minTokens);
        require(msg.value >= cost, "insufficient payment");

        reserveBalance += cost;
        _mint(msg.sender, minTokens);

        uint256 refund = msg.value - cost;
        if (refund > 0) {
            (bool ok, ) = msg.sender.call{value: refund}("");
            require(ok, "refund failed");
        }

        emit Buy(msg.sender, minTokens, cost);
    }

    function sell(uint256 amount) external nonReentrant {
        require(balanceOf(msg.sender) >= amount, "insufficient balance");

        uint256 proceeds = getSellProceeds(amount);
        require(proceeds <= reserveBalance, "insufficient reserve");

        reserveBalance -= proceeds;
        _burn(msg.sender, amount);

        (bool ok, ) = msg.sender.call{value: proceeds}("");
        require(ok, "transfer failed");

        emit Sell(msg.sender, amount, proceeds);
    }

    event Buy(address indexed buyer, uint256 amount, uint256 cost);
    event Sell(address indexed seller, uint256 amount, uint256 proceeds);

    receive() external payable {}
}

Bancor Formula

The Bancor formula uses a Connector Weight (CW) to relate reserve balance, supply, and price:

price = reserveBalance / (supply * CW)
returnAmount = supply * ((1 + depositAmount / reserveBalance)^CW - 1)
solidity
/// @notice Bancor buy calculation using exponentiation by Taylor series
/// @param supply Current token supply
/// @param reserveBalance Current reserve balance
/// @param reserveRatio Reserve ratio (CW) in PPM (1-1000000)
/// @param depositAmount ETH/token deposited
function calculatePurchaseReturn(
    uint256 supply,
    uint256 reserveBalance,
    uint32 reserveRatio,
    uint256 depositAmount
) public pure returns (uint256) {
    if (reserveRatio == 1000000) {
        // Special case: CW = 100% -> linear
        return supply * depositAmount / reserveBalance;
    }
    // For fractional CW, use Power function (fixed-point math library)
    // return supply * (power(1 + depositAmount/reserveBalance, CW) - 1)
}

Polynomial Curve

solidity
// price = coefficient * supply^exponent
// cost = integral = coefficient * (s1^(exp+1) - s0^(exp+1)) / (exp+1)
function getPolynomialCost(uint256 amount) public view returns (uint256) {
    uint256 s0 = totalSupply();
    uint256 s1 = s0 + amount;
    uint256 exp1 = exponent + 1;
    return coefficient * (power(s1, exp1) - power(s0, exp1)) / exp1;
}

Buy/Sell Spread

Add a spread to capture value for the protocol:

solidity
uint256 public constant SELL_FEE_BPS = 300; // 3% sell fee

function sell(uint256 amount) external {
    uint256 grossProceeds = getSellProceeds(amount);
    uint256 fee = grossProceeds * SELL_FEE_BPS / 10000;
    uint256 netProceeds = grossProceeds - fee;
    // fee stays in reserve, increasing price floor for remaining holders
}

Checklist

  • Reserve balance always covers the integral under the curve for all outstanding tokens
  • Buy/sell functions use nonReentrant (ETH transfers create reentrancy risk)
  • Price function is monotonically increasing with supply
  • Integer math doesn't lose significant precision in curve calculations
  • Consider overflow in supply^n calculations for polynomial curves
  • Sell proceeds never exceed reserve balance
  • Front-running mitigation: slippage tolerance or commit-reveal
  • Test buy/sell round-trip: buy then immediately sell should have minimal loss (only spread)
  • Test extreme values: very large buys, selling entire supply

© 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/token-bonding-curves of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Token Bonding Curves 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.

Token Bonding Curves compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Token Bonding Curves this skillccashwell/evm-cortex131—~1.6kAutomated safety check: PassMIT
Autom AutomationComposioHQ/awesome-claude-skills77k3 repos~723Automated safety check: PassNone
Doppler Marketing Automation AutomationComposioHQ/awesome-claude-skills77k3 repos~809Automated safety check: PassNone
Suggest Automationsn8n-io/n8n207k—~2kAutomated safety check: PassCustom licence
Aero Workflow AutomationComposioHQ/awesome-claude-skills77k3 repos~753Automated safety check: PassNone
Anchor Browser AutomationComposioHQ/awesome-claude-skills77k3 repos~757Automated safety check: PassNone

Similar skills

  • Autom Automation

    ComposioHQ/awesome-claude-skills

    Automate Autom tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~723 tokens
    Productivity & AutomationAuto-check passed
  • Doppler Marketing Automation Automation

    ComposioHQ/awesome-claude-skills

    Automate Doppler Marketing Automation tasks via Rube MCP (Composio).

    77k GitHub starsUsed in 3 repos~809 tokens
    Productivity & AutomationAuto-check passed
  • Official

    Offer the three most common automations for a user as a single-choice card, from your own knowledge of their team and their apps, then build the one they choose once they confirm, or offer more.

    207k GitHub stars~2k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Aero Workflow Automation

    ComposioHQ/awesome-claude-skills

    Automate Aero Workflow tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~753 tokens
    Productivity & AutomationAuto-check passed
  • Anchor Browser Automation

    ComposioHQ/awesome-claude-skills

    Automate Anchor Browser tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~757 tokens
    Productivity & AutomationAuto-check passed
  • Automate This

    github/awesome-copilot

    Official

    Analyze a screen recording of a manual process and produce targeted, working automation scripts.

    40k GitHub starsUsed in 1 repo~3.1k tokens
    Media & CreativeAuto-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 Token Bonding Curves

What does Token Bonding Curves do?

A skill your agent uses when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models. Token Bonding Curves is an agent skill from ccashwell/evm-cortex. Use when implementing bonding curve token sales, automated market makers with supply-dependent pricing, or continuous token models.

When should I use Token Bonding Curves?

Token Bonding Curves fits situations like: implementing bonding curve token sales; automated market makers with supply-dependent pricing; continuous token models.

How do I install Token Bonding Curves in Claude Code?

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

How do I install Token Bonding Curves in Codex?

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

Can I use Token Bonding Curves 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 token-bonding-curves -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/token-bonding-curves, .gemini/skills/token-bonding-curves, .github/skills/token-bonding-curves and .opencode/skills/token-bonding-curves in your project.

What does Token Bonding Curves need to run?

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

Does Token Bonding Curves 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 Token Bonding Curves 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 Token Bonding Curves use?

Token Bonding Curves 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 Token Bonding Curves use?

About 1.6k tokens (SKILL.md is roughly 6.5k 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 Token Bonding Curves?

Skills that share tags, products or a category with Token Bonding Curves: Autom Automation (ComposioHQ/awesome-claude-skills, 77k stars), Doppler Marketing Automation Automation (ComposioHQ/awesome-claude-skills, 77k stars), Suggest Automations (n8n-io/n8n, 207k stars) and Aero Workflow Automation (ComposioHQ/awesome-claude-skills, 77k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Token Bonding Curves?

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.