arXiv:2608.29973cs.AIAug 2026

Manuscript Offprint

arXiv:2608.29973

An Open-Source, Event-Driven Pipeline for Cryptocurrency Market Data: Ingestion, Forecasting, and On-Chain Fraud Detection

Basil Sajid Shaikh, Melrick Mascarenhas, Nuzhat Faiz Shaikh

Abstract

Cryptocurrency markets generate high-frequency, multi-source data that is expensive to work with unless a team already has commercial-grade streaming and warehousing infrastructure in place. This paper describes a fully open-source pipeline that reproduces the behavior of a cloud-native, event-driven system — file arrival triggering a message, a message triggering compute — entirely on commodity hardware, using Apache Kafka and a filesystem-watching poller in place of managed cloud triggers. The pipeline partitions historical Gemini exchange data into hourly and minutely files, ingests them asynchronously through two independently grouped Kafka consumers (one for audit logging, one for Spark-triggered ETL), and lands cleaned output in a PostgreSQL warehouse with historical and aggregated schemas plus asset-specific data marts. We use the resulting Bitcoin data mart to compare a seasonal ARIMA model against a single-layer LSTM network for price forecasting, and separately apply Random Forest and Gradient Boosting classifiers, with additional engineered features, to the public Ethereum fraud detection benchmark introduced by Farrugia et al. We report the architecture, the modeling methodology, and the resulting metrics, and we are explicit about the limitations of comparing forecasts issued at different horizons and of evaluating fraud detection on a static, already-labeled dataset.

Keywords: event-driven architecture; Apache Kafka; Apache Spark; time-series forecasting; ARIMA; LSTM; Ethereum; fraud detection; gradient boosting

1. Introduction

Thousands of cryptocurrencies now trade around the clock across dozens of exchanges, and each one produces a continuous stream of order and price data. Working with that data at any serious scale has traditionally meant either paying for a managed streaming and warehousing stack, or building something bespoke and hoping it holds together. Neither option is very accessible to a small research group, a fintech startup validating an idea, or a student project that still needs to look and behave like production infrastructure. This paper is about building the second option properly: a pipeline that behaves like a cloud-native, event-driven system without actually renting one.

The design goal was specific: reproduce the trigger pattern that a managed cloud setup gives you for free — a file lands in storage, that arrival fires an event, the event kicks off compute — using only open-source components running on a single machine. We built this around Apache Kafka and a lightweight filesystem watcher standing in for cloud storage triggers, Apache Spark for the transformation layer, and PostgreSQL for storage. To check that the resulting warehouse is actually useful and not just a working demo, we ran two independent modeling exercises against it: a comparison of classical and deep-learning forecasting methods on Bitcoin prices, and a wallet-level fraud classifier built on a public Ethereum benchmark. The second exercise uses external, previously labeled data rather than data produced by the pipeline itself, and we are careful throughout to keep that distinction visible rather than implying a tighter integration than exists.

This paper makes four contributions:

  • An event-driven ingestion design, built entirely from open-source components, that reproduces the storage-trigger-compute pattern of a managed cloud stack without any cloud spend, using two independent Kafka consumer groups reading the same topic to separate audit logging from compute-triggering.

  • A two-schema warehouse and per-asset data mart layer on PostgreSQL that supports both dashboarding and downstream modeling from the same cleaned data, avoiding a rebuild of the transformation logic for each new consumer.

  • A comparison of a seasonal ARIMA model and an LSTM network for Bitcoin price forecasting, evaluated on data drawn from the pipeline's own output, along with an explicit accounting of why the two evaluations are not on equal footing.

  • A replication and light extension of the Farrugia et al. Ethereum illicit-account benchmark, adding eight engineered ratio and diversity features and comparing Random Forest against Gradient Boosting.