Skip to main content
QUICK REVIEW

[Paper Review] When Blockchain Meets AI: Optimal Mining Strategy Achieved By Machine Learning

Taotao Wang, Soung Chang Liew|arXiv (Cornell University)|Nov 29, 2019
Blockchain Technology Applications and SecurityComputer Science29 references17 citations
TL;DR

This paper proposes a reinforcement learning (RL)-based mining strategy for Bitcoin-like blockchains that dynamically learns optimal mining behavior without prior knowledge of network parameters. By formulating the mining problem as a non-linear Markov Decision Process (MDP) and designing a novel multi-dimensional RL algorithm, the method achieves near-optimal mining rewards even in time-varying network conditions, outperforming model-based strategies when parameters shift dynamically.

ABSTRACT

This work applies reinforcement learning (RL) from the AI machine learning field to derive an optimal Bitcoin-like blockchain mining strategy without knowing the details of the blockchain network model. Previously, the most profitable mining strategy was believed to be honest mining encoded in the default blockchain protocol. It was shown later that it is possible to gain more mining rewards by deviating from honest mining. In particular, the mining problem can be formulated as a Markov Decision Process (MDP) which can be solved to give the optimal mining strategy. However, solving the mining MDP requires knowing the values of various parameters that characterize the blockchain network model. In real blockchain networks, these parameter values are not easy to obtain and may change over time. This hinders the use of the MDP model-based solution. In this work, we employ RL to dynamically learn a mining strategy with performance approaching that of the optimal mining strategy by observing and interacting with the network. Since the mining MDP problem has a non-linear objective function (rather than linear functions of standard MDP problems), we design a new multi-dimensional RL algorithm to solve the problem. Experimental results indicate that, without knowing the parameter values of the mining MDP model, our multi-dimensional RL mining algorithm can still achieve the optimal performance over time-varying blockchain networks.

Motivation & Objective

  • To address the challenge of deriving optimal mining strategies in dynamic blockchain networks where key parameters like mining power ratio (α) and network delay (γ) are unknown or time-varying.
  • To overcome the limitations of model-based approaches that require full knowledge of the blockchain MDP parameters to compute optimal policies.
  • To develop a learning-based mining strategy that adapts to changing network conditions without retraining from scratch or relying on static models.
  • To demonstrate that RL can achieve mining performance close to the theoretical optimum even when the underlying MDP model is non-linear and complex.
  • To lay the foundation for practical, adaptive mining systems by exploring deep RL and enhanced MDP models in future work.

Proposed method

  • The mining problem is modeled as a non-linear Markov Decision Process (MDP) with a large state-action space, capturing the dynamics of block propagation, mining power, and network delays.
  • A novel multi-dimensional reinforcement learning algorithm is designed to handle the non-linear objective function of the mining MDP, which standard RL methods cannot solve directly.
  • The RL agent learns through trial-and-error interaction with the blockchain environment, updating its policy based on cumulative mining rewards over time.
  • The algorithm uses an ε-greedy exploration strategy with a temperature parameter $ T_{ ho} $ to balance exploration and exploitation during learning.
  • Performance is evaluated using simulation environments with varying $ ho $, $ ho $, and $ ho $, where the agent's mining gain is compared against optimal and selfish mining benchmarks.
  • The method is validated across multiple scenarios, including static and time-varying network parameters, to assess adaptability and convergence.

Experimental results

Research questions

  • RQ1Can reinforcement learning learn an optimal mining strategy without prior knowledge of blockchain network parameters such as mining power ratio (α) and network delay (γ)?
  • RQ2How does the performance of the RL-based mining strategy compare to model-based optimal policies when network parameters change over time?
  • RQ3Can the RL agent adapt its strategy in real-time to maintain high mining rewards in dynamic blockchain environments?
  • RQ4What is the impact of exploration temperature $ T_{ ho} $ on the convergence speed and final performance of the RL mining policy?
  • RQ5How does the RL-based strategy perform relative to selfish mining and optimal policy benchmarks under varying network conditions?

Key findings

  • The RL-based mining strategy achieves mining gains that converge to near-optimal levels even without knowledge of the underlying blockchain MDP parameters.
  • In time-varying environments where α and γ change, the RL agent outperforms fixed optimal policies derived from static MDP models, demonstrating superior adaptability.
  • With $ \alpha = 0.45 $, the RL agent achieves mining gains approaching the theoretical optimum, as shown in convergence plots (Figs. 12–14).
  • The RL agent maintains strong performance across different values of $ T_{ ho} $, with faster convergence observed at higher $ T_{ ho} $, indicating effective exploration.
  • When environment parameters shift (e.g., from (0.35,1) to (0.35,0.5)), the RL strategy adapts and sustains high rewards, while the precomputed optimal policy degrades significantly.
  • The method demonstrates robustness and scalability, with the optimal policy for $ \alpha = 0.35, \gamma = 1 $ derived and tabulated in Table II for $ l^{(a)} \leq 8 $ and $ l^{(h)} \leq 8 $.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.