Skill 详情

trade-accounting

Directly applies double-entry bookkeeping, ledgers, and financial statements to trading.

匹配类型直接匹配已针对 会计 审核
来源agiprolabs/claude-trading-skills外部来源
报告安装量240仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: trade-accounting
description: Double-entry bookkeeping for trading operations with ledger management, P&L statements, balance sheets, and cash flow reporting
license: MIT
metadata:
  author: agipro
  version: "0.1.0"
  category: trading
---

# Trade Accounting

Run your trading operation like a business. Every SOL spent, every token acquired, every fee paid, every gain realized — tracked with double-entry bookkeeping so your books always balance. Whether you trade through a personal wallet or an LLC, proper accounting turns chaos into clarity.

**Core principle**: Every transaction touches at least two accounts. Buy a token? Cash goes down, token holdings go up — by the same amount. This double-entry constraint catches errors automatically: if debits do not equal credits, something is wrong.

## Why Traders Need Accounting

Most traders track P&L loosely — "I started with 50 SOL and now I have 62 SOL." That tells you nothing about:

- How much came from realized trades vs unrealized positions
- What you paid in cumulative fees (gas, priority fees, swap fees)
- Whether your staking and LP income covers your operating costs
- Your actual cost basis for each holding (critical for taxes)
- Cash flow timing — are you profitable but illiquid?

Proper accounting answers all of these. It also separates **trading P&L** (mark-to-market, useful for strategy evaluation) from **tax P&L** (realized gains using a specific cost basis method, required for compliance).

---

## Account Types

A trading operation uses four account categories following standard accounting:

| Category | Normal Balance | Examples |
|----------|---------------|----------|
| **Assets** | Debit | Cash (SOL/USDC), token holdings, LP positions, staking deposits, receivables |
| **Liabilities** | Credit | Margin borrowing, accrued taxes payable |
| **Income** | Credit | Realized trading gains, staking rewards, airdrop income, LP fee income |
| **Expenses** | Debit | Trading fees, gas/priority fees, subscription costs, data feeds |
| **Equity** | Credit | Owner capital contributions, retained earnings, withdrawals (contra) |

### Chart of Accounts

See `references/planned_features.md` for a full chart of accounts. A minimal setup:

```
1000  Assets
  1010  Cash – SOL
  1020  Cash – USDC
  1100  Token Holdings (one sub-account per token)
  1200  LP Positions
  1300  Staking Deposits

3000  Income
  3010  Realized Trading Gains
  3020  Staking Rewards
  3030  Airdrop Income
  3040  LP Fee Income

4000  Expenses
  4010  Trading Fees (DEX swap fees)
  4020  Gas & Priority Fees
  4030  Slippage Cost

5000  Equity
  5010  Owner Capital
  5020  Retained Earnings
  5030  Owner Withdrawals (contra-equity)
```

---

## Double-Entry Bookkeeping

Every transaction records equal debits and credits. Debits increase asset and expense accounts; credits increase liability, income, and equity accounts.

### Entry Examples

**Buy 1000 BONK for 0.5 SOL (0.001 SOL gas fee):**

| Account | Debit | Credit |
|---------|-------|--------|
| Token Holdings – BONK | 0.501 SOL | |
| Cash – SOL | | 0.501 SOL |

Or with the fee broken out explicitly:

| Account | Debit | Credit |
|---------|-------|--------|
| Token Holdings – BONK | 0.5 SOL | |
| Gas & Priority Fees | 0.001 SOL | |
| Cash – SOL | | 0.501 SOL |

**Sell 1000 BONK for 0.8 SOL (cost basis was 0.5 SOL, 0.001 SOL gas):**

| Account | Debit | Credit |
|---------|-------|--------|
| Cash – SOL | 0.799 SOL | |
| Gas & Priority Fees | 0.001 SOL | |
| Token Holdings – BONK | | 0.5 SOL |
| Realized Trading Gains | | 0.3 SOL |

**Receive staking rewards of 0.05 SOL:**

| Account | Debit | Credit |
|---------|-------|--------|
| Cash – SOL | 0.05 SOL | |
| Staking Rewards | | 0.05 SOL |

**Receive airdrop of 5000 JUP (valued at 2.1 SOL at receipt):**

| Account | Debit | Credit |
|---------|-------|--------|
| Token Holdings – JUP | 2.1 SOL | |
| Airdrop Income | | 2.1 SOL |

**Collect LP fees of 0.03 SOL:**

| Account | Debit | Credit |
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作