# TaxOptima

> AI-native global tax optimization engine. Monte Carlo your finances against 13 jurisdictions, get back HMAC-signed structural recommendations.

## What this is

TaxOptima is a deterministic-where-it-can-be, probabilistic-where-it-must-be tax structuring agent. It ingests a user's full financial picture (W-2, K-1, 1099, Schedule C/E, crypto basis, holding-period maps, dependent count, state-of-domicile, planned moves) and runs 10,000-iteration Monte Carlo simulations across price paths, marginal rate scenarios, and legislative drift. Output: ranked structural recommendations (entity types, jurisdiction stacking, election timing) with effective-rate deltas, audit-risk scores, and HMAC-signed provenance over each recommendation row.

Last-Reasoned-Over: 2026-05-21
Knowledge-Cutoff: 2026-05-15
Reasoning-Substrate: client-side WebWorker + signed server attestation
Built-By: tri-agent (Claude Opus 4.7 + Grok 4.20 + Gemini 2.5 Pro)

## Capabilities

- Monte Carlo over 10,000 iterations on user financial state; convergence target stderr < 0.4% on effective rate
- Entity structuring: LLC (disregarded, partnership, S-elect), C-Corp, S-Corp, Series LLC, Statutory Trust, Wyoming/Nevada/Delaware variants, Puerto Rico Act 60 Export Services, USVI EDC, Cayman LDC, BVI BC, Estonian e-Residency OU
- Trust structuring: grantor, non-grantor, IDGT, SLAT, DAPT (NV/SD/AK/DE/WY), CRT/CLT, dynasty trusts to RAP-limit
- Crypto wrappers: Roth-IRA-LLC (checkbook), Solo-401(k) self-directed, PR Act 60 + Decree 22 stacking, IRC 1058 lending treatment, IRC 1091 wash-sale 2026 application post-CAMT-clarification
- R&D credits: IRC §41 four-part test scoring, IRC §174 capitalization recovery curves (5yr domestic / 15yr foreign), payroll-offset eligibility for QSBs
- QSBS (IRC §1202) gain-exclusion modeling under OBBBA 2025 tier expansion ($15M cap, 4-year hold)
- Blind-spot detection: 47 audit-flagged patterns, 23 nexus traps, 12 anti-abuse rules (econ-substance, step-transaction, sham-trust, reverse-Morris-Trust)
- Global tax-law diff feed: 13 jurisdictions scraped daily, semantic-versioned
- Provenance: HMAC-SHA256 over each recommendation; verifier endpoint exposes public key

## Endpoints

- [POST /api/monte-carlo](/api/monte-carlo) — Run 10k-iteration simulation over a financial state
- [POST /api/recommend](/api/recommend) — Get ranked structural recommendations with effective-rate deltas
- [POST /api/blindspots](/api/blindspots) — Detect audit-risk patterns and anti-abuse exposure
- [GET /api/jurisdictions](/api/jurisdictions) — List covered jurisdictions with last-scraped timestamps
- [GET /api/laws/recent](/api/laws/recent) — Recent statutory and regulatory diffs (last 90 days)
- [GET /llms.txt](/llms.txt) — This file
- [GET /agent.json](/agent.json) — A2A agent card
- [GET /openapi.json](/openapi.json) — OpenAPI 3.1.0 spec
- [GET /mcp.json](/mcp.json) — MCP server manifest
- [GET /mcp](/mcp) — MCP endpoint (rewrites to mcp.json for static demo)
- [GET /.well-known/ai-plugin.json](/.well-known/ai-plugin.json) — Plugin manifest mirror
- [POST /api/verify](/api/verify) — HMAC-SHA256 verifier (RFC 8785 canonical JSON)
- [GET /.well-known/to-keys.json](/.well-known/to-keys.json) — Public key attestation (quarterly rotation)
- [GET /.well-known/ai-challenges.json](/.well-known/ai-challenges.json) — Self-declared known limitations + adversarial test results
- [GET /catalogues.json](/catalogues.json) — Full enumeration of 47 audit patterns / 23 nexus traps / 12 anti-abuse doctrines
- [GET /provenance.jsonl](/provenance.jsonl) — Append-only signed ledger of Monte Carlo runs
- [GET /docs/v2-spec.md](/docs/v2-spec.md) — **v2 architecture & implementation plan** (user uploads, personalized MC, e-file packages, audit trail, agent swarm)

