Design patterns for Ethereum smart contracts
Autor(a) principal: | |
---|---|
Data de Publicação: | 2020 |
Tipo de documento: | Dissertação |
Idioma: | por |
Título da fonte: | Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
Texto Completo: | http://hdl.handle.net/10400.22/16441 |
Resumo: | The Ethereum platform has become very popular in recent years in smart contract development, an area in which several programming languages are applied. Solidity, nevertheless is the most popular and widely used. On top of blockchain technology, Ethereum and its smart contracts have enabled developers worldwide to create innovative solutions in various areas such as finance, healthcare, insurance, internet of things, supply chain and others. These solutions are referred to as Decentralized Applications (dapps) and use the distributed nature of blockchain technology to solve problems in a disruptive manner, casting out intermediaries and automating processes. The fact that blockchain transactions triggered by smart contract execution are unchangeable also provides dapps users with a lot of confidence when compared to traditional centralized apps, because dapps’ data becomes tamper-proof. In the context of this work, it was necessary to analyze and look for software design patterns in order to help making the development of Solidity smart contracts simpler and safer, thus giving confidence both to users and developers of dapps built with Ethereum. In an initial phase, a literature review was made and 62 design patterns were found. From this set, 30 design patterns were selected for the practical component of this work. In this stage, 318 smart contracts were analyzed and the 30 previously selected patterns were confirmed. Additionally, four more patterns which had not been identified in the literature review stage were found. The 30 design patterns were divided into four categories: authorization, control, maintenance and security. Efficiency across all these categories was evaluated in terms of gas consumption and security vulnerabilities. Once the research was completed, it became possible to create a set of recommendations for Solidity developers. |
id |
RCAP_97745490aa5b133677a3cdfa311cc83d |
---|---|
oai_identifier_str |
oai:recipp.ipp.pt:10400.22/16441 |
network_acronym_str |
RCAP |
network_name_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository_id_str |
7160 |
spelling |
Design patterns for Ethereum smart contractsBlockchainEthereumSmart ContractsSoliditySecurityGasDesign PatternsThe Ethereum platform has become very popular in recent years in smart contract development, an area in which several programming languages are applied. Solidity, nevertheless is the most popular and widely used. On top of blockchain technology, Ethereum and its smart contracts have enabled developers worldwide to create innovative solutions in various areas such as finance, healthcare, insurance, internet of things, supply chain and others. These solutions are referred to as Decentralized Applications (dapps) and use the distributed nature of blockchain technology to solve problems in a disruptive manner, casting out intermediaries and automating processes. The fact that blockchain transactions triggered by smart contract execution are unchangeable also provides dapps users with a lot of confidence when compared to traditional centralized apps, because dapps’ data becomes tamper-proof. In the context of this work, it was necessary to analyze and look for software design patterns in order to help making the development of Solidity smart contracts simpler and safer, thus giving confidence both to users and developers of dapps built with Ethereum. In an initial phase, a literature review was made and 62 design patterns were found. From this set, 30 design patterns were selected for the practical component of this work. In this stage, 318 smart contracts were analyzed and the 30 previously selected patterns were confirmed. Additionally, four more patterns which had not been identified in the literature review stage were found. The 30 design patterns were divided into four categories: authorization, control, maintenance and security. Efficiency across all these categories was evaluated in terms of gas consumption and security vulnerabilities. Once the research was completed, it became possible to create a set of recommendations for Solidity developers.A plataforma Ethereum tornou-se muito popular nos últimos anos no desenvolvimento de contratos inteligentes (smart contracts), uma área na qual várias linguagens de programação são aplicadas. Solidity, no entanto, é a mais popular e amplamente utilizada. Alicerçada na tecnologia blockchain, a Ethereum e os seus contratos inteligentes permitiram que programadores por todo o mundo criassem soluções inovadoras em várias áreas como finanças, saúde, seguros, internet das coisas, cadeia de abastecimento e outras. Essas soluções são chamadas de aplicações descentralizadas (dapps) e usam a natureza distribuída da tecnologia blockchain para resolver problemas de maneira disruptiva, elminando intermediários e automatizando processos. O facto das transações registadas na blockchain, que são desencadeadas pela execução de clausulas nos contratos inteligentes, também serem imutáveis dá aos utilizadores das dapps muita confiança em comparação com as aplicações centralizadas tradicionais, porque assim elas tornam-se à prova de adulteração de dados. No contexto deste trabalho, foi necessário analisar e procurar padrões de desenho (design patterns) de software, que ajudassem a tornar o desenvolvimento de contratos inteligentes em Solidity mais simples e seguros, dando confiança tanto aos utilizadores como aos programadores nas dapps construídas através da Ethereum. Numa fase inicial, foi realizada uma revisão da literatura onde foram encontrados sessenta e dois padrões de desenho, dos quais trinta foram selecionados para a componente prática deste trabalho. Durante esta componente, foram analisados trezentos e dezoito contratos inteligentes, onde os trinta padrões previamente selecionados foram confirmados. Além disso, foram encontrados mais quatro padrões que não foram encontrados na revisão da literatura. Os trinta padrões de design escolhidos foram divididos em quatro categorias: autorização, controlo, manutenção e segurança. Todas estas categorias foram avaliadas em termos de eficiência no consumo de gás e vulnerabilidades de segurança. Através de todo o trabalho realizado, tanto teórico quanto prático, foi possível criar um conjunto de recomendações para programadores de Solidity.Azevedo, Isabel de Fátima SilvaRepositório Científico do Instituto Politécnico do PortoMoura, Tiago Augusto Pinto2020-11-05T15:33:11Z20202020-01-01T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10400.22/16441TID:202533492porinfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-03-13T13:03:32Zoai:recipp.ipp.pt:10400.22/16441Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T17:36:06.687803Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse |
dc.title.none.fl_str_mv |
Design patterns for Ethereum smart contracts |
title |
Design patterns for Ethereum smart contracts |
spellingShingle |
Design patterns for Ethereum smart contracts Moura, Tiago Augusto Pinto Blockchain Ethereum Smart Contracts Solidity Security Gas Design Patterns |
title_short |
Design patterns for Ethereum smart contracts |
title_full |
Design patterns for Ethereum smart contracts |
title_fullStr |
Design patterns for Ethereum smart contracts |
title_full_unstemmed |
Design patterns for Ethereum smart contracts |
title_sort |
Design patterns for Ethereum smart contracts |
author |
Moura, Tiago Augusto Pinto |
author_facet |
Moura, Tiago Augusto Pinto |
author_role |
author |
dc.contributor.none.fl_str_mv |
Azevedo, Isabel de Fátima Silva Repositório Científico do Instituto Politécnico do Porto |
dc.contributor.author.fl_str_mv |
Moura, Tiago Augusto Pinto |
dc.subject.por.fl_str_mv |
Blockchain Ethereum Smart Contracts Solidity Security Gas Design Patterns |
topic |
Blockchain Ethereum Smart Contracts Solidity Security Gas Design Patterns |
description |
The Ethereum platform has become very popular in recent years in smart contract development, an area in which several programming languages are applied. Solidity, nevertheless is the most popular and widely used. On top of blockchain technology, Ethereum and its smart contracts have enabled developers worldwide to create innovative solutions in various areas such as finance, healthcare, insurance, internet of things, supply chain and others. These solutions are referred to as Decentralized Applications (dapps) and use the distributed nature of blockchain technology to solve problems in a disruptive manner, casting out intermediaries and automating processes. The fact that blockchain transactions triggered by smart contract execution are unchangeable also provides dapps users with a lot of confidence when compared to traditional centralized apps, because dapps’ data becomes tamper-proof. In the context of this work, it was necessary to analyze and look for software design patterns in order to help making the development of Solidity smart contracts simpler and safer, thus giving confidence both to users and developers of dapps built with Ethereum. In an initial phase, a literature review was made and 62 design patterns were found. From this set, 30 design patterns were selected for the practical component of this work. In this stage, 318 smart contracts were analyzed and the 30 previously selected patterns were confirmed. Additionally, four more patterns which had not been identified in the literature review stage were found. The 30 design patterns were divided into four categories: authorization, control, maintenance and security. Efficiency across all these categories was evaluated in terms of gas consumption and security vulnerabilities. Once the research was completed, it became possible to create a set of recommendations for Solidity developers. |
publishDate |
2020 |
dc.date.none.fl_str_mv |
2020-11-05T15:33:11Z 2020 2020-01-01T00:00:00Z |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/masterThesis |
format |
masterThesis |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
http://hdl.handle.net/10400.22/16441 TID:202533492 |
url |
http://hdl.handle.net/10400.22/16441 |
identifier_str_mv |
TID:202533492 |
dc.language.iso.fl_str_mv |
por |
language |
por |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/openAccess |
eu_rights_str_mv |
openAccess |
dc.format.none.fl_str_mv |
application/pdf |
dc.source.none.fl_str_mv |
reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação instacron:RCAAP |
instname_str |
Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
collection |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) |
repository.name.fl_str_mv |
Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação |
repository.mail.fl_str_mv |
|
_version_ |
1799131452000960512 |