构建DeFi交易事件数据集,提升对链上价格变动的预测精度。
Towards Event-Aware Forecasting in DeFi: Insights from On-chain Automated Market Maker Protocols

- 基于四类AMM协议构建890万条链上事件数据集,标注交易类型与时间戳。
- 提出不确定性加权损失函数,使时间预测误差平均降低56.41%。
- 适合研究链上定价机制、量化交易或去中心化金融建模的研究者。
自动化做市商(AMM)作为去中心化金融(DeFi)的核心基础设施,通过确定性的储备比率机制驱动链上资产定价。与传统市场不同,AMM的价格动态主要由链上事件(如交换操作)触发,这些事件改变储备比例,而非依赖链下信息的持续响应。因此,事件级分析对理解AMM中的价格形成机制至关重要。然而,现有研究普遍忽视AMM层面的微观结构动态,缺乏覆盖多个协议且事件分类精细的数据集,以及有效的事件感知建模框架。为此,我们构建了一个包含890万条链上事件记录的数据集,涵盖四种代表性AMM协议:Pendle、Uniswap v3、Aave和Morpho,精确标注了交易类型与区块高度时间戳。此外,我们提出一种不确定性加权均方误差(UWM)损失函数,将块间隔回归项引入传统的时点过程(TPP)目标函数,并以同方差性加权不确定性。在八种先进TPP架构上的实验表明,该损失函数使时间预测误差平均降低56.41%,同时保持事件类型预测准确性,为AMM生态中的事件感知预测建立了稳健基准。本文提供了建模链上价格发现离散性与事件驱动特征所需的数据基础与方法框架。所有数据集与源代码已公开。
原文摘要 · Abstract (English)
Automated Market Makers (AMMs), as a core infrastructure of decentralized finance (DeFi), uniquely drive on-chain asset pricing through a deterministic reserve ratio mechanism. Unlike traditional markets, AMM price dynamics is triggered largely by on-chain events (e.g., swap) that change the reserve ratio, rather than by continuous responses to off-chain information. This makes event-level analysis crucial for understanding price formation mechanisms in AMMs. However, existing research generally neglects the micro-structural dynamics at the AMMs level, lacking both a comprehensive dataset covering multiple protocols with fine-grained event classification and an effective framework for event-aware modeling. To fill this gap, we construct a dataset containing 8.9 million on-chain event records from four representative AMMs protocols: Pendle, Uniswap v3, Aave and Morpho, with precise annotations of transaction type and block height timestamps. Furthermore, we propose an Uncertainty Weighted Mean Squared Error (UWM) loss function, which incorporates the block interval regression term into the traditional Time-Point Process (TPP) objective function by weighting the uncertainty with homoscedasticity. Extensive experiments on eight advanced TPP architectures demonstrate that this loss function reduces the time prediction error by an average of 56.41\% while maintaining the accuracy of event type prediction, establishing a robust benchmark for event-aware prediction in the AMMs ecosystem. This work provides the necessary data foundation and methodological framework for modeling the discreteness and event-driven characteristics of on-chain price discovery. All datasets and source code are publicly available. https://github.com/yosen-king/Deep-AMM-Events
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。