Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Token economics simulation and analysis. Supports supply modeling, staking mechanisms, liquidity mining, governance dynamics, agent-based simulations, and cadCAD integration.
.claude/skills/a5c-ai-tokenomics/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 175% | 0% |
Expert token economics simulation and analysis for protocol design.
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())
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
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
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)
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']
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 }
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 = 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) # Policies def staking_policy(params, step, sL, s): return {'stake_action': 'stake' if s['token_price'] > 0.5 else 'unstake'} # Configuration partial_state_update_blocks = [ { 'policies': {'staking': staking_policy}, 'variables': { 'token_price': update_price, 'staked_supply': update_staking } } ]
python# governance_model.py class GovernanceSimulation: def __init__(self, total_voting_power: float): self.total_voting_power = total_voting_power self.proposals = {} self.quorum = 0.04 # 4% quorum self.pass_threshold = 0.5 # 50% to pass 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'] # Check quorum if total_votes < self.total_voting_power * self.quorum: proposal['status'] = 'defeated' return False # Check threshold if proposal['for_votes'] / total_votes >= self.pass_threshold: proposal['status'] = 'executed' return True else: proposal['status'] = 'defeated' return False
| Process | Purpose | |---------|---------| | economic-simulation.js | Protocol economics | | staking-contract.js | Staking design | | governance-system.js | Governance modeling | | yield-aggregator.js | Yield optimization |
skills/defi-protocols/SKILL.md - DeFi integrationagents/defi-architect/AGENT.md - DeFi expert| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,164 | 23,709 | +47% | 1 | 1 | 0% | 3,614 | 7,365 | +104% | 0 | 0 | — |
case-02 | fail→pass | 18,918 | 17,691 | -6% | 1 | 1 | 0% | 4,366 | 7,086 | +62% | 0 | 0 | — |
case-03 | fail→fail | 16,829 | 16,911 | +0% | 1 | 1 | 0% | 3,957 | 7,247 | +83% | 0 | 0 | — |
case-04 | fail→pass | 20,727 | 19,018 | -8% | 1 | 1 | 0% | 4,492 | 7,218 | +61% | 0 | 0 | — |
case-05 | fail→fail | 16,435 | 16,100 | -2% | 1 | 1 | 0% | 3,600 | 6,811 | +89% | 0 | 0 | — |
case-06 | pass→pass | 19,188 | 18,429 | -4% | 1 | 1 | 0% | 4,463 | 7,285 | +63% | 0 | 0 | — |
case-07 | fail→fail | 17,754 | 17,236 | -3% | 1 | 1 | 0% | 3,814 | 7,073 | +85% | 0 | 0 | — |
case-08 | fail→fail | 17,329 | 22,275 | +29% | 1 | 1 | 0% | 3,914 | 8,101 | +107% | 0 | 0 | — |
case-09 | pass→pass | 8,326 | 3,198 | -62% | 1 | 1 | 0% | 1,463 | 3,794 | +159% | 0 | 0 | — |
case-10 | fail→pass | 12,485 | 3,038 | -76% | 1 | 1 | 0% | 2,249 | 3,813 | +70% | 0 | 0 | — |
case-11 | pass→pass | 6,465 | 1,916 | -70% | 1 | 1 | 0% | 1,179 | 3,502 | +197% | 0 | 0 | — |
case-12 | pass→pass | 10,189 | 9,420 | -8% | 1 | 1 | 0% | 2,381 | 5,345 | +124% | 0 | 0 | — |
case-13 | fail→fail | 11,992 | 11,958 | -0% | 1 | 1 | 0% | 2,476 | 5,498 | +122% | 0 | 0 | — |
case-14 | pass→pass | 6,616 | 2,304 | -65% | 1 | 1 | 0% | 1,124 | 3,612 | +221% | 0 | 0 | — |
case-15 | fail→pass | 11,418 | 1,848 | -84% | 1 | 1 | 0% | 2,110 | 3,498 | +66% | 0 | 0 | — |
case-16 | fail→pass | 7,575 | 1,786 | -76% | 1 | 1 | 0% | 1,263 | 3,469 | +175% | 0 | 0 | — |
case-17 | fail→pass | 10,310 | 1,673 | -84% | 1 | 1 | 0% | 1,660 | 3,496 | +111% | 0 | 0 | — |
case-18 | fail→pass | 9,039 | 2,110 | -77% | 1 | 1 | 0% | 1,562 | 3,572 | +129% | 0 | 0 | — |
case-19 | fail→pass | 6,005 | 1,932 | -68% | 1 | 1 | 0% | 1,074 | 3,504 | +226% | 0 | 0 | — |
case-20 | pass→pass | 22,531 | 15,566 | -31% | 1 | 1 | 0% | 5,356 | 6,619 | +24% | 0 | 0 | — |
case-21 | pass→pass | 19,921 | 22,910 | +15% | 1 | 1 | 0% | 3,832 | 7,763 | +103% | 0 | 0 | — |
case-22 | pass→fail | 7,682 | 6,378 | -17% | 1 | 1 | 0% | 1,543 | 4,466 | +189% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.