- When applicable, as the stream progresses, exit each successive gawk
iteration when no applicable records are present (no taxable events
found for the given tag in the given year).
Previously, when no records were found, a reports file was produced
with either a single header-only row or junk data that resulted from
the assumption there would be real data.
A preexisting hack prevented the junk data from being written after
production but this commit will resolve that hack by preventing the
printing of junk data while also preventing the production of a
header-only file.
- Print warnings when no taxable events are found for the given year.
- Add checks:
* Only verify patched files if the patched files are not empty.
* Empty variable checks.
- Creates per-wallet / per-account compliance for IRS Rev. Proc. 2024-28
* Obfuscated keymap now creates a unique indentifier per-wallet /
per-account where all trades, spends and income are now clearly
tied to their respective wallets / accounts.
- Removes support for anonymized ("universal pool") reports.
Issue #51 describes at least a few undocumented bitcoin.tax issues:
- Bicoin.tax gives unexpected cost-basis results when `Fee` is given
with `Total` (when `Total` is given in place of `Price`). The
expectation is that bitcoin.tax will perform the cost-basis
calculation on `Total` when `Fee` is also given.
However, bitcoin.tax *will* give expected cost-basis results if
`Price` is given in place of `Total` (with `Fee` also given) *or* if
`Total` is given *after* local cost-basis adjustments are made (but
*without* `Fee` given).
The rationale for why docker-finance doesn't use `Price`:
* docker-finance has all of the `Total`s; so `Price` isn't
necessary.
* Local price information isn't available for most trades (and
shouldn't be necessary since all `Total`s are available).
- Additionally, when `Fee` is non-fiat (crypto), it now must be marked
as a SPEND in order to be disposed (and to produce an accurate
closing report).
- Finally, if `FeeCurrency` *does* not match either `Symbol` or
`Currency` (e.g., BTC-ETH w/ BNB fee), it's unknown if cost-basis
must be calculated locally as well (if `Total` is given). Local
calculations cannot be done because `Fee` price information is
(almost certainly) not available for this type of trade.
Until upstream can assert that attaching the `Fee` will subsequently
adjust the cost-basis of `Total` *and* dispose of the `Fee` in the
process (while also allowing `Total` to be used in place of `Price`),
the `Fee` (and `FeeCurrency`) column(s) must not be populated and values
instead moved to SPEND (as described above).
Upstream is aware of these issues (since May) and they're in the process
of resolution. In the meantime, docker-finance work-arounds should
suffice for all trades that have a fiat `Fee` and/or a
`Fee`/`FeeCurrency` that matches one side of the trading pair.