Shoreline: Data-Driven Threshold Estimation of Online Reserves of Cryptocurrency Trading Platforms

Xitong Zhang, He Zhu, Jiayu Zhou

Introduction

Cryptocurrency exchanges face a persistent "Goldilocks" dilemma regarding fund storage. They must maintain hot wallets—online, automated accounts—to facilitate rapid user withdrawals. However, these wallets are primary targets for cyberattacks; by 2018, over $1.5 billion had been stolen from exchanges. Conversely, cold wallets are offline and secure but require manual, time-consuming transfers that can degrade user experience and increase operational costs.

SHORELINE is a deep learning framework designed to optimize this balance. By analyzing dynamic trading networks and historical transaction patterns, it predicts the "optimal threshold"—the minimum amount of currency needed in a hot wallet to ensure operational efficiency while minimizing security risks.

The SHORELINE Framework

The authors propose a two-stage approach to estimate these thresholds dynamically, moving beyond simple historical averages that fail to capture the volatility of the crypto market.

Overview of the SHORELINE framework, integrating historical data and dynamic trading graphs to predict hot wallet reserves.

1. Dynamic Networks Embedding

Unlike traditional models that only consider withdrawal volume, SHORELINE treats different cryptocurrencies as nodes in a dynamic graph. Edges represent trades between these assets. The system utilizes Temporal Random Walks to capture how liquidity flows through the exchange over time. These sequences are processed by a Bidirectional LSTM (Bi-LSTM) to generate contextual embeddings—mathematical representations that capture a currency's evolving role and importance within the trading ecosystem.

2. Optimal Threshold Estimation (OTE)

The framework combines these embeddings with historical withdrawal and deposit data. A second LSTM layer then predicts the future reserve threshold. A defining feature of SHORELINE is its custom loss function, which incorporates a "security concern" coefficient ($\alpha$). This parameter allows exchange operators to tune the model: a higher $\alpha$ prioritizes security (lower hot wallet reserves), while a lower $\alpha$ favors operational speed (keeping more funds ready for users).

Key Insights: Trading as a Lead Indicator

A central premise of SHORELINE is that internal trading activity often precedes external withdrawals. For example, if users begin trading Bitcoin (BTC) for Ethereum (ETH) in large volumes, the exchange can anticipate a surge in ETH withdrawal requests before they occur. By capturing these "local structures" and liquidity hubs, the model provides a proactive safety buffer rather than a reactive one based solely on past withdrawal averages.

Evaluation and Results

The researchers evaluated SHORELINE using both general social network datasets (to test the embedding method's robustness) and proprietary, anonymized data from a major cryptocurrency exchange involving 10 different tokens (including BTC, VET, and ETH).

Performance Metrics

  • Embedding Accuracy: On social network benchmarks, SHORELINE’s embedding method (LSTM-TW) consistently outperformed standard algorithms like node2vec and DeepWalk, proving its ability to capture temporal network evolution.
  • Operational Efficiency: In exchange tests, SHORELINE achieved significantly lower loss metrics compared to "Historical Mean" baselines. It reduced both "integration" (the total time funds are exposed online) and "surplus" (unnecessary idle funds), providing the same level of service with less capital at risk.
The impact of the security coefficient (alpha) on the predicted threshold and operational loss for a specific currency.

As shown in the results for individual currencies, adjusting the $\alpha$ coefficient allows operators to visualize the direct tradeoff between the safety threshold and potential operational loss, enabling data-driven risk management.

Limitations and Future Outlook

While effective, the authors note that scaling SHORELINE to exchanges with hundreds of tokens will require more efficient graph processing techniques. Additionally, they suggest that moving toward an end-to-end, multi-modal training approach—rather than training the embedding and estimation components separately—could further enhance predictive accuracy. Finally, improving the interpretability of these "black box" models remains a priority for high-stakes financial security environments.

Summary updated

Abstract

With the proliferation of blockchain projects and applications, cryptocurrency exchanges, which provides exchange services among different types of cryptocurrencies, become pivotal platforms that allow customers to trade digital assets on different blockchains. Because of the anonymity and trustlessness nature of cryptocurrency, one major challenge of crypto-exchanges is asset safety, and all-time amount hacked from crypto-exchanges until 2018 is over $1.5 billion even with carefully maintained secure trading systems. The most critical vulnerability of crypto-exchanges is from the so-called hot wallet, which is used to store a certain portion of the total asset of an exchange and programmatically sign transactions when a withdraw happens. Whenever hackers managed to gain control over the computing infrastructure of the exchange, they usually immediately obtain all the assets in the hot wallet. It is important to develop network security mechanisms. However, the fact is that there is no guarantee that the system can defend all attacks. Thus, accurately controlling the available assets in the hot wallets becomes the key to minimize the risk of running an exchange. However, determining such optimal threshold remains a challenging task because of the complicated dynamics inside exchanges. In this paper, we propose Shoreline, a deep learning-based threshold estimation framework that estimates the optimal threshold of hot wallets from historical wallet activities and dynamic trading networks. We conduct extensive empirical studies on the real trading data from a trading platform and demonstrate the effectiveness of the proposed approach.
BibTeX
@inproceedings{zhang2020shoreline,
  author = {Xitong Zhang and He Zhu and Jiayu Zhou},
  title = {{Shoreline: Data-Driven Threshold Estimation of Online Reserves of Cryptocurrency Trading Platforms}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i01.5472},
}
Figure