Smart DeFi Classification

Smart DeFi Classification uses AI to automatically categorize DeFi transactions into human-readable activity types — swap, liquidity provision, lending, borrowing, yield farming, bridge, stake, unstake, claim, and more. It replaces raw smart contract call data with clear, auditable labels that compliance and accounting teams can understand.

Smart DeFi Classification runs automatically on all wallet screenings that include DeFi activity. No configuration is required.


How It Works

  1. Transaction Decoding — The platform decodes smart contract interactions using known ABIs and function signatures from over 2,000 indexed DeFi protocols across all supported EVM chains and Solana.

  2. AI Classification — When a transaction involves an unrecognized contract or ambiguous function call, Claude Sonnet analyzes the decoded event logs, value transfers, and token movements to infer the activity type.

  3. Confidence Scoring — Each classification receives a confidence score:

| Confidence | Range | Meaning | |------------|-------|---------| | High | 95–100% | Known protocol + known function signature. Deterministic match. | | Medium | 75–94% | Known protocol but uncommon function, or AI-classified with strong signal. | | Low | 50–74% | AI-classified with weaker signal. Manual review recommended. | | Unclassified | 50% | Could not be reliably classified. Raw data is shown instead. |

  1. Label Assignment — The classified activity type is applied to the transaction and displayed in screening results, reports, and tax calculations.

Activity Types

The classifier recognizes the following DeFi activity types:

| Activity | Description | Tax Relevance | |----------|-------------|---------------| | Swap | Token-to-token exchange via DEX | Taxable disposal | | Liquidity Add | Adding tokens to a liquidity pool | Depends on jurisdiction | | Liquidity Remove | Removing tokens from a liquidity pool | Depends on jurisdiction | | Lend | Depositing tokens into a lending protocol | Generally not taxable | | Borrow | Borrowing tokens from a lending protocol | Generally not taxable | | Repay | Repaying a borrowed position | Generally not taxable | | Stake | Staking tokens for rewards or governance | Depends on jurisdiction | | Unstake | Withdrawing staked tokens | Depends on jurisdiction | | Claim Rewards | Claiming yield, rewards, or airdrops | Taxable income | | Bridge | Cross-chain transfer via bridge protocol | Generally not taxable | | Wrap / Unwrap | Wrapping native tokens (e.g., ETH → WETH) | Generally not taxable | | Approve | Token spending approval | Not taxable | | NFT Mint | Minting an NFT | Cost basis event | | NFT Sale | Selling an NFT on a marketplace | Taxable disposal | | Governance Vote | Participating in DAO governance | Not taxable | | Flash Loan | Atomic borrow + repay in single transaction | Complex — varies |


Batch Mode

For comprehensive reports and tax reports that analyze hundreds or thousands of transactions, Smart DeFi Classification runs in batch mode:

  • Transactions are grouped by protocol and function signature.
  • Known patterns are classified deterministically (no AI call needed).
  • Only ambiguous transactions are sent to the AI classifier, reducing latency and cost.
  • Typical batch processing: 500–2,000 transactions per second for known protocols, 5–10 seconds for AI-classified transactions.

Supported Protocols

Smart DeFi Classification has deterministic rules for 2,000+ protocols across supported chains. The most commonly encountered include:

| Chain | Major Protocols | |-------|----------------| | Ethereum | Uniswap V2/V3, Aave V2/V3, Compound V2/V3, MakerDAO, Lido, Curve, Balancer, 1inch | | BSC | PancakeSwap, Venus, Alpaca Finance, Biswap | | Polygon | QuickSwap, Aave V3, Balancer, Gains Network | | Arbitrum | GMX, Camelot, Radiant, Pendle | | Optimism | Velodrome, Synthetix, Aave V3 | | Base | Aerodrome, Moonwell, BaseSwap | | Solana | Raydium, Orca, Marinade, Jupiter, Drift |

For protocols not in the deterministic ruleset, the AI classifier provides coverage with confidence scores.


Integration with Tax Reports

DeFi classifications directly feed into the DeFi Tax Report:

  • Swaps are recorded as disposals with cost basis calculated per the selected method (FIFO, WAC, etc.).
  • Rewards and claims are recorded as income at fair market value at the time of receipt.
  • Liquidity events are handled according to the jurisdiction's treatment rules.
  • Classifications with low confidence are flagged in the tax report for manual review.

Always review low-confidence classifications before finalizing tax reports. The AI classifier may misidentify complex multi-step transactions (e.g., leveraged yield farming with nested swaps).


Next Steps

BlockchainAnalysis.io — Digital Asset Compliance Platform