WATTCOIN API SPEC: v1 (f1f4c9b) SOLANA TOKEN-2022 MINT: Gpmbh4PoQnL1kNgpMYDED3iv4fczcr7d3qNBLf8rpump LIVE TEMPLATES: 12 LIVE AGENTS (FREE + $19–$49 SOL)
● AVAILABLE NOW · $29 in SOL (ONE-TIME · 3 REBINDS)

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

⚡ Works in Grok Bot + Cursor + Claude Code + Any Terminal (Zero-Dep Python 3 CLI Included)
See Sample Output View in Homepage Catalog

What It Does

  • Lot matching engines: --method fifo (oldest first), lifo (newest first) and hifo (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 is LONG; the report gives short_term_gain_usd, long_term_gain_usd, net_realized_pnl_usd, total_proceeds_usd and total_cost_basis_usd for 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 .json or .csv export; the chain is auto-detected from a --wallet address. Built for pipelines: --json / --markdown output 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-01 is a risk flag, and the method-comparison tax figures use illustrative flat rates.
  • A bare --wallet run has no USD price history, so it uses a clearly labelled sample ledger; supply --lots-file for 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.

Frequently Asked Questions — Multi-Chain Cost-Basis, Wash-Sale & Tax Lot Auditor

How does the Multi-Chain Cost-Basis Ledger calculate FIFO, LIFO and HIFO capital gains for crypto?
Every disposal is matched against your acquisition lots in order: FIFO uses the oldest lot first, LIFO the newest, and HIFO the lot with the highest unit cost (acquisition fees included) to minimise the gain. Each match becomes one Form 8949 / Schedule D row with asset, date acquired, date sold, proceeds, cost basis, fee adjustment, gain or loss, SHORT or LONG term, wash-sale flag and lot ID. The same transactions and method always produce the same rows and the same audit_sha256.
What is the difference between short-term and long-term gains here, and what does CB-STLT-01 warn about?
A lot held fewer than 365 days is SHORT term; 365 days or more is LONG term. CB-STLT-01 fires when a profitable short-term sale happened 330 to 364 days after acquisition, because waiting a few more days would have changed the holding-period bucket. The alert reports how many days remained to the long-term threshold.
How does the wash-sale rule CB-WASH-01 work for crypto, and is it a tax ruling?
CB-WASH-01 flags any loss disposition that has a same-asset purchase from a different lot within 30 days before or after the sale. The disallowed amount is scaled by the replacement quantity and shown as wash_disallowed_usd, which is added back to the reported loss. Wash-sale treatment of digital assets is unsettled, so this is a risk flag for you and your tax professional, not a ruling, and the tool is not tax advice.
Can I audit a wallet address, and what are CB-LOT-01 and CB-FEE-01?
Pass --lots-file with a normalized .json or .csv export for a real audit. With --wallet alone the CLI auto-detects Solana, EVM (0x...) or Bitcoin addresses but public RPC history carries no USD prices, so it uses a clearly labelled deterministic sample ledger. CB-LOT-01 flags dispositions that matched a zero-basis airdrop or transfer-in, or that had no acquisition lot at all. CB-FEE-01 flags gas, network and priority fees that were recorded but not added to your cost basis (the default applies them).
Can I run cost_basis_ledger.py locally in Cursor, Claude Code or CI/CD and generate PNG audit receipts?
Yes. One wcl_... license unlocks both the Grok Bot and the standalone single-file cost_basis_ledger.py CLI from /runtime/cost_basis_ledger.py. It needs Python 3 and the standard library only, emits --json, --markdown or a Form 8949 --csv-out file, and can render a 1200x675 PNG receipt with --receipt-out. It is read-only: it never asks for private keys or seed phrases and never signs or broadcasts anything.