AMM-Events / README.md
Jackson668's picture
Update README.md
41aaf63 verified
metadata
license: mit
task_categories:
  - time-series-forecasting
  - tabular-classification
tags:
  - finance
  - defi
  - amm
  - ethereum
  - cryptocurrency
  - transaction
  - microstructure
pretty_name: AMM-Events (Event-Aware DeFi Dataset)
size_categories:
  - 100M<n<1B

AMM-Events: A Multi-Protocol DeFi Event Dataset

Dataset Description

AMM-Events is a high-fidelity, block-level dataset capturing 8.9 million on-chain events from the Ethereum mainnet, specifically designed for event-aware forecasting and market microstructure analysis in Decentralized Finance (DeFi).

Unlike traditional financial datasets based on Limit Order Books (LOB), this dataset focuses on Automated Market Makers (AMMs), where price dynamics are triggered exclusively by discrete on-chain events (e.g., swaps, mints, burns) rather than continuous off-chain information.

  • Paper Title: Towards Event-Aware Forecasting in DeFi: Insights from On-chain Automated Market Maker Protocols
  • Total Events: 8,917,353
  • Time Span: Jan 1, 2024 – Sep 16, 2025
  • Block Range: 18,908,896 – 23,374,292
  • Protocols: Uniswap V3, Aave, Morpho, Pendle
  • Granularity: Block-level timestamps & transaction-level event types

Supported Tasks

  • Event Forecasting: Predicting the next event type (classification/TPP) and time-to-next-event (regression/TPP).
  • Market Microstructure Analysis: Analyzing causal synchronization between liquidity events and price shocks.
  • Anomaly Detection: Identifying "Black Swan" traffic surges or congestion events.

Dataset Structure

The data is organized into a standardized JSON format. Each entry decouples complex smart contract logic into interpretable metrics.

Data Fields

  • block_number (int): The Ethereum block height where the event occurred.
  • timestamp (int): Unix timestamp of the block.
  • transaction_hash (string): Unique identifier for the transaction.
  • protocol (string): Origin protocol (Uniswap V3, Aave, Morpho, or Pendle).
  • event_type (string): The category of the event (Swap, Mint, Burn, UpdateImpliedRate, etc.).
  • payload (dict): Protocol-specific metrics (e.g., amount0, amount1, liquidity, tick for Uniswap).

Data Splits

The dataset covers 359 liquidity pools selected for high activity and representativeness:

  • Pendle: 296 pools (Yield Trading)
  • Aave: 53 pools (Lending)
  • Uniswap V3: 5 pools (Spot Trading)
  • Morpho: 5 pools (Lending Optimization)

Usage

Loading the Data

You can load this dataset directly using the Hugging Face datasets library:

from datasets import load_dataset

dataset = load_dataset("Jackson668/AMM-Events")

# Example: Accessing the first train example
print(dataset['train'])