scenario_forge is a Python library for generating GOVERNED, ARTIFICIAL (NOT synthetic) crypto AML scenarios. This is not a generic synthetic data generator — it is a controlled adversarial scenario compiler designed for:
- Stress-testing AML models
- Demonstrating failure modes
- Educating analysts and regulators
- Model evaluation and benchmarking
- ✅ All data is artificial by design and explicitly labeled as such
- ✅ Every scenario has an INTENT (e.g., sanctions evasion, laundering, false positive trap)
- ✅ Every output includes provenance metadata and a cryptographic hash
- ✅ Outputs are graph-based (entities, transactions, timestamps)
- ✅ Outputs include human-readable narratives explaining the crime
- ✅ For demos and internal testing only, not production use
pip install -e .from scenario_forge import cross_chain_laundering, generate_narrative, export_json
# Generate a scenario
scenario = cross_chain_laundering()
# Generate narrative
narrative = generate_narrative(scenario)
print(narrative)
# Export to JSON
export_json(scenario, Path("scenario.json"))
# Get risk summary
risk_summary = scenario.get_risk_summary()
print(f"Transactions: {risk_summary['total_transactions']}")
print(f"Integrity Hash: {scenario.scenario_hash}")See examples/generate_scenario.py for a complete example:
python examples/generate_scenario.py- Wallet: Address, chain, jurisdiction, balance
- Transaction: From/to wallets, asset, amount, fee, timestamp
- Asset: Symbol, chain, decimals
- Chain: Name, chain_id, type (EVM, UTXO)
- Jurisdiction: Code, name, regulatory tier
Reusable strategy classes that generate transaction subgraphs:
- PeelChain: Chain of small transfers
- CrossChainBridge: Cross-chain transfers via bridges
- MixerObfuscation: Mixer service patterns
- NFTWashTrading: Circular NFT trades
- DormancyCooling: Time delays between phases
- FalsePositiveTrap: Legitimate patterns that trigger false positives
5 hard-coded scenario templates:
- cross_chain_laundering: Bridge + CEX exit
- mixer_ransomware_liquidation: Mixer-based ransomware
- sanctions_evasion_jurisdiction_hopping: Sanctions evasion
- nft_wash_trading_extraction: NFT wash trading
- false_positive_legitimate_pattern: False positive trap
Each scenario includes:
- Scenario ID (UUID)
- Intent label
- Jurisdiction assumptions
- Motifs used
- Transaction graph (NetworkX)
- Entity roles
- Provenance metadata
- SHA-256 integrity hash
- JSON: Full scenario with graph, metadata, narrative
- CSV: Transaction table export
- Markdown: Human-readable narrative
All exports include:
ARTIFICIAL_DATA_DO_NOT_USE_FOR_REAL_CASESwarning- Intent label
- Creation timestamp
- Scenario hash
Every export includes:
⚠️ ARTIFICIAL_DATA_DO_NOT_USE_FOR_REAL_CASES header- Intent label
- Creation timestamp
- Scenario hash (SHA-256)
- Provenance metadata
- Demonstration clarity over surface area: Focused on 5 templates, 6 motifs, 3 exporters
- NetworkX internally, simple exports externally: Complex graphs internally, simple structures exported
- Hashlib SHA-256 with extension points: Simple hashing with room to grow
- No UI, no ML, minimal dependencies: Keep it simple but rigorous
- Python >= 3.11
- networkx >= 3.0
Proprietary - GH Systems