# Secure Voting Website Using Ethereum and Smart Contracts
## 4 Proposed System
### Methodology
#### 4.1.2 Backend Module  
Phase 2 of this blockchain voting methodology involves the implementation of the blockchain using the Ethereum framework and converting the system into a decentralized application. In this phase, the back-end module will be developed using the Solidity programming language, which is used for designing smart contracts on the Ethereum blockchain. The first step in implementing the back-end module is to define the smart  
Figure 2: Admin module.  
contracts for the voting system. Smart contracts enable the automation of contract execution and management, enabling a more efficient and secure way to execute transactions. The smart contracts in this system will handle the voting process, including adding candidates, creating elections, registering voters, and counting votes. The smart contracts will be deployed on the Ethereum blockchain, a decentralized platform that enables the creation of decentralized applications. The blockchain will store all the information related to the voting process, including candidate details, election details, and voter details. Figure 4 represents blockchain data model.  
The Ethereum blockchain is based on an algorithm called Proof of Work (PoW), which ensures that the transactions on the blockchain are secure and transparent. This consensus algorithm ensures that the transactions on the blockchain are irreversible and tamper-proof. Figure 5 has code of block structure. The next step in implementing the back-end module is creating the necessary Solidity functions to handle the voting process. These functions will add candidates, create elections, register voters, and count votes. The parts will be programmed in Solidity and deployed on the Ethereum blockchain. One of the key advantages of using a blockchain-based system for voting is that it provides transparency and security. The blockchain ensures that all transactions are secure and tamper-proof, allowing for a transparent and auditable voting process. Since the data on the blockchain is  
Figure 4: Storing Unique ID in blockchain node.  
Figure 3: User module.  
decentralized and distributed across multiple nodes, it is difficult for anyone to manipulate the data or hack the system. The next step is to test the back-end module once the smart contracts and functions are defined and programmed. This involves running various test cases to ensure the system functions as expected. The testing will cover different scenarios, including adding candidates, creating elections, registering voters, and casting votes. The testing will also cover strategies related to security and performance, ensuring that the system is secure and efficient.  
Once the back-end module is tested and verified, it will be integrated with the front-end module in the project's final phase. Combining the two modules will involve connecting the user interface with the blockchain, ensuring that the front end can interact with the back end and display the results of the voting process. In conclusion, Phase 2 of this blockchain voting methodology involves the implementation of the back-end module using the Solidity programming language and the Ethereum blockchain. The back-end module will handle voting, including adding candidates, creating elections, registering voters, and counting votes. The blockchain provides transparency and security to the voting process, ensuring the transactions are secure and tamper-proof. Testing the back-end module will ensure that the system is functioning as expected, and integrating the back-end with the front-end will complete the development of the blockchain voting system.