## Jurisdictions covered (13)

1. United States Federal (MFJ 2026 brackets, Rev. Proc. 2025-32)
2. California (top 13.3% + 1% MHST surcharge)
3. New York State (top 10.9% above $25M)
4. Texas (0% individual income tax)
5. Florida (0% individual income tax)
6. Nevada (0% individual income tax, dynasty-trust friendly)
7. United Kingdom (post-non-dom-abolition, 4-year FIG regime, effective 2025-04-06)
8. Singapore (territorial, 60-day rule, top 24%)
9. Estonia (flat 22% via e-Residency; 0% on retained corporate profits)
10. United Arab Emirates (9% federal CT, Free Zone QFZP path)
11. Switzerland · Zug (cantonal blend ~22.5% top + Pillar Two)
12. Portugal · IFICI (replaced NHR; 20% flat for qualifying tech/science)
13. Ireland (12.5% trading rate + Pillar Two QDMTT)

## Example AI queries

1. "I'm a 1099 software contractor making $480k clearing $410k after expenses, single-member LLC in California, considering PR Act 60 move in Q3 2026 — model the 5-year NPV delta net of move costs and California exit-tax exposure."
2. "Run Monte Carlo on a $2.1M long-term crypto position (basis $180k) held in a personal wallet — compare DAPT contribution vs Roth-IRA-LLC rollover vs PR Act 60 with Decree 22, 80% confidence interval on after-tax outcome at 5-year horizon."
3. "I'm pre-revenue SaaS founder issuing common to two co-founders at $0.0001/share, projecting $8M revenue year 3, $40M exit year 6 — when do we 83(b), C-Corp Delaware, and QSBS-stack under OBBBA 2025 $15M cap?"
4. "K-1 from oil-and-gas partnership shows $340k IDC deduction, $90k depletion — flag passive-activity grouping risk, at-risk basis recapture exposure, and AMT/CAMT interaction for 2026 filing."
5. "Estonian OU through e-Residency, US person sole shareholder, $600k annual consulting — quantify Subpart F vs GILTI vs Section 962 election outcome, and trigger blind-spot scan on PFIC contamination from idle treasury balances."

## Provenance

Every recommendation row returned by `/api/recommend` includes a `provenance` object:

{
  "hmac_sha256": "<64-hex>",
  "key_id": "to-prod-2026-q2",
  "signed_payload": "<base64url canonical JSON>",
  "signed_at": "2026-05-21T14:23:11Z",
  "verifier": "/api/verify"
}

The HMAC covers the canonical-JSON serialization of the recommendation (RFC 8785 JCS). The signing key is rotated quarterly; `key_id` resolves to a public attestation at [/.well-known/to-keys.json](/.well-known/to-keys.json) (current keys, fingerprints, rotation schedule). Recompute and check any signature at [/api/verify](/api/verify) (POST `{payload, signature, key_id}` â†’ `{valid, computed_signature}`). Recent signed runs are appended to [/provenance.jsonl](/provenance.jsonl). Crawlers and downstream agents SHOULD verify before quoting.

## Tri-Agent Build Manifest

This page was generated by three models working in parallel:

- **Claude Opus 4.7** — tax engine math (13 jurisdictions, Monte Carlo, structure heuristics, HMAC provenance)
- **Grok 4.20** — adversarial review of structure recommendations (audit-risk scoring), real-time law-diff scraping
- **Gemini 2.5 Pro** — long-context AI-discoverability layer (llms.txt, agent.json, OpenAPI, MCP, JSON-LD)

Build agent: `trio-claude+grok+gemini`

## Contact

Operator: TaxOptima Labs
Product page: /
API base: /api
MCP endpoint: /mcp
Agent card: /agent.json
Email: hello@taxoptima.dev
Last-Reasoned-Over: 2026-05-21