Download presentation
Presentation is loading. Please wait.
Published bySara Kirchner Modified over 6 years ago
1
Kickoff Presentation Master’s Thesis: Identification of Programming Patterns in Solidity
Franz Volland, 29th January 2018, Scientific advisor: Ulrich Gallersdörfer
2
Agenda 1 2 3 4 5 6 From Blockchain to Solidity – A Short Introduction
Motivation 3 Research Questions 4 Approach & Methods 5 Possible Pattern Categories 6 Thesis Plan Identification of Programming Patterns in Solidity © sebis
3
From Blockchain to Solidity - A Short Introduction
TIME: PREV. HASH: 98A3B821A7 <TRANSACTIONS> BLOCK 12347 BLOCK 12348 A B : 2Ƀ A C : 0.2Ƀ B –> C : 1Ƀ A B : 2Ξ A Code B Code.do() Solidity: Smart contract programming language Similar to JavaScript Announced 2014 Identification of Programming Patterns in Solidity © sebis
4
Motivation – Why we need Patterns for Solidity
Major Hacks: The DAO: 3.6M Ξ (~3.6 billion $) Parity Multisignature Wallet 2x 150k + 514k Ξ (~0.66 billion $) “We are in Cryptoland. […] It‘s like Australia where anything with a heartbeat will try to kill you.“ - Martin Swende (Ethereum Foundation) Current Problems: Solidity Patterns useful for: A lot of attackers High stakes Language is new for everyone Non trivial to understand Easy to mess up No chance to easily fix mistakes Developers AND Users Identification of Programming Patterns in Solidity © sebis
5
Motivation – Example Exploit: Reentrancy
Total Balance: Ξ userBalances[User]: 100Ξ withdrawBalance withdrawBalance 100Ξ 100Ξ withdrawBalance User Contract Evil Contract Contract 100Ξ +100Ξ Total Balance: 900Ξ userBalances[User]: 0Ξ Total Balance: 0Ξ userBalances[User]: 100Ξ +1000Ξ … Identification of Programming Patterns in Solidity © sebis
6
What is the current state of software engineering in Solidity?
Research Questions What is the current state of software engineering in Solidity? What is the process of designing and implementing smart contracts on the Ethereum blockchain? What are current challenges in smart contract development using Solidity? Are there any best practices or patterns in smart contract development and how can they be categorized? Identification of Programming Patterns in Solidity © sebis
7
Approach & Methods Modified Gang of Four1 Taxonomy: Research on:
Intent Also Known As Motivation Applicability Structure Participants Collaboration Consequences Implementation Sample Code Known Uses Related Patterns Research on: Papers DApp Portals ICO Portals GitHub Blogs Code 1 Gamma et al.: Design Patterns: Elements of Reusable Object-Oriented Software Identification of Programming Patterns in Solidity © sebis
8
Possible Pattern Categories
Security Maintainability Access Restriction Pull over Push Checks-Effects-Interaction Secure Transfer Upgrading Contracts Functionality into Libraries Utility Voting Randomness Crowdfunding Oracle Function Scheduling Auction Bounty Administration Economic State Machine String Compare Pause Assertion Suiciding Packing Structs Memory Array Building Identification of Programming Patterns in Solidity © sebis
9
Thesis Plan December January February March April May June
Literature / Research Concept Creation Information Assembly Evaluation Writing Registration Date Kickoff Presentation Identification of Programming Patterns in Solidity © sebis
10
Franz Volland 17135
11
Patterns included in Solidity Documentation
Identification of Programming Patterns in Solidity © sebis
12
Additional Attacks and Blunders
Identification of Programming Patterns in Solidity © sebis
13
Programming Language Comparison
Feature Java Solidity Haskell Programming Paradigm Object-oriented Contract-oriented Functional Concurrency? Multi-threading Serial execution Polymorphism? Through overloading Through interfaces Parametric & Ad-hoc Static/Dynamic Typing? Statically-typed Strong/Weak Typing? Strong Higher-order Functions? With Lambda expressions (Java8) Not supported Supported Inheritance? Interfaces? Type classes, similar Type inference? Loops? Switches? Via Case-expression If-Else? Identification of Programming Patterns in Solidity © sebis
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.