概览
Crypto Trader Example — beancount.io
A comprehensive Beancount ledger demonstrating every major cryptocurrency accounting scenario: purchases, trading, staking, mining, DeFi, NFTs, and tax planning. 账本备注
财务状况
净资产及其组成账户
资金流动
按账户类别显示每月收入和支出
2026年9月
近期活动
考虑分录的账本活动
交易记录
符合当前筛选条件的最新交易
收入与支出
收入与支出
在选定时期内每个区间的总收入和支出对比的柱状图。
各期间数据
| 期间 | 收入 | 开支 | 净利润 |
|---|---|---|---|
| 2025-02-28 | 0.00 USD | 126.93 USD | -126.93 USD |
| 2025-03-31 | 329.87 USD | 274.81 USD | 55.06 USD |
| 2025-04-30 | 377.54 USD | 179.31 USD | 198.23 USD |
| 2025-05-31 | 420.00 USD | 175.60 USD | 244.40 USD |
| 2025-06-30 | 428.32 USD | 1,383.35 USD | -955.03 USD |
| 2025-07-31 | 463.00 USD | 185.40 USD | 277.60 USD |
| 2025-08-31 | 4,303.23 USD | 189.50 USD | 4,113.73 USD |
| 2025-09-30 | 8,147.05 USD | 195.00 USD | 7,952.05 USD |
| 2025-10-31 | 5,844.45 USD | 219.46 USD | 5,624.99 USD |
| 2025-11-30 | 376.81 USD | 178.00 USD | 198.81 USD |
| 2025-12-31 | 1,869.44 USD | 3,917.85 USD | -2,048.41 USD |
| 2026-01-31 | 360.57 USD | 252.25 USD | 108.32 USD |
| 2026-02-28 | 279.96 USD | 3,132.50 USD | -2,852.54 USD |
| 2026-03-31 | 507.42 USD | 192.00 USD | 315.42 USD |
| 2026-04-30 | 1,423.82 USD | 214.21 USD | 1,209.61 USD |
| 2026-05-31 | 304.41 USD | 6,400.90 USD | -6,096.49 USD |
| 2026-06-30 | 1,614.13 USD | 4,612.78 USD | -2,998.65 USD |
| 2026-07-31 | 271.15 USD | 198.00 USD | 73.15 USD |
| 2026-08-31 | 3,477.07 USD | 204.91 USD | 3,272.16 USD |
| 2026-09-30 | 851.08 USD | 11.35 USD | 839.73 USD |
资产负债表
资产分布
Crypto Trader Example — beancount.io资产构成的可视化表示
明细
| 账户 | 金额 | 总额占比 |
|---|---|---|
| Assets:Staking:Lido:STETH | 2,495.68 USD | 1.31% |
| Assets:Staking:Ethereum:ETH | 3,822.59 USD | 2% |
| Assets:DeFi:Compound:CUSDC | 5,843.35 USD | 3.06% |
| Assets:Crypto:Wallet:MetaMask:USDC | 3,965.88 USD | 2.08% |
| Assets:Crypto:Wallet:MetaMask:UNI | 3,795.60 USD | 1.99% |
| Assets:Crypto:Wallet:MetaMask:ETH | 8,405.23 USD | 4.41% |
| Assets:Crypto:Wallet:MetaMask:DAI | 1,999.54 USD | 1.05% |
| Assets:Crypto:Wallet:Ledger:BTC | 9,650.77 USD | 5.06% |
| Assets:Crypto:Mining:BTC | 6,371.45 USD | 3.34% |
| Assets:Crypto:Coinbase:USD | 38,313.69 USD | 20.09% |
| Assets:Crypto:Coinbase:BTC | 13,863.78 USD | 7.27% |
| Assets:Crypto:Binance:USDT | 1,996.20 USD | 1.05% |
| Assets:Crypto:Binance:USD | 5,675.89 USD | 2.98% |
| Assets:Crypto:Binance:SOL | 9,742.20 USD | 5.11% |
| Assets:Crypto:Binance:ADA | 2,297.60 USD | 1.2% |
| Assets:Bank:Checking | 68,033.00 USD | 35.68% |
| 其他 | 4,400.85 USD | 2.31% |
负债分布
Crypto Trader Example — beancount.io负债构成的可视化表示
无可用数据
现金流
现金流
资金从收入来源流向支出和投资
正在加载账户角色…
README.md
Crypto Accounting Example — beancount.io
A comprehensive Beancount ledger demonstrating every major cryptocurrency accounting scenario: purchases, trading, staking, mining, DeFi, NFTs, and tax planning.
Companion blog post: Complete Guide to Cryptocurrency Accounting with Beancount
Quick Start
bash
make install # Install beancount + fava via uv
make check # Verify the ledger has zero errors
make serve # Open Fava at http://localhost:4739File Guide
| File | What it demonstrates |
|---|---|
main.bean | Entry point — options, plugins, and include directives |
accounts.bean | All commodity definitions and account chart |
prices/2024.bean | Monthly price directives for BTC, ETH, SOL, ADA, and DeFi tokens |
transactions/purchases.bean | Buying crypto: simple buys, DCA strategy, stablecoins |
transactions/trading.bean | Sales with short/long-term gains, crypto-to-crypto swaps, margin trading |
transactions/staking.bean | ETH 2.0 staking, monthly rewards, Lido liquid staking (stETH) |
transactions/mining.bean | BTC mining rewards, electricity costs, equipment depreciation |
transactions/defi-lending.bean | Compound supply/yield, COMP rewards, Aave deposit/borrow/repay |
transactions/defi-liquidity.bean | Uniswap LP provision, fee income, impermanent loss |
transactions/transfers.bean | Exchange-to-wallet transfers, cross-chain bridging |
transactions/airdrops.bean | UNI and SOL airdrop income |
transactions/nfts.bean | NFT purchase with ETH, NFT sale with capital gain |
transactions/tax-planning.bean | Tax loss harvesting, wash sale awareness, year-end balance assertions |
Key Concepts Demonstrated
- Cost basis tracking — every purchase creates a lot with date and price
- FIFO & specific lot identification — choosing which lot to dispose of
- Taxable dispositions — selling for fiat, crypto-to-crypto swaps, spending crypto
- Ordinary income — mining rewards, staking rewards, airdrops (all at FMV)
- DeFi receipt tokens — cUSDC, aETH, stETH, LP tokens as accounting proxies
- Gas fees — tracked as expenses, deducted from proceeds where appropriate
- Balance assertions — year-end reconciliation checks
- Short-term vs long-term — separate income accounts for tax reporting
Useful Commands
bash
make balances # Show all account balances
make holdings # Show holdings with market values
make income # Show income statement
make check # Verify ledger integrity