Monthly Tax Reporting
End-of-Month Cut-Off and Snapshotting
Time window – On the final block t of every calendar month (local to the user’s jurisdiction), the protocol emits a
MONTHTAIL
marker into the Tax Graph.Point-in-time state – All cATUs with timestamps ≤ t are frozen into an immutable snapshot. This guarantees that late chain reorganisations or historical re-classifications never bleed into a closed period.
Version pinning – The snapshot stores hashes of the exact rulebook and classification plug-in versions used, ensuring reproducible re-calculation years later.
Report Compiler Pipeline
The compiler runs as a deterministic Rust job on decentralised worker nodes:
Load phase
Streams the snapshot DAG into memory-mapped columnar vectors (Arrow) for fast aggregation.
Aggregation phase
Collapses tens of thousands of cATUs into reporting events (gains, losses, income, fees), respecting cost-basis stacks and holding-period logic.
FX reconciliation
Converts all values into the jurisdiction’s filing currency (EUR for DE/AT/FR, CHF for CH) using oracle-anchored month-end FX rates plus intramonth spot rates for each taxable event.
Validation phase
Runs a rule-based auditor: checks value conservation, detects negative cost bases, flags outliers vs. stochastic expectations, and stamps each finding with a machine-readable severity code.
Serialisation phase
Emits parallel artefacts (PDF, JSON, CSV, XBRL) and a compact binary delta for diff-based storage.
All processing is single-pass and stream-safe; memory usage scales linearly at 3 kB per 1 000 ATUs.
Output Artefacts
Human-readable, paginated summary; multi-language UI strings injected at render time
200–600 kB
JSON
Canonical machine ledger for downstream tooling; follows TaxChain Report Schema v2.3
40–120 kB
CSV
Flat table for Excel / BigQuery; optional for data-scientist workflows
15–40 kB
XBRL
Direct import for national e-filing portals (e.g., Elster in Germany)
60–90 kB
Δ-Binary
LZ4-compressed binary diff vs. prior month; stored on IPFS to reduce redundancy
3–8 kB
The PDF includes four fixed sections:
Executive Overview – taxable income, realised gains/losses, total fees, and withholding suggestions.
Position Ledger – FIFO/LIFO stacks with opening, movement, and closing balances per asset.
Event Log Appendix – row-level detail for every classified event, including hash links back to source transactions.
Validation & Signatures – cryptographic footers (see § 6).
Encryption, Storage & Access
AES-256 GCM envelope encryption – Every artefact is encrypted client-side; keys split via Shamir Secret Sharing (user + optional guardian shard).
IPFS cold storage – Encrypted bundles are pinned across 12 geo-distributed IPFS gateways and referenced in the user’s Tax Graph node.
pNFT gating – A tax advisor possessing a valid Permission NFT can fetch the bundle; decryption rights are baked into the NFT metadata and expire automatically at the date encoded on-chain.
Revocation – Users burn or freeze a pNFT to revoke access; on the next block, all gateway access tokens tied to that NFT are invalidated.
Digital Signatures & Authenticity
To eliminate disputes, every report carries two layers of signing:
User signature – The wallet that owns the Tax Graph signs a SHA-256 digest of the report bundle.
Protocol attestation – The TaxChain DAO multi-sig countersigns, certifying that rulebook checksum x produced hash y.
Both signatures are embedded in the PDF’s X.509 field and in detached JWS files for machine verification. Auditors can cross-verify the hash on-chain against the snapshot anchor referenced in the report.
Regulator-Ready Formatting
Field mapping – Each jurisdiction supplies a mapping file that aligns TaxChain JSON keys with local e-filing field IDs (e.g., German Annex SO Line 42).
Rounding logic – Amounts follow domestic rules (e.g., Germany rounds to full euros; Switzerland retains rappen).
Decimal separators & locales – Automatically rendered (comma vs. point) per ISO LOC-ID in user profile.
Attachment manifest – NFT metadata for each pNFT includes a “manifest hash” that authorities can query to retrieve a minimal audit trail without private portfolio details.
Delta-Aware Updates and Back-Posting
Should a late-arriving transaction appear (e.g., a cross-chain bridge finalises after the month closes), TaxChain:
Generates a delta patch covering only the affected cATUs.
Replays cost-basis stacks for the impacted assets.
Issues a Revision N report bundle, cryptographically linked to the original via a supersedes field.
Notifies the user and any active pNFT holders of the revision via on-chain
ReportUpdate
events and optional off-chain webhook relays.
Revisions are timestamped but never overwrite previous versions, preserving an immutable audit chain.
Developer & Enterprise Integrations
GraphQL download endpoint – Wallet providers can embed a “Download tax report” button that fetches the current PDF via a signed request proxy.
Webhook triggers – Institutions subscribe to a
tax.ready
event to automate accrual booking at month-end.Streaming API – Hedge funds pull interim CSV deltas nightly for provisional P&L accounting.
Performance & Cost
Throughput – A single worker node compiles ~150 000 ATUs per second; horizontal scaling is linear.
Gas footprint – Anchoring the monthly hash to Ethereum mainnet costs < $4 at 30 gwei, paid from the TaxChain fee pool.
Storage – With binary diffs, 10 years of reports for an active DeFi power user consume < 25 MB.
Future Enhancements
Zero-Knowledge Report Proofs – Succinct zk-SNARK gadgets will allow users to prove “total taxable income ≤ €X” without revealing per-trade data.
Real-Time Streaming Reports – Sub-monthly (daily or even hourly) micro-reports for high-frequency desks and algorithmic traders.
Multi-jurisdiction splits – For nomadic users, simultaneously generate partial reports per country based on dynamic residency windows.
AI-Assisted Narratives – Deterministic, template-driven LLM module that auto-writes plain-English explanations of complex tax events for each month’s summary.
Last updated