Skip to content

Filter/flag scam airdrop contract interactions in transaction history #229

@premiumjibles

Description

@premiumjibles

Problem

Transaction history shows scam airdrop txs as "Contract interaction / N/A" with 0 value. Scammers airdrop tokens to trick users into interacting with malicious contracts. These clutter the tx feed and pose a security risk.

tk ticket: sa-hlzv

Root Cause

Zero spam/scam filtering exists in the agentic tx pipeline. Scam txs hit the 'contract' type fallback in evmParser.ts because: user is not sender, has inputData, and no meaningful token transfers.

Prior Art

Main shapeshift app has reusable spam detection in src/state/blacklist.ts: regex patterns for spammy token names, blacklisted collection IDs, and isSpam() function.

Proposed Approach

Phase 1: Heuristic detection — zero-value contract calls where user is NOT sender + token name regex blacklist from main app
Phase 2: UI treatment — filter by default, show "Hidden scam txs (N)" expandable section
Phase 3: API-based detection (GoPlusLabs, ChainAbuse) — future

Key Files

  • apps/agentic-server/src/lib/transactionHistory/evmParser.ts
  • apps/agentic-server/src/lib/transactionHistory/query/filter.ts
  • /home/sean/Repos/shapeshift/src/state/blacklist.ts (reference patterns)

Acceptance Criteria

  • Scam airdrop txs filtered from default results
  • Filtered count in metadata (spamFiltered: N)
  • Token name/symbol spam patterns ported from main app
  • Legitimate contract interactions NOT filtered
  • includeSpam: true option available in schema

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions