curve-integration

curve-integration is a skill for Claude Code, Codex from ccashwell/evm-cortex. It costs 44 tokens per session (1,361 once invoked), scanned A, original, MIT.

An integration guide for Curve Finance, a blockchain platform for swapping tokens and providing liquidity in shared pools.

In plain words
What is it for?
Use it to build stablecoin or volatile-token swaps, add liquidity, work with meta-pools, or integrate gauge voting and rewards.
Why use it?
It helps developers choose the right pool model and apply the correct pricing, slippage, and reward-handling patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build stablecoin or volatile-token swaps, add liquidity, work with meta-pools, or integrate gauge voting and rewards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ccashwell/evm-cortex/curve-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ccashwell/evm-cortex --skill curve-integration
Clone the repo
git clone --depth 1 https://github.com/ccashwell/evm-cortex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for curve-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccashwell/evm-cortex/curve-integration/github.svg)](https://agentmods.dev/skills/ccashwell/evm-cortex/curve-integration)
Your own site
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/curve-integration"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/curve-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for curve-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccashwell/evm-cortex/curve-integration"><img src="https://agentmods.dev/badge/skills/ccashwell/evm-cortex/curve-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01361
Opus 5.5 $0.00018 $0.00544
Sonnet 5.5 $0.00009 $0.00272
Haiku 4.5 $0.00004 $0.00136

Measured 1mo ago against content hash 2a0ce5a3d011, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

curve-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/curve-integration/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Curve Finance Integration

Pool Types

Pool Type Use Case Math
StableSwap Pegged assets (USDC/USDT/DAI) Hybrid constant-sum/constant-product
CryptoSwap Volatile pairs (ETH/CRV) Dynamic peg with internal oracle
Meta-pool Pairs against 3pool LP (fraxBP) Nested pool composition
Tricrypto Three volatile assets Generalized crypto invariant

StableSwap Amplification Parameter (A)

The invariant is a blend of constant-sum (A = infinity) and constant-product (A = 0):

A * n^n * sum(x_i) + D = A * D * n^n + D^(n+1) / (n^n * prod(x_i))
  • Higher A: tighter peg, lower slippage near peg, catastrophic slippage far from peg
  • Lower A: behaves more like Uniswap constant-product
  • Typical A: 100-2000 for stablecoin pools

Core Swap Interface

interface ICurvePool {
    // Exchange tokens within the pool
    // i = input token index, j = output token index
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external returns (uint256);

    // For ETH pools, send ETH as msg.value
    function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy)
        external payable returns (uint256);

    // Get expected output (use for quoting, NOT as min_dy)
    function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256);

    // Liquidity operations
    function add_liquidity(uint256[3] calldata amounts, uint256 min_mint_amount) external returns (uint256);
    function remove_liquidity(uint256 _amount, uint256[3] calldata min_amounts) external returns (uint256[3] memory);
    function remove_liquidity_one_coin(uint256 _amount, int128 i, uint256 min_amount) external returns (uint256);

    function get_virtual_price() external view returns (uint256);
    function A() external view returns (uint256);
    function balances(uint256 i) external view returns (uint256);
}

Safe Swap Pattern

contract CurveSwapper {
    ICurvePool public immutable pool;
    uint256 public constant MAX_SLIPPAGE_BPS = 50; // 0.5%

    constructor(address _pool) {
        pool = ICurvePool(_pool);
    }

    function swap(
        int128 tokenIn,
        int128 tokenOut,
        uint256 amountIn,
        address recipient
    ) external returns (uint256 amountOut) {
        IERC20(pool.coins(uint256(int256(tokenIn)))).transferFrom(
            msg.sender, address(this), amountIn
        );
        IERC20(pool.coins(uint256(int256(tokenIn)))).approve(address(pool), amountIn);

        uint256 expected = pool.get_dy(tokenIn, tokenOut, amountIn);
        uint256 minOut = expected * (10000 - MAX_SLIPPAGE_BPS) / 10000;

        amountOut = pool.exchange(tokenIn, tokenOut, amountIn, minOut);

        IERC20(pool.coins(uint256(int256(tokenOut)))).transfer(recipient, amountOut);
    }
}

Read the full file on GitHub · 143 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 143 lines · 44 tokens per session scan A 2a0ce5a3d011

Subscribe to this mod's changes

curve-integration is a skill published in the GitHub repository ccashwell/evm-cortex (131 stars, last pushed 17d ago), licensed MIT. It adds 44 tokens to every session and 1,361 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.