Agent skill

Economic Design Audit

by PlamenTSV in PlamenTSV/plamen

Trigger Pattern MONETARYPARAMETER flag (fee, rate, emission, cap, bps values) - Inject Into Breadth agents (merged via M4 hierarchy)

MITAuto-check passedSecurity

Install Economic Design Audit

skills CLI
$ npx skills add PlamenTSV/plamen --skill economic-design-audit -a claude-code

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

GitHub CLI
$ gh skill install PlamenTSV/plamen economic-design-audit --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/PlamenTSV/plamen.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/soroban/economic-design-audit .claude/skills/economic-design-audit && 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
economic-design-audit
GitHub stars
303
Token cost
~2.1k tokens
SKILL.md length
829 words
Files
1
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Trigger Pattern MONETARYPARAMETER flag (fee, rate, emission, cap, bps values) - Inject Into Breadth agents (merged via M4 hierarchy)

  • Works in 7 steps: Parameter Boundary Analysis → Economic Invariant Identification → Rate/Supply Interaction Matrix → …
  • Pattern MONETARYPARAMETER flag (fee
  • SKILL.md covers 1. Parameter Boundary Analysis, 2. Economic Invariant…, 3. Rate/Supply Interaction… and 4. Fee Formula Verification at…, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Economic Design Audit is an agent skill from PlamenTSV/plamen. Trigger Pattern MONETARYPARAMETER flag (fee, rate, emission, cap, bps values) - Inject Into Breadth agents (merged via M4 hierarchy)

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

It sits in Security, covering Design review and critique and Smart contract auditing. It works with Stellar. The repository describes itself as: Autonomous Web3 security audit agent for Claude Code. The licence is MIT.

When your agent uses it

  • Pattern MONETARYPARAMETER flag (fee
  • Bps values) - Inject Into Breadth agents (merged via M4 hierarchy)

Example prompts

  • “/economic-design-audit”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Parameter Boundary Analysis
  2. Economic Invariant Identification
  3. Rate/Supply Interaction Matrix
  4. Fee Formula Verification at Normal Values
  5. Emission/Inflation Sustainability
  6. Resource Metering and Cost Economics
  7. TTL Cost Economics (Soroban-Specific)

What it can do on your machine

Read from SKILL.md and the folder at commit 795962b. 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 markdown).

    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

Economic Design Audit loads about 2.1k tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 829 words of instructions outside code blocks.

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

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 PlamenTSV/plamen at commit 795962b, republished under its MIT licence (© PlamenTSV). 829 words, ~2,088 tokens.

