Schachenhofer, B. (2021). On the Security of proof-of-stake directed acyclic graph protocols : a simulation-based approach [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2021.86556
Mit Bitcoin wurde 2008 die erste Kryptowährung veröffentlicht. Mit ihr können Zahlungen getätigt werden, ohne einer zentralen Stelle wie einer Bank vertrauen zu müssen. Dies wird durch einen innovativen Konsensus-Mechanismus ermöglicht, der unter der Bezeichnung Proof-of-Work bekannt ist. Bitcoin ist noch immer die bekannteste und wertvollste Kryptowährung. Über die Jahre sind jedoch einige Probleme offenkundig geworden, wie z.B. der hohe Energieverbrauch und der niedriger Transaktionsdurchsatz. Um das Jahr 2016 kam eine neue Art von Protokollen auf, welche versprach diese beiden Probleme gleichzeitig zu lösen. Diese Protokolle basieren auf dem Proof-of-Stake (PoS) Mechanismus und verwenden gerichtete azyklische Graphen als Datenstruktur. Da es sich hier ebenfalls um Währungen handelt, spielt Sicherheit eine zentrale Rolle. Dies wirft die Frage auf, wie sicher Protokolle dieser Art wirklich sind. Diese Arbeit trägt zur Beantwortung bei, indem Hashgraph im Detail analysiert wird. Hashgraph ist ein vielversprechender Vertreter dieser Protokollart. Die verschiedensten Sicherheits- und Performanceangaben des Protokolls werden mithilfen eines im Zuge der Arbeit entwickelten und veröffentlichten Simulators überprüft. Der Simulator ermöglicht es, das Verhalten des Protokolls unter vier verschiedenen (Angriffs-)Szenarien zu untersuchen. Er bietet dazu umfangreiche Konfigurationsmöglichkeiten an, welche unzählige verschiedene Verläufe ermöglichen. Akteure/Akteurinnen agieren zufällig basierend auf einem veränderbaren Parameter, der Reproduzierbarkeit gewährleistet. Der Simulator selbst verfügt außerdem über eine grafische Benutzerobefläche, wobei Ergebnisse auch als Text-Dateien für weitere Analysen exportiert werden können. In keiner einzigen von tausenden Simulationen wurde der Konsensus-Mechanismus von Hashgraph gebrochen. Basierend auf der Tatsache das Nachrichten zur Synchronsiation beliebig schnell und an beliebige andere Knoten gesendet werden können, kamen jedoch Schwachstellen zu Tage. Diese Arbeit zeigt auf, dass es möglich ist eine widersprüchliche Transaktion zu einer bereits existierenden zu veröffentlichen und diese schneller bestätigt zu bekommen. Weiters wird belohnt, wer Synchronisationen zuerst mit ganz bestimmten Knoten durchführt, was zu einer Überlastung dieser Knoten führen kann. Die präsentierten Ergebnisse zeigen, dass diese Protokollklasse tatsächlich das Potential besitzt, zwei der grundelegenden Probleme von traditionellen Kryptowährungen zu lösen. Die Möglichkeit von Nachrichten-Spam im System kann dies jedoch zunichte machen und ist ein wichtiger Punkt in der Bewertung solcher Protokolle.
de
Bitcoin, the first cryptocurrency was published in 2008 and featured a new way of reaching consensus amongst a set of participants without the need to trust any central authority. It achieved this by introducing a novel consensus mechanism based on Proof-of-Work. Bitcoin is still the most valuable and famous cryptocurrency, but some limitations became more and more noticeable over the years – two of the major ones being high energy consumption and low transaction throughput. Emerging around 2016, a new class of protocols based on Proof-of-Stake (PoS) and using a Directed Acyclic Graph (DAG) as data structure, promises to solve both of these shortcomings at once. As security is crucial, carefully looking at the security properties of any new protocol family before adopting it, is necessary. This leads us to the following question: How secure are these protocols really? This thesis contributes to answering this question by reviewing existing designs in this field and analysing Hashgraph, a promising protocol which combines a PoS mechanism with a DAG structure, in detail. We developed and published a simulator which makes it possible to look closely at the security and performance claims of the protocol under different attack scenarios. It supports simulating adversarial behaviours which we call fork, race and split attacks as well as an honest scenario for comparison. For all of them, numerous configuration options and scenario specific settings are offered. All simulations are executed in a reproducible way based on a configurable seed value. Results can be examined either in a graphical user interface or exported for further analysis. Hashgraph proved resilient against all attempts of breaking the protocol’s security over thousands of simulation runs, featuring all supported attack scenarios. Nevertheless, some weaknesses became apparent in regard to the protocol allowing everybody to perform syncs as fast as possible. Publishing a conflicting transaction to an already existing honest one and getting it finalized earlier could be shown. Additionally, the protocol encourages flooding high stake participants with syncs, leading to the possible effects of unintentional Distributed Denial of Service attacks. Our findings show that PoS DAG protocols have the potential to solve two of the major limitations of traditional blockchains, but before adopting them, one needs to specifically check for mechanisms to prevent message spamming or a lack thereof.