WeRLman: to tackle whale (transactions), go deep (RL)

Roi Bar Zur, Ameer Abu-Hanna, Ittay Eyal, Aviv Tamar

TL;DR

This paper introduces WeRLman, a novel deep reinforcement learning framework designed to analyze blockchain security incentives, particularly in the presence of "whale transactions" that offer unusually high fees. By accurately modeling these reward variations, WeRLman demonstrates that blockchain security thresholds are significantly lower than previously thought, posing a greater risk of selfish mining.

What Problem Does This Paper Address?

Blockchains like Bitcoin and Ethereum rely on "miners" to validate transactions and create new blocks, incentivized by newly minted coins and transaction fees. A critical aspect of their security is the "security threshold"—the minimum computational power a miner needs to be motivated to engage in "selfish mining," a deviation that can destabilize the network. Previous analyses assumed constant block rewards, but real-world systems exhibit significant reward variability due to "whale transactions" (large fees). This variability creates a complex state space that traditional analysis tools struggle to handle, making it difficult to accurately assess security thresholds. The paper aims to bridge this gap by developing a robust method to analyze these complex incentive structures.

Methods

The core of the paper is WeRLman, a novel deep reinforcement learning (RL) algorithm. It builds upon:

  • Deep Q-Networks (DQN): A standard RL technique for approximating Q-values (expected future rewards).
  • Monte Carlo Tree Search (MCTS): Used for planning and exploring possible future states, enhancing the accuracy of the Q-value estimation.
  • Variance Reduction Techniques: To combat the high sampling noise inherent in applying RL to stochastic blockchain models, WeRLman employs novel methods that exploit the recurrent nature of the system and prior knowledge of transition probabilities.
  • Probabilistic Termination Optimization (PTO): A transformation technique to convert the blockchain's linear objective function (revenue per unit of time) into a standard discounted MDP, making it amenable to RL.
  • Neural Network Scaling and Target Normalization: Custom techniques to improve the accuracy of the neural network approximations, crucial for the subtle differences in blockchain incentives.

The authors also introduce a simplified model of the blockchain that can be solved with traditional dynamic programming, providing a lower bound for comparison and validation.

Datasets

The paper uses publicly available data for:

  • Bitcoin: Historical block rewards from October 1, 2020, to September 30, 2021.
  • Ethereum: Transaction data from September 1–30, 2021.

These datasets are used to parameterize the models and evaluate the real-world implications of the findings.

Key Insights and Ideas

  • Whale Transactions Significantly Lower Security Thresholds: The most striking insight is that the presence of infrequent, high-reward "whale transactions" makes blockchains much more vulnerable to selfish mining. This is because the potential for a large payout incentivizes deviation even for miners with relatively small computational power.
  • Fee Variability is a Major Security Concern: Unlike constant reward models, reward variability (driven by fees) directly erodes blockchain security. The paper quantifies this negative relationship.
  • Deep RL is Crucial for Accurate Analysis: Traditional methods struggle with the complexity introduced by reward variability. WeRLman's novel RL approach, with its specialized techniques, is shown to be significantly more accurate.
  • Future Bitcoin Security is a Concern: As Bitcoin's block subsidy halves over time, transaction fees will become a larger proportion of miner rewards. This shift, combined with fee variability, is projected to drastically reduce the security threshold, potentially below the size of large mining pools.

Key Results

  • Near-Optimal Accuracy: WeRLman demonstrates unprecedented accuracy in solving complex blockchain incentive models, outperforming existing state-of-the-art deep RL methods like SquirRL.
  • Reduced Security Thresholds:
    • For Bitcoin, considering fee variability, the security threshold is projected to drop from 0.25 today to 0.2 in 10 years, 0.17 in 20 years, and 0.12 in 30 years.
  • With Ethereum's current fee levels, the threshold for a Nakamoto-like chain drops to 0.17.
  • WeRLman Outperforms Baselines: In both constant and varying reward models, WeRLman consistently achieves higher revenues than simplified models and prior deep RL approaches.

Limitations and Future Work

  • Model Simplifications: The paper acknowledges that the model simplifies certain aspects, such as assuming each block can hold only one transaction and that all transaction fees are equal.
  • Computational Cost: Running WeRLman is computationally intensive, requiring significant resources (e.g., 64 CPU cores for 6-12 hours).
  • Future Work: The authors suggest extending WeRLman to analyze other blockchain architectures (like Ethereum's smart contracts), explore novel architectures, and apply the framework to other large-scale stochastic decision-making problems. They also highlight the need for further research into the implications of miner collusion and more complex transaction fee dynamics.

Summary updated

BibTeX
@article{zur2022werlman,
  author = {Roi Bar Zur and Ameer Abu-Hanna and Ittay Eyal and Aviv Tamar},
  title = {{WeRLman: to tackle whale (transactions), go deep (RL)}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2022},
  doi = {10.1109/sp46215.2023.10179444},
}

Loading related content...

Figure