Crypto Taxation in India: Building a TDS Reporting Architecture under Section 194S

First published 2026-06-27 · Updated June 27, 2026 · Web3 · 14 min read

TL;DR / Quick Take

A developer guide on building transactional ledgers, FIFO matching systems, and automated tax reporting pipelines to comply with the 1% TDS (Section 194S) and 30% capital gains taxes on virtual digital assets (VDA) in India.

TDS Rate
1% on every trade
Cap Gains
30% flat tax
Audit
Form 26Q automation

Section 194S: The 1% TDS Requirement

Under Section 194S of the Income Tax Act, any entity facilitating the transfer of a Virtual Digital Asset (VDA) must deduct 1% of the transaction value as Tax Deducted at Source (TDS). This rule applies to all crypto exchanges, Web3 gaming platforms, and NFT marketplaces operating in India. The tax must be deducted on the gross transaction value immediately during trade execution.

For matching engine architectures, this means every trade order must execute a tax subtraction sub-routine. When a user buys or sells a token, the execution engine splits the trade output: 99% is credited to the counterparty, and 1% is deducted and routed to a custody fiat pool for monthly tax remittance.

FIFO Token Valuation Ledger

India enforces a flat 30% tax on capital gains realized from VDA transfers. Crucially, tax laws forbid offsetting losses from one token against gains from another. To calculate capital gains accurately, exchanges must implement First-In, First-Out (FIFO) accounting ledgers.

When a user executes a sell order, the FIFO engine queries the user's VDA purchase logs (tax lots) to identify the oldest unspent purchase of that token. It computes the difference between the sell price and the original purchase price (cost basis). The calculated gain is logged as a taxable event, and a detailed tax lot report is made available to the user for filing their annual income tax returns.

Filing Automation: Form 26Q

Deducting TDS is only the first step. Exchanges must remit the accumulated tax to the Income Tax Department monthly and file quarterly Form 26Q returns listing PAN-level deductions. Because exchanges process millions of trades daily, manually preparing these forms is impossible.

Developers build automation pipelines that aggregate daily transaction records, group them by user PAN, validate PAN numbers against government databases using e-KYC APIs, and format the output into the NSDL file format. This file is then remitted via secure SFTP tunnels to designated banking portals for bulk payment.

FIFO Profit Matching Logic (Python)

def calculate_capital_gain(sell_qty, sell_price, buy_lots): """ Calculates capital gains using FIFO. buy_lots is a list of dicts: [{'qty': 1.5, 'price': 30000}, ...] sorted by date. """ gains = 0.0 remaining_sell = sell_qty for lot in buy_lots: if remaining_sell <= 0: break if lot['qty'] == 0: continue matched_qty = min(remaining_sell, lot['qty']) cost_basis = matched_qty * lot['price'] revenue = matched_qty * sell_price lot_gain = revenue - cost_basis # VDA losses cannot offset other gains, but we must record zero gains if negative gains += max(0.0, lot_gain) lot['qty'] -= matched_qty remaining_sell -= matched_qty if remaining_sell > 0: raise ValueError("Insufficient purchase history to match FIFO sale.") return gains

Tax Audit Trails and quarterly NSDL Filings

To withstand government audits, Indian Web3 exchanges must maintain detailed tax audit trails. Every transaction ledger entry must link directly to the buyer's PAN, the trade ID, and the bank transaction reference. This ledger must be stored in encrypted, tamper-evident databases to satisfy DPDPA data protection standards.

During quarterly NSDL filings, tax compliance engines generate consolidated reports mapping PAN details to deducted TDS amounts. These files are signed using corporate digital signature certificates (DSC) and submitted to the government portal. Discrepancies in PAN validation or transaction amounts trigger immediate audit flags, making data precision the most critical engineering requirement in Web3 billing infrastructure.

Core Takeaways for Product Teams

Building high-scale software applications in India requires a deep understanding of local constraints, high latency networks, and rapid regulatory updates. Product managers and engineering leads must prioritize structural data integrity, strict audit logs for compliance, and telemetry monitoring at the edge. By designing architectures that balance user experience with regulatory requirements, platforms can successfully minimize churn, optimize transaction success rates, and build robust technology stacks that support sustainable growth in India's competitive digital economy. Keeping stacks aligned with RBI and government portals is no longer optional; it is the core foundation of product engineering.

Subscribe to the Product Growth Daily Brief

Join 2,300+ product leaders getting real-time insights, compliance breakdowns, and deep technology teardowns delivered daily.

Subscribe to the Brief →