跳到主要内容

概览

Crypto Trader Example — beancount.io

A comprehensive Beancount ledger demonstrating every major cryptocurrency accounting scenario: purchases, trading, staking, mining, DeFi, NFTs, and tax planning. 账本备注

财务状况

净资产及其组成账户

净值
过去 12 个月的资产与负债之和
190,673.29 USD
+2,569.38 USD较上月

成本 194,405.22 USD · 浮动盈亏 -3,731.93 USD

账户
当前资产和负债账户余额

资金流动

按账户类别显示每月收入和支出

2026年9月
资金流入
2026年9月
+851.08 USD
主要来源
最多前 3 个期间的平均值
+1,787.45 USD
查看全部
资金流出
2026年9月
-11.35 USD
主要支出
最多前 3 个期间的平均值
-1,671.90 USD
查看全部

近期活动

考虑分录的账本活动

交易记录
符合当前筛选条件的最新交易

收入与支出

收入与支出
在选定时期内每个区间的总收入和支出对比的柱状图。
各期间数据
期间收入开支净利润
2025-02-280.00 USD126.93 USD-126.93 USD
2025-03-31329.87 USD274.81 USD55.06 USD
2025-04-30377.54 USD179.31 USD198.23 USD
2025-05-31420.00 USD175.60 USD244.40 USD
2025-06-30428.32 USD1,383.35 USD-955.03 USD
2025-07-31463.00 USD185.40 USD277.60 USD
2025-08-314,303.23 USD189.50 USD4,113.73 USD
2025-09-308,147.05 USD195.00 USD7,952.05 USD
2025-10-315,844.45 USD219.46 USD5,624.99 USD
2025-11-30376.81 USD178.00 USD198.81 USD
2025-12-311,869.44 USD3,917.85 USD-2,048.41 USD
2026-01-31360.57 USD252.25 USD108.32 USD
2026-02-28279.96 USD3,132.50 USD-2,852.54 USD
2026-03-31507.42 USD192.00 USD315.42 USD
2026-04-301,423.82 USD214.21 USD1,209.61 USD
2026-05-31304.41 USD6,400.90 USD-6,096.49 USD
2026-06-301,614.13 USD4,612.78 USD-2,998.65 USD
2026-07-31271.15 USD198.00 USD73.15 USD
2026-08-313,477.07 USD204.91 USD3,272.16 USD
2026-09-30851.08 USD11.35 USD839.73 USD

资产负债表

资产分布
Crypto Trader Example — beancount.io资产构成的可视化表示
明细
账户金额总额占比
Assets:Staking:Lido:STETH2,495.68 USD1.31%
Assets:Staking:Ethereum:ETH3,822.59 USD2%
Assets:DeFi:Compound:CUSDC5,843.35 USD3.06%
Assets:Crypto:Wallet:MetaMask:USDC3,965.88 USD2.08%
Assets:Crypto:Wallet:MetaMask:UNI3,795.60 USD1.99%
Assets:Crypto:Wallet:MetaMask:ETH8,405.23 USD4.41%
Assets:Crypto:Wallet:MetaMask:DAI1,999.54 USD1.05%
Assets:Crypto:Wallet:Ledger:BTC9,650.77 USD5.06%
Assets:Crypto:Mining:BTC6,371.45 USD3.34%
Assets:Crypto:Coinbase:USD38,313.69 USD20.09%
Assets:Crypto:Coinbase:BTC13,863.78 USD7.27%
Assets:Crypto:Binance:USDT1,996.20 USD1.05%
Assets:Crypto:Binance:USD5,675.89 USD2.98%
Assets:Crypto:Binance:SOL9,742.20 USD5.11%
Assets:Crypto:Binance:ADA2,297.60 USD1.2%
Assets:Bank:Checking68,033.00 USD35.68%
其他4,400.85 USD2.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:4739

File Guide

FileWhat it demonstrates
main.beanEntry point — options, plugins, and include directives
accounts.beanAll commodity definitions and account chart
prices/2024.beanMonthly price directives for BTC, ETH, SOL, ADA, and DeFi tokens
transactions/purchases.beanBuying crypto: simple buys, DCA strategy, stablecoins
transactions/trading.beanSales with short/long-term gains, crypto-to-crypto swaps, margin trading
transactions/staking.beanETH 2.0 staking, monthly rewards, Lido liquid staking (stETH)
transactions/mining.beanBTC mining rewards, electricity costs, equipment depreciation
transactions/defi-lending.beanCompound supply/yield, COMP rewards, Aave deposit/borrow/repay
transactions/defi-liquidity.beanUniswap LP provision, fee income, impermanent loss
transactions/transfers.beanExchange-to-wallet transfers, cross-chain bridging
transactions/airdrops.beanUNI and SOL airdrop income
transactions/nfts.beanNFT purchase with ETH, NFT sale with capital gain
transactions/tax-planning.beanTax 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