Skip to main contenttokenomics
Token economics simulation and analysis. Supports supply modeling, staking mechanisms, liquidity mining, governance dynamics, agent-based simulations, and cadCAD integration.
설치로 이동 Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/a5c-ai/babysitter --skill tokenomics명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
이 저장소의 다른 Skills
Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
| name | tokenomics |
| description | Token economics simulation and analysis. Supports supply modeling, staking mechanisms, liquidity mining, governance dynamics, agent-based simulations, and cadCAD integration. |
| allowed-tools | Read, Grep, Write, Bash, Edit, Glob, WebFetch |
| graph | {"domains":["domain:security"],"specializations":["specialization:cryptography-blockchain"],"skillAreas":["skill-area:token-nft-management","skill-area:dao-governance-implementation","skill-area:on-chain-data-oracle-integration"],"roles":["role:financial-analyst","role:data-scientist"]} |
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
import numpy as np
pandas pd
:
():
.total_supply = total_supply
.allocation = {
: ,
: ,
: ,
: ,
:
}
.vesting = {
: {: , : },
: {: , : },
: {: , : },
: {: , : },
: {: , : }
}
() -> :
unlocked = {}
category, params .vesting.items():
allocation = .total_supply * .allocation[category]
month < params[]:
unlocked[category] =
month >= params[] + params[]:
unlocked[category] = allocation
:
elapsed = month - params[]
unlocked[category] = allocation * (elapsed / params[])
unlocked
() -> :
unlocked = .get_unlocked(month)
(unlocked.values())
import
as
class
VestingSchedule
def
__init__
self, total_supply: int = 1_000_000_000
self
self
'team'
0.20
'investors'
0.15
'community'
0.30
'treasury'
0.20
'liquidity'
0.15
self
'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
def
get_unlocked
self, month: int
dict
for
in
self
self
self
if
'cliff'
0
elif
'cliff'
'duration'
else
'cliff'
'duration'
return
def
get_circulating_supply
self, month: int
int
self
return
sum
Emission Schedule
class EmissionSchedule:
def __init__(
self,
initial_emission: float = 1000,
decay_rate: float = 0.9,
period_length: int = 365
):
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
class StakingPool:
def __init__(
self,
total_staked: float = 0,
reward_rate: float = 0.10,
lock_period: int = 30
):
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)
import math
class VeTokenModel:
def __init__(self, max_lock_time: int = 4 * 365):
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
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
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
from cadCAD.configuration import Configuration
from cadCAD.engine import ExecutionMode, ExecutionContext, Executor
initial_state = {
'token_price': 1.0,
'total_supply': 100_000_000,
'circulating_supply': 10_000_000,
'staked_supply': 0,
'treasury': 20_000_000
}
system_params = {
'staking_apr': [0.10, 0.15, 0.20],
'inflation_rate': [0.05],
'buy_pressure': [0.01, 0.02]
}
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 = params['staking_apr']
stake_incentive = staking_apr * s['token_price']
new_staked = s['staked_supply'] + s['circulating_supply'] * stake_incentive * 0.1
return ('staked_supply', new_staked)
def staking_policy(params, step, sL, s):
return {'stake_action': 'stake' if s['token_price'] > 0.5 else 'unstake'}
partial_state_update_blocks = [
{
'policies': {'staking': staking_policy},
'variables': {
'token_price': update_price,
'staked_supply': update_staking
}
}
]
Governance Simulation
class GovernanceSimulation:
def __init__(self, total_voting_power: float):
self.total_voting_power = total_voting_power
self.proposals = {}
self.quorum = 0.04
self.pass_threshold = 0.5
def create_proposal(self, id: str, description: str):
self.proposals[id] = {
'description': description,
'for_votes': 0,
'against_votes': 0,
'abstain_votes': 0,
'status': 'active'
}
def vote(self, proposal_id: str, voting_power: float, support: int):
proposal = self.proposals[proposal_id]
if support == 1:
proposal['for_votes'] += voting_power
elif support == 0:
proposal['against_votes'] += voting_power
else:
proposal['abstain_votes'] += voting_power
def execute(self, proposal_id: str) -> bool:
proposal = self.proposals[proposal_id]
total_votes = proposal['for_votes'] + proposal['against_votes']
if total_votes < self.total_voting_power * self.quorum:
proposal['status'] = 'defeated'
return False
if proposal['for_votes'] / total_votes >= self.pass_threshold:
proposal['status'] = 'executed'
return True
else:
proposal['status'] = 'defeated'
return False
Process Integration
| Process | Purpose |
|---|
economic-simulation.js | Protocol economics |
staking-contract.js | Staking design |
governance-system.js | Governance modeling |
yield-aggregator.js | Yield optimization |
Best Practices
- Model multiple scenarios
- Include adversarial agents
- Test edge cases (0 liquidity, 100% staked)
- Validate against real protocol data
- Consider MEV and arbitrage
- Document all assumptions
See Also
skills/defi-protocols/SKILL.md - DeFi integration
agents/defi-architect/AGENT.md - DeFi expert
- cadCAD Documentation