Install
openclaw skills install crypto-tax-agentCrypto tax compliance skill for AI agents. Covers 1099-DA reconciliation, cost basis methods (FIFO/HIFO/SpecID), multi-chain transaction reconstruction via Etherscan V2 API, Form 8949 generation, DEX gap analysis, staking/airdrop classification, bridge handling, and wash sale analysis. Use when an agent needs to handle crypto tax work, analyze transaction history, or generate tax forms.
openclaw skills install crypto-tax-agentCrypto tax compliance skill for AI agents. Handles end-to-end tax workflows for digital asset holders: transaction ingestion, cost basis computation, IRS form generation, 1099-DA reconciliation, and audit defense documentation.
| Tax Year | Requirement | Authority |
|---|---|---|
| 2025 (forms due Feb 2026) | Gross proceeds only mandatory. Cost basis voluntary. | IIJA P.L. 117-58; Treasury Decision 10000 (Jul 9, 2024) |
| 2026+ | Gross proceeds + cost basis mandatory for covered securities. | Same |
| Method | Description | Status |
|---|---|---|
| FIFO (First In, First Out) | Oldest units sold first | Default if no election made |
| Specific Identification | Taxpayer designates exact units at time of disposal | Requires contemporaneous documentation |
Every disposal must be traced to a specific tax lot within a specific wallet:
Tax Lot = {
asset,
units_remaining,
acquisition_date,
acquisition_cost_usd,
cost_per_unit_usd,
source_transaction,
wallet_address // Required since TY 2025
}
When assets transfer between wallets or exchanges, the receiving platform has no record of the original acquisition cost. The IRS assumes zero cost basis, making the entire sale amount a taxable gain.
For each zero-basis disposal:
1. Get the asset and wallet where the sale occurred
2. Trace backwards: find the TRANSFER_IN to that wallet
3. Match TRANSFER_IN to a TRANSFER_OUT from another wallet (time ± 30min, same asset, same qty ± fees)
4. At the source wallet, find the original acquisition (BUY, SWAP, INCOME, AIRDROP)
5. Carry that cost basis forward through the transfer chain
6. Document the full chain with tx hashes as proof
A transaction pair is a bridge if:
1. Time correlation: outbound and inbound within ± 30 minutes
2. Amount correlation: same asset, same quantity ± bridge fees
3. Contract match: interaction with a known bridge contract
(Base Bridge, Arbitrum Gateway, Optimism Bridge, Across, Stargate)
4. Chain difference: source chain != destination chain
When a bridge is detected: do NOT count as a disposal. Carry cost basis from the source chain lot to the destination chain lot.
Base endpoint: https://api.etherscan.io/v2/api
A single API key covers all major EVM chains:
| Chain | Chain ID |
|---|---|
| Ethereum | 1 |
| Base | 8453 |
| Arbitrum | 42161 |
| Optimism | 10 |
| Polygon | 137 |
Per wallet, per chain — 5 API calls required:
| Call | Module/Action | What It Returns |
|---|---|---|
| Normal transactions | module=account&action=txlist | ETH/native token transfers, contract calls |
| Internal transactions | module=account&action=txlistinternal | Internal ETH movements (contract-to-contract) |
| ERC-20 transfers | module=account&action=tokentx | Fungible token transfers |
| ERC-721 transfers | module=account&action=tokennfttx | NFT transfers |
| ERC-1155 transfers | module=account&action=token1155tx | Multi-token standard transfers |
Rate limiting: Free tier allows 5 calls/sec. For 5 wallets across 5 chains: 5 x 5 x 5 = 125 calls, completing in ~25 seconds.
/v0/addresses/{address}/transactionsSWAP, TRANSFER, NFT_SALE, STAKE, etc.Every engagement produces the following deliverables:
| Deliverable | Description |
|---|---|
| Form 8949 Part I | Short-term capital gains/losses (held ≤ 1 year) |
| Form 8949 Part II | Long-term capital gains/losses (held > 1 year) |
| Schedule D | Summary of capital gains/losses from Form 8949 |
| TXF Export | Machine-readable file for import into TurboTax, Drake, Lacerte, ProSeries |
| Deliverable | Description |
|---|---|
| 1099-DA Reconciliation Memo | Line-by-line comparison of broker-reported proceeds vs. agent-computed values, with explanations for every discrepancy |
| Complete Transaction Log | CSV of all transactions across all chains/exchanges, normalized to a single schema |
| Tax Position Summary | 1-page overview: total proceeds, total basis, net gain/loss, ordinary income from staking/airdrops, carryover losses |
| Audit Defense Notes | On-chain proof links (block explorer URLs) for every material transaction, transfer chain documentation, basis reconstruction methodology |
| Code | Use Case |
|---|---|
| B | Short-term, basis NOT reported to IRS on 1099-DA |
| E | Long-term, basis NOT reported to IRS on 1099-DA |
| O | Other adjustment (used for bridge reclassification, gas fee basis adjustment) |
The agent normalizes all transactions into these types:
| Type | Tax Treatment | Income Type |
|---|---|---|
BUY | Not taxable (establishes cost basis) | — |
SELL | Capital gain/loss | Capital |
SWAP | Taxable disposition + acquisition | Capital |
TRANSFER_IN | Not taxable (basis carries over) | — |
TRANSFER_OUT | Not taxable (basis carries over) | — |
BRIDGE | Not taxable (basis carries over, flag for review) | — |
INCOME | Ordinary income at FMV | Ordinary |
AIRDROP | Ordinary income at FMV | Ordinary |
STAKE | Not taxable (locks existing asset) | — |
UNSTAKE | Not taxable (unlocks existing asset) | — |
LP_ADD | Potentially taxable (flag for CPA review) | Capital |
LP_REMOVE | Potentially taxable (flag for CPA review) | Capital |
NFT_MINT | Cost basis = mint price + gas | — |
NFT_SALE | Capital gain/loss | Capital |
WRAP | Not taxable (deferred per Notice 2024-57) | — |
UNWRAP | Not taxable (deferred per Notice 2024-57) | — |
BORROW | Not taxable | — |
REPAY | Not taxable | — |
Before finalizing any deliverable, the agent must verify:
| Citation | Topic |
|---|---|
| IRS Notice 2014-21 | Crypto is "property" for tax purposes; general tax treatment |
| IIJA P.L. 117-58 | Infrastructure law mandating broker reporting (1099-DA) |
| Treasury Decision 10000 (Jul 2024) | Final rules implementing 1099-DA |
| IRS Notice 2024-56 | First-year penalty relief for 1099-DA |
| IRS Notice 2024-57 | Deferred reporting for wraps, LPs, staking, lending |
| Rev. Proc. 2024-28 | One-time basis reallocation to per-wallet accounting |
| Rev. Rul. 2023-14 | Staking rewards are ordinary income at receipt |
| CCA 202444009 (Oct 2024) | Confirms staking income treatment |
| H.J. Res. 25 (Apr 2025) | Killed DeFi broker reporting rule |
| IRC Section 1091 | Wash sale rules (does NOT apply to crypto) |
| IRC Section 1221/1222 | Capital asset definition, holding periods |
| Form 8949 Instructions | Reporting codes B, E, O for basis adjustments |