Download SKILL.mdSave it as .claude/skills/economic-design-audit/SKILL.md (or your agent's skills folder).
name
economic-design-audit
description
Trigger Pattern MONETARY_PARAMETER flag (fee, rate, emission, cap, bps values) - Inject Into Breadth agents (merged via M4 hierarchy)

ECONOMIC_DESIGN_AUDIT Skill (Soroban)

Trigger Pattern: MONETARY_PARAMETER flag (required) Inject Into: Breadth agents (merged via M4 hierarchy) Finding prefix: [EDA-N] Rules referenced: R2, R10, R13, R14

rate|rebase|supply|burn|emission|inflation|peg|price_cap|price_floor|
fee|reward_rate|basis_points|bps|fee_bps|spread

Soroban arithmetic context: All numeric values use i128 (signed 128-bit). No floating-point. Fee/rate formulas use integer multiply-then-divide. Overflow panics unless checked_* used; unchecked release-mode i128 wraps silently. Division truncates toward zero.


1. Parameter Boundary Analysis

For every monetary parameter setter (rate, fee, reward rate, emission, cap, floor, BPS values):

ParameterSetter FunctionMin ValueMax ValueEnforced?Impact at MinImpact at Max

For each: substitute min and max into ALL consuming functions. Tag: [BOUNDARY:param=val -> outcome]

Soroban-specific boundary checks:

  • Does MAX cause i128 overflow in multiply-then-divide? (amount * rate_bps overflows before division if both are large; check for checked_mul)
  • Does 0 cause division-by-zero? (panic aborts entire transaction — verify .checked_div() or explicit guard)
  • Does 10_000 BPS (100%) cause user to receive 0 tokens or go negative with fees-on-fees?
  • Does a negative i128 value cause unexpected behavior? (signed type allows negative rates if not bounds-checked)

2. Economic Invariant Identification

List all economic invariants the protocol must maintain:

InvariantParameters InvolvedCan Admin Break It?Functions That Assume It

For each setter: can changing this parameter break an invariant that user-facing functions depend on? If yes → finding.

Soroban-specific invariants:

  • i128 conservation: Total tracked must equal sum of individual claims. Verify no rounding loss accumulates across many users.
  • No negative balances: i128 allows negative values — if subtraction underflows without checked math, balance can go negative silently.
  • TTL-gated invariants: If a key expires and returns None, unwrap() panics; unwrap_or(0) may silently break the invariant.

3. Rate/Supply Interaction Matrix

For protocols with multiple monetary parameters that interact:

Parameter AParameter BInteractionCan A x B Produce Extreme Output?

Check: can two independently-valid settings combine to create an extreme economic state? (Rule 14 constraint coherence)


4. Fee Formula Verification at Normal Values

4a. Concrete Example Computation

Pick 3 representative fee rates and trace through the actual code formula:

Fee ParamValueFormulaInput Amount (i128)Expected OutputActual OutputMatch?

Tag: [BOUNDARY:fee_bps={val} -> effective_rate={computed_rate}]

Note: XLM uses 7 decimal places (1 XLM = 10_000_000 stroops). Verify formulas account for correct denomination.

Red flags:

  • Gross-up formulas: amount * MAX / (MAX - fee) charges higher effective rate than fee/MAX
  • Fee-on-fee: fee A's output feeds fee B's input — combined rate is not A + B
  • Rounding direction: i128 division truncates toward zero — verify intended direction
  • Division order: amount * rate / MAX vs amount / MAX * rate — second loses precision for small amounts
4d. Fee-Base Consistency

For every fee computation, trace the base amount through ALL subsequent code paths:

Fee SiteBase Amount VariableModified After Fee?Modified HowFee Recomputed?Overcharge?

Methodology: Identify fee base variable → trace FORWARD → if variable reduced (capped, slippage-adjusted) AFTER fee computed → fee charged on larger base than processed.

4b. Fee Interaction Matrix

For protocols with multiple fee types:

Fee AFee BA Output Feeds B Input?Combined Effective RateIndependent Rate SumDiscrepancy?
Show full SKILL.md (342 more words)Show less
4c. Fee Impact on Share Price

If share-based accounting: does fee deduction change share price? Does it create deposit-vs-immediate-withdrawal spread? With i128 rounding, does deposit vs withdraw favor one direction consistently?


5. Emission/Inflation Sustainability

For protocols with emission/inflation/reward distribution:

  • Maximum emission rate over 1 ledger / 1 day / 1 year?
  • Can emissions exceed reward vault's token balance?
  • Supply cap? Can admin bypass it?
  • What happens when reward vault depleted? (panic on transfer? zero rewards? proportional reduction?)
Emission ParameterMax RateVault Balance RequiredLedgers to Depletion at MaxCap Exists?

6. Resource Metering and Cost Economics

Soroban meters resources across CPU instructions, memory (bytes), and ledger I/O (entries read + written) — all per-transaction budgeted and network-configurable.

For batch operations (mass distributions, multi-user updates, bulk settlements):

OperationLedger Entries ReadLedger Entries WrittenMemory GrowthScales With N?DoS via Large N?

Key cost considerations:

  • Persistent storage reads cost more than Instance — avoid iterating Persistent keys in hot paths
  • Writing new ledger entries increases fees; if protocol absorbs cost, check for griefing
  • TTL extension fees: size_bytes * fee_rate * extension_ledgers — unbounded extensions can drain operational budget
  • Loops over Vec in Instance storage consume proportional CPU/memory — check for unbounded iteration

7. TTL Cost Economics (Soroban-Specific)

Storage EntryStorage TypeCurrent TTL StrategyWho Pays to ExtendRisk if Expired

Checks:

  • Instance storage expiry → ALL instance().get() with unwrap() panic — contract unusable
  • User's Persistent entry expires → position data archived; who pays restoration fee?
  • Temporary storage (allowances, nonces) expiry → DoS on normal operations?
  • Admin function for bulk TTL extension? Resource cost at max user count?
  • Can attacker let entries expire to avoid obligations (debt, locked collateral)?

Finding Template

markdown
**ID**: [EDA-N]
**Verdict**: CONFIRMED / PARTIAL / REFUTED / CONTESTED
**Step Execution**: (see checklist below)
**Rules Applied**: [R2:___, R10:___, R13:___, R14:___]
**Severity**: Critical/High/Medium/Low/Info
**Location**: src/{file}.rs:LineN
**Title**: {parameter boundary violation / invariant break / economic unsustainability / TTL expiry DoS}
**Description**: {specific issue with code reference and numerical example using i128 values}
**Impact**: {quantified at worst-state operational parameters — Rule 10}

Step Execution Checklist (MANDATORY)

SectionRequiredCompleted?Notes
1. Parameter Boundary AnalysisYES
2. Economic Invariant IdentificationYES
3. Rate/Supply Interaction MatrixIF >1 monetary param
4. Fee Formula Verification at Normal ValuesIF fee parameters detected
5. Emission/Inflation SustainabilityIF emission/reward detected
6. Resource Metering and Cost EconomicsYES
7. TTL Cost EconomicsYESSoroban-specific — never skip

If any step skipped, document valid reason (N/A, single parameter, no emissions, no TTL-sensitive keys).

© PlamenTSV, 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 agents/skills/soroban/economic-design-audit of PlamenTSV/plamen.

Open the folder on GitHubat commit 795962b

Compare with similar skills

Economic Design Audit 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.

Economic Design Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Economic Design Audit this skillPlamenTSV/plamen303—~2.1kAutomated safety check: PassMIT
Soroban Contract Auditsickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
Soroban Liquidity Poolsickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Soroban Storage Ttl Lifecyclesickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Soroban Token Mintersickn33/agentic-awesome-skills47k1 repos~1.3kAutomated safety check: PassMIT
Stellar DevVelaPayments/vela-payments131—~1.8kAutomated safety check: PassMIT

Similar skills

  • Soroban Contract Audit

    sickn33/agentic-awesome-skills

    Soroban smart contract security audit register: authorization checks, panic pathways, integer overflows, and storage footprint verification for Stellar.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    SecurityAuto-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
  • Soroban Storage Ttl Lifecycle

    sickn33/agentic-awesome-skills

    Soroban ledger state rent and TTL extension register: live state tracking, bump thresholds, rent fee reserves, and archive boundaries.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • Soroban Token Minter

    sickn33/agentic-awesome-skills

    Soroban SEP-41 token contract architecture register: admin control, supply caps, metadata standard, and transfer event emissions on Stellar.

    47k GitHub starsUsed in 1 repo~1.3k tokens
    SecurityAuto-check passed
  • Stellar Dev

    VelaPayments/vela-payments

    End-to-end Stellar development playbook. An agent skill from VelaPayments/vela-payments.

    131 GitHub stars~1.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Stellar iOS Mac SDK

    Soneso/stellar-ios-mac-sdk

    Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.

    132 GitHub stars~4.3k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from PlamenTSV/plamen

All 87 skills in this repo
  • Audit Prep

    PlamenTSV/plamen

    Prepare Solidity projects for a security audit — test coverage, test quality, NatSpec docs, code hygiene, dependency health, best-practice enforcement, deployment readiness, and project…

    303 GitHub stars~3.7k tokensUpdated 15 days ago
    Auto-check passed
  • Verification Protocol

    PlamenTSV/plamen

    Trigger Pattern Always (used by all verifier agents) - Inject Into security-verifier agents (Phase 5)

    303 GitHub stars~3.5k tokensUpdated 15 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Aptos Move) - foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.3k tokensUpdated 15 days ago
    Auto-check passed
  • Ability Analysis

    PlamenTSV/plamen

    Trigger Pattern Always (Sui Move) -- foundational security check - Inject Into Breadth agents, depth agents

    303 GitHub stars~3.2k tokensUpdated 15 days ago
    Auto-check passed
  • Account Lifecycle

    PlamenTSV/plamen

    Trigger Pattern ACCOUNTCLOSING flag detected (close/CloseAccount usage) - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.2k tokensUpdated 15 days ago
    Auto-check passed
  • Account Validation

    PlamenTSV/plamen

    Trigger Pattern Always required for Solana audits - Inject Into Breadth agents, depth agents

    303 GitHub stars~1.7k tokensUpdated 15 days ago
    Auto-check passed

