Separate compliance decisions from tax calculations
Both systems consume identity, account, wallet, transaction, and asset data, but they answer different questions. A compliance workflow evaluates whether an action should proceed or be reviewed under a policy. A tax workflow reconstructs economic activity and applies a calculation method for a taxpayer and jurisdiction. Share canonical evidence while keeping policy and calculation engines separate.
Create stable subject, account, wallet, asset, transaction, and source IDs. Store provider payloads before normalization. Every decision or report row should link to the evidence and version that produced it.
Design compliance as a case and policy system
Identity checks, wallet screening, transaction monitoring, Travel Rule messaging, sanctions signals, and analyst review are asynchronous. Return pending, allowed, denied, held, or review-required states with reason codes. Store policy version, facts considered, provider timestamps, reviewer actions, and final disposition.
A vendor score is evidence, not a legal conclusion. Preserve structured factors and uncertainty. Rescreen on appropriate triggers and retain the decision that existed when the action occurred rather than overwriting history with a later label.
Build tax reporting on an immutable ledger
Import and store raw exchange, wallet, DeFi, staking, bridge, and derivative records. Normalize them into acquisitions, disposals, income, fees, transfers, rewards, and adjustments. Link both sides of transfers with confidence and leave unresolved items visible rather than inventing a disposal or basis.
Run cost-basis and lot methods as versioned calculation layers over the ledger. Preserve price source, timestamp, currency, fee treatment, user elections, and software version. A rerun with the same inputs should reproduce the same result.
Use reconciliation as a quality gate
Track imported date ranges, pagination cursors, source errors, and deduplication. Reconcile opening balance plus events to closing balance by account and asset. Compare tokenized asset supply to holder registers, exchange ledgers to statements, and wallet activity to block-aware balances.
Surface missing history, negative balances, unsupported event types, missing basis, absent prices, and unresolved transfers in a review queue. A polished report should never hide an incomplete import.
Protect sensitive identity and financial data
Use encryption, field-level authorization, purpose limitation, export logging, retention rules, and synthetic development data. Separate analyst, support, developer, and auditor access. Do not copy full identity documents or investigative notes into every service.
Webhook events should be signed, deduplicated, and stored before processing. Timeouts do not imply approval. Define fail-open or fail-closed behavior per action and policy, with operator visibility when a dependency is unavailable.
Connect the detailed implementation guides
The compliance workflow article covers KYC, wallet evidence, Travel Rule, cases, policy versions, and privacy. The tax reporting article covers immutable ledgers, transfer matching, lots, valuations, forms, and completeness controls.
For tokenized assets, combine these systems with the RWA lifecycle guide so eligibility and reporting are tied to issuance, transfer, servicing, and redemption evidence.