Padrões de Desenho para Contratos Inteligentes em Ethereum

Detalhes bibliográficos
Autor(a) principal: Costa, João Miguel Ribeiro da
Data de Publicação: 2019
Tipo de documento: Dissertação
Idioma: eng
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/15609
Resumo: The invention of Bitcoin in 2008 offered a solution for a digital currency that could be used without a trusted third-party settling disputes over transactions. Bitcoin relied on a technology known as the blockchain, which can be described as a distributed database that relies on a consensus mechanism (generally Proof Of Work is employed) to be resilient against tampering. Ethereum, launched in 2015, leveraged the blockchain technology to augment the initial proposal of Bitcoin, enabling computational statements to be executed as part of each block validation. The platform offers a Turing-complete runtime environment (the Ethereum Virtual Machine), which can run smart contracts - scripts that verify and enforce the execution of predefined legal contracts. The technical development of smart contracts present significant challenges that are not well modeled by the current body of knowledge and practices of software engineering. In fact, some of the characteristic of blockchain make the contract execution uncontrollable by the programmer and immutable after deployment. Also, the potential security risks are considerable, since there is a large incentive to exploit vulnerabilities in a smart contract for financial gain. Considering the concerns presented above, the establishment of well understood and welldefined design patterns for the development of smart contracts is of paramount importance. In the realm of software engineering, design patterns are defined as generic and reusable solutions to common problems in software design. In the context of this work, a survey of design patterns that target the Ethereum framework was performed, with an extensive analysis regarding the context in which they can be employed, as well as implementations, examples and consequences of their use. A total of 11 design patterns were analysed. The design patterns identified for the Ethereum framework focus on several concerns specific to this platform – most of these concerns revolve around safety, upgradeability, and the limitations inherent to the sandboxed approach of the Ethereum Virtual Machine. A Decentralized Application (dApp) was created to showcase the employment of several of the identified contracts, and to highlight the value they can provide. This dApp offers a framework for decentralized betting in a trustless environment, where neither the user needs to trust the owner nor vice-versa. The dApp implements several use cases that are reliant on the identified design patterns.
id RCAP_3f9ea39a106f80875fc38c82b9484b89
oai_identifier_str oai:recipp.ipp.pt:10400.22/15609
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 Padrões de Desenho para Contratos Inteligentes em EthereumDesign Patterns for Ethereum Smart ContractsBlockchainEthereumDesign patternsSmart contractsBlockchain software engineeringThe invention of Bitcoin in 2008 offered a solution for a digital currency that could be used without a trusted third-party settling disputes over transactions. Bitcoin relied on a technology known as the blockchain, which can be described as a distributed database that relies on a consensus mechanism (generally Proof Of Work is employed) to be resilient against tampering. Ethereum, launched in 2015, leveraged the blockchain technology to augment the initial proposal of Bitcoin, enabling computational statements to be executed as part of each block validation. The platform offers a Turing-complete runtime environment (the Ethereum Virtual Machine), which can run smart contracts - scripts that verify and enforce the execution of predefined legal contracts. The technical development of smart contracts present significant challenges that are not well modeled by the current body of knowledge and practices of software engineering. In fact, some of the characteristic of blockchain make the contract execution uncontrollable by the programmer and immutable after deployment. Also, the potential security risks are considerable, since there is a large incentive to exploit vulnerabilities in a smart contract for financial gain. Considering the concerns presented above, the establishment of well understood and welldefined design patterns for the development of smart contracts is of paramount importance. In the realm of software engineering, design patterns are defined as generic and reusable solutions to common problems in software design. In the context of this work, a survey of design patterns that target the Ethereum framework was performed, with an extensive analysis regarding the context in which they can be employed, as well as implementations, examples and consequences of their use. A total of 11 design patterns were analysed. The design patterns identified for the Ethereum framework focus on several concerns specific to this platform – most of these concerns revolve around safety, upgradeability, and the limitations inherent to the sandboxed approach of the Ethereum Virtual Machine. A Decentralized Application (dApp) was created to showcase the employment of several of the identified contracts, and to highlight the value they can provide. This dApp offers a framework for decentralized betting in a trustless environment, where neither the user needs to trust the owner nor vice-versa. The dApp implements several use cases that are reliant on the identified design patterns.A invenção da Bitcoin em 2018 disponibilizou uma solução para uma moeda digital que poderia ser usada sem a necessidade de envolver terceiros para a mediação de transações. A Bitcoin recorre a uma tecnologia conhecida como blockchain, que consiste numa base de dados distribuída, assente num mecanismo de consenso resistente a alterações não acordadas. Ethereum, lançada em 2015, utiliza a mesma tecnologia da blockchain para oferecer uma plataforma que se baseia na Bitcoin, mas que também permite a execução de instruções como parte do processo de validação de cada bloco. A plataforma permite correr contratos inteligentes (smart contracts) - scripts que verificam e garantem a correta execução de um contrato predefinido. O desenvolvimento técnico de contratos inteligentes apresenta desafios significativos que não são atualmente modelados pela área de engenharia de software. De facto, algumas das caraterísticas da blockchain fazem com que a execução de contratos não seja controlável pelo programador e também com que estes contratos sejam imutáveis após serem colocados na rede principal de Ethereum. Tendo em conta os pontos anteriores, é importante o estabelecimento de padrões de desenho (design patterns) bem definidos para serem usados em contratos inteligentes. No contexto deste trabalho, foi realizada uma análise dos padrões de desenho usados em Ethereum, tendo em conta o contexto em que são utilizados, as suas implementações e exemplos da sua utilização em contratos existentes. Um total de 11 padrões de desenho foram identificados e analisados. Uma Decentralized Application (dApp) foi desenvolvida para demonstrar o emprego dos padrões de desenho identificados. Esta dApp disponibiliza uma framework para se efetuar apostas de uma forma descentralizada, em que nem o utilizador necessita de confiar no dono do contrato, nem vice-versa.Azevedo, Isabel de Fátima SilvaRepositório Científico do Instituto Politécnico do PortoCosta, João Miguel Ribeiro da2020-11-06T01:30:21Z20192019-01-01T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10400.22/15609TID:202343022enginfo: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-13T12:59:43Zoai:recipp.ipp.pt:10400.22/15609Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T17:35:19.123467Repositó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 Padrões de Desenho para Contratos Inteligentes em Ethereum
Design Patterns for Ethereum Smart Contracts
title Padrões de Desenho para Contratos Inteligentes em Ethereum
spellingShingle Padrões de Desenho para Contratos Inteligentes em Ethereum
Costa, João Miguel Ribeiro da
Blockchain
Ethereum
Design patterns
Smart contracts
Blockchain software engineering
title_short Padrões de Desenho para Contratos Inteligentes em Ethereum
title_full Padrões de Desenho para Contratos Inteligentes em Ethereum
title_fullStr Padrões de Desenho para Contratos Inteligentes em Ethereum
title_full_unstemmed Padrões de Desenho para Contratos Inteligentes em Ethereum
title_sort Padrões de Desenho para Contratos Inteligentes em Ethereum
author Costa, João Miguel Ribeiro da
author_facet Costa, João Miguel Ribeiro da
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 Costa, João Miguel Ribeiro da
dc.subject.por.fl_str_mv Blockchain
Ethereum
Design patterns
Smart contracts
Blockchain software engineering
topic Blockchain
Ethereum
Design patterns
Smart contracts
Blockchain software engineering
description The invention of Bitcoin in 2008 offered a solution for a digital currency that could be used without a trusted third-party settling disputes over transactions. Bitcoin relied on a technology known as the blockchain, which can be described as a distributed database that relies on a consensus mechanism (generally Proof Of Work is employed) to be resilient against tampering. Ethereum, launched in 2015, leveraged the blockchain technology to augment the initial proposal of Bitcoin, enabling computational statements to be executed as part of each block validation. The platform offers a Turing-complete runtime environment (the Ethereum Virtual Machine), which can run smart contracts - scripts that verify and enforce the execution of predefined legal contracts. The technical development of smart contracts present significant challenges that are not well modeled by the current body of knowledge and practices of software engineering. In fact, some of the characteristic of blockchain make the contract execution uncontrollable by the programmer and immutable after deployment. Also, the potential security risks are considerable, since there is a large incentive to exploit vulnerabilities in a smart contract for financial gain. Considering the concerns presented above, the establishment of well understood and welldefined design patterns for the development of smart contracts is of paramount importance. In the realm of software engineering, design patterns are defined as generic and reusable solutions to common problems in software design. In the context of this work, a survey of design patterns that target the Ethereum framework was performed, with an extensive analysis regarding the context in which they can be employed, as well as implementations, examples and consequences of their use. A total of 11 design patterns were analysed. The design patterns identified for the Ethereum framework focus on several concerns specific to this platform – most of these concerns revolve around safety, upgradeability, and the limitations inherent to the sandboxed approach of the Ethereum Virtual Machine. A Decentralized Application (dApp) was created to showcase the employment of several of the identified contracts, and to highlight the value they can provide. This dApp offers a framework for decentralized betting in a trustless environment, where neither the user needs to trust the owner nor vice-versa. The dApp implements several use cases that are reliant on the identified design patterns.
publishDate 2019
dc.date.none.fl_str_mv 2019
2019-01-01T00:00:00Z
2020-11-06T01:30:21Z
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/15609
TID:202343022
url http://hdl.handle.net/10400.22/15609
identifier_str_mv TID:202343022
dc.language.iso.fl_str_mv eng
language eng
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_ 1799131445167390720