Multi-Chain Cost-Basis, Wash-Sale & Tax Lot Auditor — FIFO, LIFO & HIFO lots, Form 8949 rows and wash-sale risk before you file.
Feed it a normalized transaction export (or a Solana, EVM or Bitcoin wallet address) and get a deterministic tax-lot audit: every disposal matched to an acquisition lot, short-term vs long-term gains, IRS Form 8949 / Schedule D compatible rows, and the exact rule IDs that fired (CB-WASH-01, CB-FEE-01, CB-LOT-01, CB-HIFO-01, CB-STLT-01), sealed with an audit_sha256 you can re-run and compare.
SKU: cost-basis-ledger · Skills: cost-basis-ledger-setup + cost-basis-ledger · Runtime: /runtime/cost_basis_ledger.py
What It Does
- Lot matching engines:
--method fifo(oldest first),lifo(newest first) andhifo(highest cost first), with a side-by-side method comparison of net P&L and illustrative tax for all three. - Short-term vs long-term: holding period under 365 days is
SHORT, 365 days or more isLONG; the report givesshort_term_gain_usd,long_term_gain_usd,net_realized_pnl_usd,total_proceeds_usdandtotal_cost_basis_usdfor the chosen--tax-year. - Form 8949 / Schedule D rows: asset, date acquired, date sold, proceeds, cost basis, fee adjustment, gain or loss, term, wash-sale flag, disallowed amount and lot ID, exportable with
--csv-out. - Wash-sale risk (
CB-WASH-01): loss sales with a same-asset rebuy inside the 30-day window, with the disallowed loss scaled by replacement quantity. - Fees, orphans and thresholds: gas / network / priority fees added to basis (
CB-FEE-01), zero-basis airdrops and sales with no acquisition lot (CB-LOT-01), method tax delta (CB-HIFO-01) and sales 330–364 days into a holding period (CB-STLT-01). - Multi-chain input: Solana SPL, EVM ERC-20 / native and Bitcoin, from a
.jsonor.csvexport; the chain is auto-detected from a--walletaddress. Built for pipelines:--json/--markdownoutput and 1200x675 PNG audit receipts. 100% Python stdlib.
Live output (cost_basis_ledger.py --demo: multi-chain 2026 ledger, FIFO)
Sample disclosure: this is the real output of the offline --demo ledger, a fictional set of Solana, EVM and Bitcoin transactions, not a customer report. Your own report will reflect your transactions. The receipt line shows UNVERIFIED-LOCAL because no license was active for this run.
snapshot 2026-10-28 UTC | tool=cost_basis_ledger v1.0.0 | source=--demo (offline sample ledger) subject demo-multichain-2026 method=FIFO tax_year=2026 fee_deduction=on form 8949 / schedule D rows ASSET ACQUIRED SOLD PROCEEDS BASIS FEE_ADJ GAIN/LOSS TERM WASH LOT ETH 2025-02-10 2026-02-14 19,800.00 15,900.00 42.50 3,857.50 LONG - ETH-A SOL 2025-06-12 2026-03-03 16,800.00 18,600.00 5.36 -1,805.36 SHORT YES 1,354.02 SOL-A BTC 2025-01-20 2026-04-22 44,800.00 41,600.00 35.40 3,164.60 LONG - BTC-A JUP 2025-11-30 2026-05-19 2,700.00 0.00 1.10 2,698.90 SHORT - JUP-AIRDROP SOL 2025-06-12 2026-08-01 5,250.00 4,650.00 1.39 598.61 LONG - SOL-A SOL 2026-01-08 2026-08-01 12,250.00 14,700.00 3.43 -2,453.43 SHORT - SOL-B ETH 2025-02-10 2026-08-05 9,200.00 5,300.00 15.00 3,885.00 LONG - ETH-A ETH 2025-09-05 2026-08-05 9,200.00 8,600.00 25.00 575.00 SHORT - ETH-B total_proceeds_usd 120,000.00 total_cost_basis_usd 109,350.00 short_term_gain_usd 369.13 long_term_gain_usd 11,505.71 wash_disallowed_usd 1,354.02 (added back to the reported loss) net_realized_pnl_usd 11,874.84 rules [CRITICAL] CB-WASH-01 +30 1 loss disposition(s) have a same-asset rebuy within 30 days; $1,354.02 of losses at risk of disallowance [INFO ] CB-FEE-01 +0 $129.18 of gas/network fees applied to basis/proceeds [CRITICAL] CB-LOT-01 +35 1 disposition(s) matched zero-basis or missing lots; the full proceeds may be taxed as gain [WARN ] CB-HIFO-01 +10 HIFO would cut illustrative tax by $229.24 vs FIFO [WARN ] CB-STLT-01 +10 1 short-term gain(s) sold 31+ day(s) before the long-term threshold AuditScore 85/100 tier=CRITICAL method comparison (illustrative 32% short / 15% long) FIFO net_pnl= 11,874.84 est_tax= 1,843.98 LIFO net_pnl= 16,794.27 est_tax= 2,519.14 HIFO net_pnl= 10,764.95 est_tax= 1,614.74 audit_sha256 ae360f7f49a65271b5fa12e8279ef7c2fd3d29b4c90eccbc19ea7b30ada0da03 receipt_verification UNVERIFIED-LOCAL (no active wcl_ license in this sample run) SCOPE_NOTE: Deterministic lot-matching audit of the transactions supplied; not tax, legal or financial advice. Wash-sale treatment of digital assets is unsettled, so CB-WASH-01 is a risk flag, not a ruling. Holding-period and rate assumptions are illustrative. Confirm with a qualified tax professional.
What It Does Not Do
- Strictly read-only: never asks for private keys or seed phrases, and never signs or broadcasts transactions.
- Not tax, legal or financial advice. Wash-sale treatment of digital assets is unsettled, so
CB-WASH-01is a risk flag, and the method-comparison tax figures use illustrative flat rates. - A bare
--walletrun has no USD price history, so it uses a clearly labelled sample ledger; supply--lots-filefor a real audit.
Licensing & Setup
One-time license, up to 3 workspace-reset rebinds. On Turn 1 the cost-basis-ledger-setup skill verifies your agent key, binds your wcl_... code through the read-only license helper, and installs the SHA-256 pinned runtime. The license code is never printed in chat.
One wcl_... key, two runtimes. Your license key works inside Grok Bot and from any local terminal or IDE agent (Cursor, Claude Code, Windsurf, CI/CD) via the standalone single-file Python 3 CLI (/runtime/cost_basis_ledger.py) — standard library only, zero pip install.