← Back to TaxRail · Brazil Lei 14.754 Guide →

US IRS 1099-DA · BASE · x402 v2

Why Autonomous Trading Agents on Base Should Simulate Taxes Before Every Swap

Under 2025–2026 IRS wallet-by-wallet reporting rules (Form 1099-DA & Form 8949), brokers and custodians default to FIFO (First-In, First-Out) unless a trader or software agent explicitly records Specific Identification (SpecID) / HIFO lot selection before settlement. For an autonomous DeFi or treasury agent holding early low-basis ETH alongside recent higher-basis lots, naive FIFO routinely triggers 15%–37% unnecessary tax leakage.

$0-Upfront 1-Click Execution + 3-Step Pre-Trade Tax Guardrail

  1. Free Simulation Preview: Call POST https://api.taxrail.online/api/v1/check-tax-impact (or MCP tool check_tax_impact) to get deterministic baselineTaxUsd, optimizedTaxUsd, taxSavedUsd, and an unlockable planId.
  2. 1-Click $0-Upfront Execution (Pay 10% From Operation): Call POST https://api.taxrail.online/api/v1/prepare-execution ($0 upfront) to get ready-to-sign 0x v2 swap calldata (including TLH rotations like ETH → wstETH) or Aave v3 atomic borrow batch with TaxRail's exact 10% verified-savings fee embedded inside the operation. Broadcast the tx, then call POST https://api.taxrail.online/api/v1/claim-dossier with the txHash to unlock SpecID lots & IRS Form 8949 CSVs.
  3. $0.01 Guardrails & TLH Scans: Call GET /api/v1/x402/pre-trade-check or GET /api/v1/x402/tlh-scan?walletAddress=0x...&chain=base&asset=ALL before December 31 to harvest unrealized losses across up to 25 tokens in one call.

Python Integration (pip install taxrail)

from taxrail import TaxRailClient

client = TaxRailClient(referrer_wallet="0xYourAgentWallet")
preview = client.check_tax_impact(
    jurisdiction="US",
    chain="base",
    target_asset="ETH",
    sell_quantity=1.0,
    wallet_address="0x849151d7D0bF1F34b70d5caD5149D28CC2308bf1",
)
print("Tax saved (USD):", preview["taxSavedUsd"], "| Plan ID:", preview["planId"])

Machine-Readable Discovery Endpoints