Towards Event-Aware Forecasting in DeFi: Insights from On-chain Automated Market Maker Protocols
Pith reviewed 2026-05-10 00:11 UTC · model grok-4.3
The pith
A new uncertainty-weighted loss function reduces time prediction errors by 56% in event modeling for DeFi automated market makers.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
Incorporating a block-interval regression term into TPP objectives through an uncertainty-weighted mean squared error loss that assumes homoscedasticity yields an average 56.41% drop in time prediction error on events from Pendle, Uniswap v3, Aave and Morpho, while event-type accuracy remains unchanged.
What carries the argument
The Uncertainty Weighted Mean Squared Error (UWM) loss function, which weights the block-interval regression term by uncertainty under a homoscedasticity assumption and adds it to the standard TPP objective.
If this is right
- Time-aware event forecasts become feasible for AMM price formation without trading off type accuracy.
- The released dataset of 8.9 million labeled events supplies a shared testbed for on-chain modeling.
- The same loss can serve as a benchmark when comparing TPP architectures on discrete blockchain streams.
- Event-driven rather than continuous-time assumptions become practical for DeFi forecasting tasks.
Where Pith is reading between the lines
- The approach could extend to other on-chain streams such as lending liquidations or derivative settlements.
- Better timing predictions might support proactive liquidity provision or reduced slippage in trading bots.
- Relaxing the homoscedasticity assumption on heterogeneous protocols is a natural next test of robustness.
Load-bearing premise
The homoscedasticity assumption used to weight uncertainty in the block-interval term holds across the tested protocols and data conditions.
What would settle it
Finding that the average time-prediction error reduction falls well below 56% on fresh data splits from the same protocols or on additional AMM protocols would show the claimed improvement does not generalize.
Figures
read the original abstract
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
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper claims to fill a gap in DeFi research by constructing a dataset of 8.9 million on-chain event records from Pendle, Uniswap v3, Aave, and Morpho protocols, annotated with transaction types and block timestamps. It proposes the Uncertainty Weighted Mean Squared Error (UWM) loss function for Time-Point Process (TPP) models, which adds a block interval regression term weighted by an uncertainty estimate assuming homoscedasticity. Experiments across eight advanced TPP architectures reportedly show an average 56.41% reduction in time prediction error while preserving event type prediction accuracy, establishing a benchmark for event-aware prediction in AMM ecosystems. The datasets and code are made publicly available.
Significance. If the empirical results hold after addressing the experimental details and validating the core assumption, the work would offer a significant contribution by providing both a comprehensive public dataset for on-chain AMM events and a novel loss function that integrates uncertainty weighting into TPP objectives. This could advance the application of temporal point processes to model the discrete, event-driven nature of decentralized price discovery, with potential implications for forecasting in volatile on-chain environments. The open-sourcing of data and code is a positive aspect that facilitates community validation and extension.
major comments (3)
- [Abstract] The abstract states an average 56.41% error reduction across eight architectures, yet supplies no information on train-test splits, baseline implementations, statistical significance, or ablation of the homoscedasticity weighting; without these details the central performance claim cannot be evaluated.
- [UWM loss] The UWM loss is defined by weighting the squared error term with an uncertainty estimate under homoscedasticity; however, no evidence is provided that this assumption holds for the variable on-chain block intervals, which can differ by orders of magnitude depending on liquidity and protocol mechanics.
- [Experimental results] The reported improvement is presented as an empirical outcome, but given the potential for the weighting to amplify errors in high-variance regimes if homoscedasticity fails, robustness checks such as residual plots or comparisons to alternative weighting schemes are necessary to support the cross-protocol claims.
minor comments (1)
- [Abstract] Consider specifying the exact eight TPP architectures used in the experiments to allow readers to better contextualize the results.
Simulated Author's Rebuttal
We thank the referee for the constructive and detailed comments. We address each major comment point by point below. Revisions have been made to incorporate the requested details, validations, and robustness analyses into the manuscript.
read point-by-point responses
-
Referee: [Abstract] The abstract states an average 56.41% error reduction across eight architectures, yet supplies no information on train-test splits, baseline implementations, statistical significance, or ablation of the homoscedasticity weighting; without these details the central performance claim cannot be evaluated.
Authors: We agree that the abstract's brevity omits key experimental details needed to evaluate the central claim. In the revised manuscript, Section 4.1 now explicitly describes the train-test splits (stratified 70/30 per protocol), baseline implementations (standard TPP losses including NLL and unweighted MSE), and statistical significance (paired t-tests over 5 runs, p < 0.01). An ablation study on the homoscedasticity weighting has been added in Section 5.3. The abstract has been updated to reference these details in the main text. These changes allow full evaluation of the reported 56.41% reduction. revision: yes
-
Referee: [UWM loss] The UWM loss is defined by weighting the squared error term with an uncertainty estimate under homoscedasticity; however, no evidence is provided that this assumption holds for the variable on-chain block intervals, which can differ by orders of magnitude depending on liquidity and protocol mechanics.
Authors: We acknowledge that the original submission provided no explicit validation of the homoscedasticity assumption for block intervals. In the revision, we have added a new analysis in Section 3.2, including empirical distributions of block intervals per protocol and computation of within-protocol variance ratios (all < 2.0), which support the assumption as a reasonable approximation. We also discuss how the uncertainty term provides robustness to cross-protocol differences. This addresses the concern while preserving the loss formulation. revision: yes
-
Referee: [Experimental results] The reported improvement is presented as an empirical outcome, but given the potential for the weighting to amplify errors in high-variance regimes if homoscedasticity fails, robustness checks such as residual plots or comparisons to alternative weighting schemes are necessary to support the cross-protocol claims.
Authors: We appreciate the call for robustness checks. The revised manuscript includes residual plots for time predictions (Appendix Figure A.3) across all eight architectures and four protocols, confirming randomly distributed residuals with no systematic amplification in high-variance regimes. We have also added comparisons to alternative schemes (unweighted MSE and local-variance heteroscedastic weighting) in new Table 5, showing UWM yields the best time-error reduction while preserving event-type accuracy. These results, with statistical tests, support the cross-protocol claims. revision: yes
Circularity Check
No significant circularity; central results are empirical experimental outcomes
full rationale
The paper constructs a dataset of 8.9M on-chain events and defines the UWM loss by adding a block-interval regression term weighted under a homoscedasticity assumption to the standard TPP objective. It then reports an average 56.41% reduction in time-prediction error across eight TPP architectures as the outcome of training and evaluation experiments on that dataset. This reduction is not equivalent to the loss definition by construction, nor does any derivation step reduce to a fitted input renamed as prediction, a self-citation chain, or an ansatz smuggled via prior work. The work is self-contained against its own public code and data splits, with no load-bearing uniqueness theorems or renamings of known results.
Axiom & Free-Parameter Ledger
free parameters (1)
- uncertainty weighting coefficient
axioms (1)
- domain assumption Time-point process models can capture the discrete, event-driven price dynamics of AMMs
Reference graph
Works this paper leans on
-
[1]
The technology of decentralized finance (defi)
Raphael Auer, Bernhard Haslhofer, Stefan Kitzler, Pietro Saggese, and Friedhelm Victor. The technology of decentralized finance (defi). BIS Working Papers 1066, Bank for International Settlements, January 2023
work page 2023
-
[2]
A dynamic model of the limit order book.The Review of Financial Studies, 22(11):4601–4641, 2009
Ioanid Roşu. A dynamic model of the limit order book.The Review of Financial Studies, 22(11):4601–4641, 2009
work page 2009
- [3]
-
[4]
Morpho: Open lending infrastructure, 2026
Morpho Labs. Morpho: Open lending infrastructure, 2026. Accessed: February 5, 2026
work page 2026
- [5]
-
[6]
Differential liquidity provision in uniswap v3 and implications for contract design
Zhou Fan, Francisco J Marmolejo-Cossío, Ben Altschuler, He Sun, Xintong Wang, and David Parkes. Differential liquidity provision in uniswap v3 and implications for contract design. InProceedings of the Third ACM International Conference on AI in Finance, pages 9–17, 2022
work page 2022
-
[7]
Met-meme: A multimodal meme dataset rich in metaphors
Bo Xu, Tingting Li, Junzhe Zheng, Mehdi Naseriparsa, Zhehuan Zhao, Hongfei Lin, and Feng Xia. Met-meme: A multimodal meme dataset rich in metaphors. InProceedings of the 45th international ACM SIGIR conference on research and development in information retrieval, pages 2887–2899, 2022
work page 2022
-
[8]
The poorest man in babylon: A longitudinal study of cryptocurrency investment scams
Muhammad Muzammil, Abisheka Pitumpe, Xigao Li, Amir Rahmati, and Nick Nikiforakis. The poorest man in babylon: A longitudinal study of cryptocurrency investment scams. InProceedings of the ACM on Web Conference 2025, pages 1034–1045, 2025
work page 2025
-
[9]
Daryl J Daley and David Vere-Jones.An introduction to the theory of point processes: volume II: general theory and structure. Springer, 2008
work page 2008
-
[10]
Alan G. Hawkes. Spectra of some self-exciting and mutually exciting point processes.Biometrika, 58:83–90, 1971
work page 1971
-
[11]
Measuring the information content of stock trades.The Journal of Finance, 46(1):179–207, 1991
Joel Hasbrouck. Measuring the information content of stock trades.The Journal of Finance, 46(1):179–207, 1991
work page 1991
-
[12]
Federico Cernera, Massimo La Morgia, Alessandro Mei, and Francesco Sassi. Token spammers, rug pulls, and sniper bots: An analysis of the ecosystem of tokens in ethereum and in the binance smart chain ({ { { { {BNB} } } } }). In32nd USENIX Security Symposium (USENIX Security 23), pages 3349–3366, 2023
work page 2023
-
[13]
Cryp- totrade: A reflective llm-based agent to guide zero-shot cryptocurrency trading
Yuan Li, Bingqiao Luo, Qian Wang, Nuo Chen, Xu Liu, and Bingsheng He. Cryp- totrade: A reflective llm-based agent to guide zero-shot cryptocurrency trading. InProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 1094–1106, 2024
work page 2024
-
[14]
Qiuhan Han, Qian Wang, Atsushi Yoshikawa, and Masayuki Yamamura. Pulsered- dit: A novel reddit dataset for benchmarking mas in high-frequency cryptocur- rency trading.arXiv preprint arXiv:2506.03861, 2025
-
[15]
Kiarash Shamsi, Friedhelm Victor, Murat Kantarcioglu, Yulia Gel, and Cuneyt G Akcora. Chartalist: Labeled graph datasets for utxo and account-based blockchains.Advances in Neural Information Processing Systems, 35:34926–34939, 2022
work page 2022
-
[16]
Bingqiao Luo, Zhen Zhang, Qian Wang, and Bingsheng He. Multi-chain graphs of graphs: A new approach to analyzing blockchain datasets.Advances in Neural Information Processing Systems, 37:28490–28514, 2024
work page 2024
-
[17]
Zipzap: Efficient training of language models for large-scale fraud detection on blockchain
Sihao Hu, Tiansheng Huang, Ka-Ho Chow, Wenqi Wei, Yanzhao Wu, and Ling Liu. Zipzap: Efficient training of language models for large-scale fraud detection on blockchain. InProceedings of the ACM Web Conference 2024, pages 2807–2816, 2024
work page 2024
-
[18]
Hou-Wan Long, Hongyang Li, and Wei Cai. Coinclip: A multimodal framework for assessing viability in web3 memecoins.arXiv preprint arXiv:2412.07591, 2024
-
[19]
Artemis: Detecting airdrop hunters in nft markets with a graph learning system
Chenyu Zhou, Hongzhou Chen, Hao Wu, Junyu Zhang, and Wei Cai. Artemis: Detecting airdrop hunters in nft markets with a graph learning system. In Proceedings of the ACM Web Conference 2024, pages 1824–1834, 2024
work page 2024
-
[20]
Davide Costa, Lucio La Cava, and Andrea Tagarelli. Show me your nft and i tell you how it will perform: Multimodal representation learning for nft selling price prediction. InProceedings of the ACM Web Conference 2023, pages 1875–1885, 2023
work page 2023
-
[21]
Tingsheng Feng, Zhihao Shen, Xi Zhao, Xiaoni Lu, and Yuyang Zhou. Cryp- tomixer: Fine-grained market information-aware mlp networks for individual cryptocurrency trading prediction. InProceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2, pages 603–614, 2025
work page 2025
-
[22]
Money never sleeps: Maximizing liquidity mining yields in decentralized finance
Wangze Ni, Zhao Yiwei, Weijie Sun, Lei Chen, Peng Cheng, Chen Jason Zhang, and Xuemin Lin. Money never sleeps: Maximizing liquidity mining yields in decentralized finance. InProceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 2248–2259, 2024
work page 2024
-
[23]
Available: https://arxiv.org/abs/2411.16277
Jingfeng Chen, Wanlin Deng, Dangxing Chen, and Luyao Zhang. Finml-chain: A blockchain-integrated dataset for enhanced financial machine learning.arXiv preprint arXiv:2411.16277, 2024
-
[24]
Zhen Zhang, Bingqiao Luo, Shengliang Lu, and Bingsheng He. Live graph lab: Towards open, dynamic and real transaction graphs with nft.Advances in Neural Information Processing Systems, 36:18769–18793, 2023
work page 2023
-
[25]
Ex-graph: A pioneering dataset bridging ethereum and x.arXiv preprint arXiv:2310.01015, 2023
Qian Wang, Zhen Zhang, Zemin Liu, Shengliang Lu, Bingqiao Luo, and Bingsheng He. Ex-graph: A pioneering dataset bridging ethereum and x.arXiv preprint arXiv:2310.01015, 2023
-
[26]
Haoyuan Li, Mengxiao Zhang, Maoyuan Li, Jianzheng Li, Junyi Yang, Shuangyan Deng, Zijian Zhang, and Jiamou Liu. Multi-source multi-level multi-token ethereum dataset and benchmark platform.arXiv preprint arXiv:2501.11906, 2025
-
[27]
Gbenga Ibikunle, Frank McGroarty, and Khaladdin Rzayev. More heat than light: Investor attention and bitcoin price discovery.International Review of Financial Analysis, 69:101459, 2020
work page 2020
-
[28]
Khaladdin Rzayev and Gbenga Ibikunle. A state-space modeling of the informa- tion content of trading volume.Journal of Financial Markets, 46:100507, 2019
work page 2019
-
[29]
Alex Sherstinsky. Fundamentals of recurrent neural network (rnn) and long short-term memory (lstm) network.Physica D: Nonlinear Phenomena, 404:132306, 2020
work page 2020
-
[30]
Qiguo Sun, Xueying Wei, and Xibei Yang. Graphsage with deep reinforcement learning for financial portfolio optimization.Expert Systems with Applications, 238:122027, 2024
work page 2024
-
[31]
Risks and returns of uniswap v3 liquidity providers
Lioba Heimbach, Eric Schertenleib, and Roger Wattenhofer. Risks and returns of uniswap v3 liquidity providers. InProceedings of the 4th ACM Conference on Advances in Financial Technologies, pages 89–101, 2022
work page 2022
-
[32]
Sizheng Fan, Tian Min, Xiao Wu, and Cai Wei. Towards understanding gover- nance tokens in liquidity mining: a case study of decentralized exchanges.World Wide Web, 26(3):1181–1200, 2023
work page 2023
- [33]
-
[34]
Hongyuan Mei and Jason M Eisner. The neural hawkes process: A neurally self- modulating multivariate point process.Advances in neural information processing systems, 30, 2017
work page 2017
-
[35]
Multi-task learning using uncer- tainty to weigh losses for scene geometry and semantics
Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncer- tainty to weigh losses for scene geometry and semantics. InProceedings of the IEEE conference on computer vision and pattern recognition, pages 7482–7491, 2018
work page 2018
-
[36]
Recurrent marked temporal point processes: Embedding event history to vector
Nan Du, Hanjun Dai, Rakshit Trivedi, Utkarsh Upadhyay, Manuel Gomez- Rodriguez, and Le Song. Recurrent marked temporal point processes: Embedding event history to vector. InProceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pages 1555–1564, 2016
work page 2016
-
[37]
Qiang Zhang, Aldo Lipani, Omer Kirnap, and Emine Yilmaz. Self-attentive hawkes process. InInternational conference on machine learning, pages 11183– 11193. PMLR, 2020
work page 2020
-
[38]
Simiao Zuo, Haoming Jiang, Zichong Li, Tuo Zhao, and Hongyuan Zha. Trans- former hawkes process. InInternational conference on machine learning, pages 11692–11702. PMLR, 2020
work page 2020
-
[39]
Ricky TQ Chen, Brandon Amos, and Maximilian Nickel
Chenghao Yang, Hongyuan Mei, and Jason Eisner. Transformer embeddings of irregularly spaced events and their participants.arXiv preprint arXiv:2201.00044, 2021
-
[40]
Intensity-free learning of temporal point processes.arXiv preprint arXiv:1909.12127, 2019
Oleksandr Shchur, Marin Biloš, and Stephan Günnemann. Intensity-free learning of temporal point processes.arXiv preprint arXiv:1909.12127, 2019
-
[41]
Takahiro Omi, Kazuyuki Aihara, et al. Fully neural network based model for general temporal point processes.Advances in neural information processing systems, 32, 2019
work page 2019
-
[42]
Neural spatio-temporal point processes.arXiv preprint arXiv:2011.04583, 2020
Ricky TQ Chen, Brandon Amos, and Maximilian Nickel. Neural spatio-temporal point processes.arXiv preprint arXiv:2011.04583, 2020
-
[43]
arXiv preprint arXiv:2307.08097 , year=
Siqiao Xue, Xiaoming Shi, Zhixuan Chu, Yan Wang, Hongyan Hao, Fan Zhou, Caigao Jiang, Chen Pan, James Y Zhang, Qingsong Wen, et al. Easytpp: Towards open benchmarking temporal point processes.arXiv preprint arXiv:2307.08097, 2023
-
[44]
Imputing missing events in continuous-time event streams
Hongyuan Mei, Guanghui Qin, and Jason Eisner. Imputing missing events in continuous-time event streams. InInternational Conference on Machine Learning, pages 4475–4485. PMLR, 2019
work page 2019
-
[45]
susde pool — trade & zap interface
Pendle Finance. susde pool — trade & zap interface. https://app.pendle.finance/ trade/pools/0xe06c3b972ba630ccf3392cecdbe070690b4e6b55/zap/in?chain= plasma, 2025. Accessed: 2025-10-07. KDD ’26, August 09–13, 2026, Jeju, Korea Trovato et al. A Auto Market Makers A.1 AMM Formulation Unlike the Limit Order Book (LOB) mechanism prevalent in centralized exchan...
work page 2025
-
[46]
The temporal analysis, presented in Figure 9, uncovers three critical behavioral patterns relevant to forecasting: (1)Declining Trend and Market Maturation:As shown in Figure 9a, the trend line exhibits a gradual downward slope. This suggests that while the protocol’s Total Value Locked (TVL) may be growing, thevelocityof trading per unit of capital is de...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.