tokenomics
Token economics simulation and analysis. Supports supply modeling, staking mechanisms, liquidity mining, governance dynamics, agent-based simulations, and cadCAD integration.
What this skill does
# Token Economics Modeling Skill
Expert token economics simulation and analysis for protocol design.
## Capabilities
- **Supply Modeling**: Token supply and distribution
- **Staking Simulation**: Staking and reward mechanisms
- **Liquidity Mining**: LP incentive programs
- **Governance Dynamics**: Token governance modeling
- **Agent-Based Simulation**: cadCAD economic models
- **Inflation Analysis**: Inflation/deflation mechanisms
- **LP Economics**: DEX liquidity and impermanent loss
## Supply Distribution Models
### Vesting Schedule
```python
# vesting_model.py
import numpy as np
import pandas as pd
class VestingSchedule:
def __init__(self, total_supply: int = 1_000_000_000):
self.total_supply = total_supply
# Allocation percentages
self.allocation = {
'team': 0.20,
'investors': 0.15,
'community': 0.30,
'treasury': 0.20,
'liquidity': 0.15
}
# Vesting parameters (months)
self.vesting = {
'team': {'cliff': 12, 'duration': 36},
'investors': {'cliff': 6, 'duration': 24},
'community': {'cliff': 0, 'duration': 48},
'treasury': {'cliff': 0, 'duration': 60},
'liquidity': {'cliff': 0, 'duration': 1} # TGE
}
def get_unlocked(self, month: int) -> dict:
unlocked = {}
for category, params in self.vesting.items():
allocation = self.total_supply * self.allocation[category]
if month < params['cliff']:
unlocked[category] = 0
elif month >= params['cliff'] + params['duration']:
unlocked[category] = allocation
else:
elapsed = month - params['cliff']
unlocked[category] = allocation * (elapsed / params['duration'])
return unlocked
def get_circulating_supply(self, month: int) -> int:
unlocked = self.get_unlocked(month)
return sum(unlocked.values())
```
### Emission Schedule
```python
# emission_model.py
class EmissionSchedule:
def __init__(
self,
initial_emission: float = 1000,
decay_rate: float = 0.9, # 10% decay per period
period_length: int = 365 # days
):
self.initial_emission = initial_emission
self.decay_rate = decay_rate
self.period_length = period_length
def get_daily_emission(self, day: int) -> float:
period = day // self.period_length
return self.initial_emission * (self.decay_rate ** period)
def get_cumulative_emission(self, days: int) -> float:
total = 0
for day in range(days):
total += self.get_daily_emission(day)
return total
```
## Staking Economics
### Staking Model
```python
# staking_model.py
class StakingPool:
def __init__(
self,
total_staked: float = 0,
reward_rate: float = 0.10, # 10% APY
lock_period: int = 30 # days
):
self.total_staked = total_staked
self.reward_rate = reward_rate
self.lock_period = lock_period
self.stakers = {}
def stake(self, address: str, amount: float):
if address not in self.stakers:
self.stakers[address] = {
'amount': 0,
'reward_debt': 0,
'lock_until': 0
}
self.stakers[address]['amount'] += amount
self.stakers[address]['lock_until'] = self.lock_period
self.total_staked += amount
def calculate_rewards(self, address: str, days: int) -> float:
if address not in self.stakers:
return 0
staker = self.stakers[address]
share = staker['amount'] / self.total_staked if self.total_staked > 0 else 0
daily_rate = self.reward_rate / 365
return staker['amount'] * daily_rate * days
def get_apy(self) -> float:
return self.reward_rate * 100
```
### veToken Model (Vote Escrow)
```python
# ve_token_model.py
import math
class VeTokenModel:
def __init__(self, max_lock_time: int = 4 * 365): # 4 years max
self.max_lock_time = max_lock_time
self.locks = {}
def lock(self, address: str, amount: float, lock_days: int):
lock_days = min(lock_days, self.max_lock_time)
ve_balance = amount * (lock_days / self.max_lock_time)
self.locks[address] = {
'amount': amount,
'lock_days': lock_days,
've_balance': ve_balance,
'start_time': 0
}
return ve_balance
def get_voting_power(self, address: str, current_day: int) -> float:
if address not in self.locks:
return 0
lock = self.locks[address]
remaining = max(0, lock['lock_days'] - current_day)
return lock['amount'] * (remaining / self.max_lock_time)
```
## Liquidity Mining
### LP Rewards Model
```python
# lp_rewards_model.py
class LPRewardsPool:
def __init__(
self,
reward_per_block: float = 10,
total_lp_tokens: float = 0
):
self.reward_per_block = reward_per_block
self.total_lp_tokens = total_lp_tokens
self.acc_reward_per_share = 0
self.last_reward_block = 0
self.users = {}
def deposit(self, user: str, amount: float, block: int):
self._update_pool(block)
if user in self.users:
pending = self._pending_rewards(user)
self.users[user]['pending'] += pending
if user not in self.users:
self.users[user] = {'amount': 0, 'reward_debt': 0, 'pending': 0}
self.users[user]['amount'] += amount
self.users[user]['reward_debt'] = \
self.users[user]['amount'] * self.acc_reward_per_share
self.total_lp_tokens += amount
def _update_pool(self, block: int):
if self.total_lp_tokens == 0:
self.last_reward_block = block
return
blocks = block - self.last_reward_block
rewards = blocks * self.reward_per_block
self.acc_reward_per_share += rewards / self.total_lp_tokens
self.last_reward_block = block
def _pending_rewards(self, user: str) -> float:
if user not in self.users:
return 0
return self.users[user]['amount'] * self.acc_reward_per_share \
- self.users[user]['reward_debt']
```
### Impermanent Loss Calculator
```python
# impermanent_loss.py
def calculate_impermanent_loss(price_ratio: float) -> float:
"""
Calculate impermanent loss for Uniswap V2 style AMM.
price_ratio: new_price / initial_price
"""
return 2 * math.sqrt(price_ratio) / (1 + price_ratio) - 1
def il_vs_holding(initial_value: float, price_ratio: float) -> dict:
il = calculate_impermanent_loss(price_ratio)
lp_value = initial_value * (1 + il)
hold_value = initial_value * (1 + price_ratio) / 2
return {
'lp_value': lp_value,
'hold_value': hold_value,
'il_percentage': il * 100,
'il_dollar': hold_value - lp_value
}
```
## cadCAD Simulation
### Basic cadCAD Model
```python
# cadcad_model.py
from cadCAD.configuration import Configuration
from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
# State Variables
initial_state = {
'token_price': 1.0,
'total_supply': 100_000_000,
'circulating_supply': 10_000_000,
'staked_supply': 0,
'treasury': 20_000_000
}
# Parameters
system_params = {
'staking_apr': [0.10, 0.15, 0.20],
'inflation_rate': [0.05],
'buy_pressure': [0.01, 0.02]
}
# State Update Functions
def update_price(params, step, sL, s, _input):
buy_pressure = params['buy_pressure']
sell_pressure = s['circulating_supply'] * 0.001
price_change = (buy_pressure - sell_pressure) / s['circulating_supply']
new_price = max(0.01, s['token_price'] * (1 + price_change))
return ('token_price', new_price)
def update_staking(params, step, sL, s, _input):
staking_apr = paRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.