Tesis profesional presentada por Claudia Mariana Valdés Becerril [claudia.valdesbl@udlap.mx]

Miembro del Programa de Honores. Licenciatura en Ingeniería en Sistemas Computacionales. Departamento de Ingeniería en Computación, Electrónica y Mecatrónica. Escuela de Ingeniería, Universidad de las Américas Puebla.

Jurado Calificador

Director: Dr. Vicente Alarcón Aquino
Presidente: Dr. Roberto Rosas Romero
Secretario: Dr. Oleg Starostenko

Cholula, Puebla, México a 29 de noviembre de 2021.


The Blockchain, which in its beginnings was the base technology for cryptocurrencies, is reshaping applications in all fields that require security, trust and solid certifications. The blockchain has played an extremely important role in the fields of finance and economics, enabling decentralized applications with no trusted counterpart, through its technology and the programs that run on it, called Smart Contracts.

The blockchain is a technology that helps solve complex problems related to the reliability and integrity of transactions where there is an exchange of confidential and complex data. The blockchain enables smart contracts to help transactions based on predefined rules distributed among nodes to be achieved, thus generating greater trust and resilience on the part of users. Smart contracts also help eliminate the need to interact with third parties, facilitating the adoption and monetization of transactions and data exchanges.

To demonstrate the benefits of a Decentralized Application (DApp), which has a backend code that runs on a decentralized peer-to-peer network. Unlike a normal app where the backend code runs on centralized servers. In addition to having frontend code and user interfaces written in any language to make calls to the backend. A DApp was created for a voting system in Ethereum, which is a digital platform that adopts blockchain technology and expands its use to a wide variety of applications. Ethereum´s blockchain is very similar to bitcoin´s, the big difference is the programming language in which it is designed, which allows developers to create a smart contract through which to manage transactions and automate certain outcomes.

This Ethereum DApp was created through Truffle, which is the most popular development framework for Ethereum with the mission to facilitate the construction of such a blockchain, among its tasks are contract lifecycle management, automated testing for contracts, contract migrations to the blockchain, etc.

Ganache, in Ethereum, smart contracts are programs that run in the context of transactions on the Ethereum blockchain. Ganache is part of Truffle, a toolkit that allows developers to recreate a blockchain locally and test smart contracts.

And finally Metamask, in the Ethereum world it is important to maintain a wallet to receive and send Ether. However in the case of Ethereum, users can perform many more actions with the Ethereum blockchain with decentralized applications. It is a Chrome extension that offers an Ethereum wallet, Metamask injects the web3 library allowing the DApp to integrate it so that the user can use the application in an easy and intuitive way, in case there was no Metamask the user should send the transaction placing information in hexadecimal making the whole process more difficult.

Subsequently, a blockchain was created in JavaScript to expose in detail each of the elements and processes of a blockchain made on Ethereum in a decentralized application.

This thesis provides an in-depth understanding of what a blockchain is and its functionalities, as well as exploring the application of blockchain and smart contracts to improve the security of an application.

Keywords: Blockchain, Cybersecurity, Ethereum, Smart Contracts, DApp


Table of content




Capítulo 1. Introduction

  • 1.1 Motivation
  • 1.2 Problem Formulation
  • 1.3 Previous work
  • 1.4 Aim of Thesis
  • 1.5 Outline of Thesis

Capítulo 2. Blockchain technology in cybersecurity

  • 2.1 Introduction
  • 2.2 Elements and features of blockchain
  • 2.3 Decentralization
  • 2.4 Cryptography
  • 2.5 Hash Function
  • 2.6 Discussion

Capítulo 3. Blockchain modeling

  • 3.1 Ethereum Dapp
  • 3.2 Workflow of a blockchain
  • 3.3 Discussion

Capítulo 4. Blockchain simulation results

  • 4.1 Building Ethereum Dap
  • 4.2 Blockchain in detail
  • 4.3 Discussion

Capítulo 5. Conclusions and future work


Valdés Becerril, C. M. 2021. Secure Electronic Voting System Based On Blockchain Technology. Tesis Licenciatura. Ingeniería en Sistemas Computacionales. Departamento de Ingeniería en Computación, Electrónica y Mecatrónica, Escuela de Ingeniería, Universidad de las Américas Puebla. Noviembre. Derechos Reservados © 2021.