Works with

Questions about Economic Design Audit

What does Economic Design Audit do?

Trigger Pattern MONETARYPARAMETER flag (fee, rate, emission, cap, bps values) - Inject Into Breadth agents (merged via M4 hierarchy). Economic Design Audit is an agent skill from PlamenTSV/plamen.

When should I use Economic Design Audit?

Economic Design Audit fits situations like: pattern MONETARYPARAMETER flag (fee; bps values) - Inject Into Breadth agents (merged via M4 hierarchy).

How do I install Economic Design Audit in Claude Code?

Run `npx skills add PlamenTSV/plamen --skill economic-design-audit -a claude-code`. Or copy the skill folder (agents/skills/soroban/economic-design-audit in PlamenTSV/plamen) into .claude/skills/economic-design-audit in your project. Claude Code loads it when a task matches its description.

How do I install Economic Design Audit in Codex?

Run `npx skills add PlamenTSV/plamen --skill economic-design-audit -a codex`. Or copy the skill folder (agents/skills/soroban/economic-design-audit in PlamenTSV/plamen) into .agents/skills/economic-design-audit in your project. Codex loads it when a task matches its description.

Can I use Economic Design Audit 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 PlamenTSV/plamen --skill economic-design-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/economic-design-audit, .gemini/skills/economic-design-audit, .github/skills/economic-design-audit and .opencode/skills/economic-design-audit in your project.

What does Economic Design Audit need to run?

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

Does Economic Design Audit 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 Economic Design Audit 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 Economic Design Audit use?

Economic Design Audit 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 Economic Design Audit use?

About 2.1k tokens (SKILL.md is roughly 8.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 Economic Design Audit?

Skills that share tags, products or a category with Economic Design Audit: Soroban Contract Audit (sickn33/agentic-awesome-skills, 47k stars), Soroban Liquidity Pool (sickn33/agentic-awesome-skills, 47k stars), Soroban Storage Ttl Lifecycle (sickn33/agentic-awesome-skills, 47k stars) and Soroban Token Minter (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 Economic Design Audit?

PlamenTSV (a GitHub user) maintains it in PlamenTSV/plamen, which has 303 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on September 26, 2026.

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