File size: 2,781 Bytes
41aaf63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
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:

```python
from datasets import load_dataset

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

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