Final_report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

WEB3 BLOCKCHAIN BASED CROWDFUNDING PLATFORM

A project report submitted in partial fulfilment of the requirements for the degree of

MASTER OF COMPUTER APPLICATION (MCA)


OF
TEZPUR UNIVERSITY

2023-2025

Submitted by

BHARGAV PRATIM SARMA CSM23012


BHRIGU MONI BARUAH CSM23057

Guided by

Dr. SANJIB K DEKA


PROFESSOR

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


TEZPUR UNIVERSITY
TEZPUR — 784028
ASSAM, INDIA
TEZPUR UNIVERSITY

SUPERVISOR’S
CERTIFICATE

This is to certify that the project report entitled Web3 Blockchain based Crowdfunding
Platform, submitted to the Department of Computer Science and Engineering, Tezpur University, in
partial fulfilment for the award of the degree of Master of Computer Application is a record of work
carried out by Mr Bhargav Pratim Sarma , Roll No. CSM23012 and Mr. Bhrigu Moni Baruah,
Roll No. CSM23057 at Tezpur University, Tezpur.

No part of this dissertation/report has been submitted elsewhere for award of any other degree.

Place : Tezpur (Prof. Sanjib K Deka)


Date : 18 December, 2024 Professor
Supervisor
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
TEZPUR UNIVERSITY
TEZPUR – 784028, ASSAM, INDIA

EXAMINER’S
CERTIFICATE

This project entitled Web3 Blockchain based Crowdfunding Platform submitted by Bhargav
Pratim Sarma and Bhrigu Moni Baruah in partial fulfilment of the requirements for the degree of
Master of Computer Application (MCA) of Tezpur University has been examined.

Examiner Examiner

Date :........................................ Date :..............................................

Place :........................................ Place :..............................................


DECLARATION

We affirm that the project work entitled, “Web3 Blockchain based Crowdfunding Platform”
submitted to the Department of Computer Science & Engineering at Tezpur University, was authored
solely by us and has not been presented to any other institution for the purpose of obtaining any other
degree.

Place: Tezpur Bhargav Pratim Sarma (CSM23012)

Date : 18 December 2024 Bhrigu Moni Baruah (CSM23057)


ACKNOWLEDGEMENT

We express our sincere appreciation to my project mentor, Dr. Sanjib K Deka, who is a
Professor in the Department of Computer Science and Engineering at Tezpur University, for granting us
the opportunity to work under his guidance and offering extensive support throughout the project.

We also extend our gratitude to the Head of the Department of Computer Science and
Engineering (CSE) and the entire faculty of the CSE Department, Tezpur University for their
invaluable guidance and cooperation during the project. We would like to acknowledge and thank all
individuals who, in various capacities, have provided assistance, whether directly or indirectly, with
their skills and contributions.

Place : Tezpur Bhargav Pratim Sarma (CSM23012)


Date : 18 December 2024 Bhrigu Moni Baruah (CSM23057)
CONTENTS

Supervisor’s Certificate..............................................................................................................i
Supervisor’s Certificate............................................................................................................. ii
HoD’s Certificate......................................................................................................................iii
Examiner’s Certificate.............................................................................................................. iv
Declaration.................................................................................................................................v
Acknowledgement.................................................................................................................... vi
GUIDELINES FOR REPORT FOR MCA FINAL SEMESTER PROJECT.........................xiii
1 Introduction........................................................................................................................ 1
1.1 Project Profile............................................................................................................................ 1
2 Initial System Study...........................................................................................................3
2.1 Land Acquisition Process in XYZ Corp.................................................................................... 4
2.2 Drawbacks of the Existing System............................................................................................ 4
2.3 Problem Definition....................................................................................................................5
2.4 The Proposed System................................................................................................................ 5
2.5 Scope of the System.................................................................................................................. 5
2.6 Scope of the Project................................................................................................................... 6
2.7 System Development Approach................................................................................................ 6
3 Feasibility Analysis............................................................................................................8
3.1 Requirements for System Deployment......................................................................................9
3.2 Behavioural aspects of the proposed system.............................................................................9
3.3 feasibility Statemet....................................................................................................................9
4 System Analysis...............................................................................................................10
4.1 Introduction............................................................................................................................. 10
4.2 Process of Land Acquisition.................................................................................................... 10
4.3 Data Flow Diagram of the Land Acquisition Process.............................................................12
4.4 Data Dictionary........................................................................................................................13
4.5 Entity Relationship Diagram...................................................................................................14
4.6 Physical and Behavioural Aspects of the System.................................................................... 15
5 Software Requirements and Specifications......................................................................16
5.1 General Descritptions..............................................................................................................16
5.1.1 Product Perspective.....................................................................................16
5.1.2 Product Functions........................................................................................16
5.1.3 User Characteristics.....................................................................................17
5.1.4 General Constraints.....................................................................................17
5.1.5 Assumptions and Dependencies..................................................................17
5.2 Functional Requirements.........................................................................................................17
5.2.1 Functional Requirement 1............................................................................17
5.2.2 Functional Requirement 2............................................................................18
5.2.3 Functional Requirement n............................................................................18
5.3 External Interface Requirements.............................................................................................18
5.3.1 User Interfaces............................................................................................. 18
5.4 Performance Requirements......................................................................................................19
5.5 Design Constraints...................................................................................................................19
5.5.1 Standard Compliance...................................................................................20
5.5.2 Hardware Constraints..................................................................................20
5.6 Other Requirements................................................................................................................. 20
5.7 Scope of this project................................................................................................................20
6 System Design..................................................................................................................21
6.1 Introduction............................................................................................................................. 21
6.2 System Architecture.................................................................................................................21
6.3 Module Design........................................................................................................................ 21
6.4 Database Design......................................................................................................................22
6.5 Input/Output Design................................................................................................................23
6.6 Algorithm Design....................................................................................................................23
6.7 Electronic Data-Communication Design.................................................................................23
6.8 System Maintenance................................................................................................................24
6.9 Other Alternatives Considered.................................................................................................24
7 System Implementation....................................................................................................26
7.1 Hardware Components............................................................................................................26
7.2 Softweare Environment........................................................................................................... 26
7.3 System Development Platform................................................................................................27
7.4 Project Acomplishment Status.................................................................................................27
7.5 Guidelines for Continuation.................................................................................................... 28
8 System Testing................................................................................................................. 29
8.1 Test Plan 29
8.2 Test Cases................................................................................................................................29
9 Conclusion........................................................................................................................30
Appendix A.............................................................................................................................. 31
Installation Manual........................................................................................................................... 31
Reference Manual.............................................................................................................................31
Maintenance Manual........................................................................................................................31
Appendix B.............................................................................................................................. 33
White Box Testing............................................................................................................................ 33
Black Box Testing.............................................................................................................................33
Functional Testing....................................................................................................................33
Non-Functionial Testing..........................................................................................................34
Grey Box Testing.............................................................................................................................. 34
Others 34
Appendix C.............................................................................................................................. 35
Paper Forms Used in The Organisation............................................................................................35
Input Forms in the New System.......................................................................................................35
Output Formats in the New System..................................................................................................36
Appendix D..............................................................................................................................37
Bibliography............................................................................................................................ 38
ABSTRACT

The rapid growth of decentralized finance (DeFi) has paved the way for innovative fundraising
methods, with crowdfunding being one of the most impactful applications. .This project presents the
development of a blockchain-based crowdfunding platform utilizing Thirdweb SDK, React, and
TypeScript, deployed on the Sepolia testnet. The platform aims to provide a decentralized,
transparent, and secure method for raising funds, eliminating intermediaries and enhancing trust
between project creators and contributors. By leveraging smart contracts, all transactions are recorded
on the blockchain, ensuring immutability and accountability. Users can create campaigns, contribute
funds, and monitor campaign progress in real-time. The integration of Web3 technologies highlights
the potential for blockchain to transform traditional crowdfunding models, offering a more efficient,
cost-effective, and transparent fundraising approach.
CHAPTER 1

INTRODUCTION

Information processing plays a vital role in today’s digital world. The availability of structured,
analyzable information is essential for making well-informed decisions, particularly in sectors like
finance, governance, and technology. In the context of crowdfunding, efficient processing and
transparency of contributions, campaigns, and financial transactions are crucial. Traditional
crowdfunding models often face issues like lack of transparency, intermediary fees, and trust issues
among participants. Blockchain technology offers a decentralized, transparent solution to these
problems, making it an ideal tool for creating a crowdfunding platform. The Crowdfunding DApp is
designed to leverage smart contracts and blockchain technology to enable secure, transparent, and cost-
effective fundraising.

The existing systems for crowdfunding, although widely used, are centralized and often rely on third-
party intermediaries that introduce inefficiencies and increase costs. With the adoption of Web3
technologies in the form of smart contracts, contributors and campaign creators can interact directly,
without the need for intermediaries. This project aims to replace the traditional system with a
decentralized solution that offers transparency, security, and efficiency. By using blockchain, the
system ensures that all transactions are recorded in an immutable ledger, guaranteeing full transparency
for all users. Therefore, the need to computerize the current crowdfunding process through blockchain
technology is clear, as it addresses issues of trust, efficiency, and cost reduction.

The idea for this project emerged from the desire to explore the potential of blockchain technology in
transforming traditional systems. After gaining experience in smart contract development using
Thirdweb SDK and React, I realized the opportunity to apply these technologies to build a
decentralized crowdfunding platform. Over the course of this project, I have successfully developed a
working prototype of the Crowdfunding DApp, deployed on the Sepolia testnet, where users can create,
fund, and track campaigns securely through a user-friendly interface.
1.1 PROJECT PROFILE

Problem statement : The existing centralized crowdfunding platforms often suffer from issues like
high fees, lack of transparency, and reliance on intermediaries. The proposed
solution, a Blockchain-based Crowdfunding DApp, leverages smart contracts to
automate and secure the fundraising process, offering transparency and
eliminating intermediaries.

Person doing the project: Bhargav Pratim Sarma (CSM23012), Bhrigu Moni Baruah (CSM23057)

Guide : Prof. Sanjib K Deka , Professor, Department of Computer Science and


Engineering, Tezpur University

Organization : Tezpur University

Projecty Location : Tezpur

Duration : 4 months

Environment :

▪ Hardware: Personal Computer with minimum requirements for running


Node.js, Metamask wallet, and blockchain interactions.

▪ Software: Thirdweb SDK, React, TypeScript, Sepolia Testnet, Visual Studio


Code
CHAPTER 2

INITIAL SYSTEM STUDY

2.1 Understanding Crowdfunding in Blockchain


Crowdfunding is a method of raising capital through contributions from a large number of people,
typically via an online platform. Traditional crowdfunding systems are centralized, requiring users to
trust third-party intermediaries to collect funds and distribute them according to the campaign owner's
plan. The use of blockchain technology in crowdfunding aims to address several challenges by
providing transparency, security, and decentralization. Blockchain enables the creation of smart
contracts that automatically execute predefined terms once certain conditions are met, allowing
contributors to directly interact with campaign owners without relying on intermediaries. The
transparency of blockchain ensures that all transactions are publicly recorded and cannot be altered,
ensuring that the funds are used as promised. Blockchain-based crowdfunding systems offer a more
efficient, secure, and transparent alternative to traditional methods.

2.2 Drawbacks of Traditional Crowdfunding Systems


Traditional crowdfunding systems suffer from several issues, including:

• High Transaction Fees: Crowdfunding platforms often charge a significant fee for facilitating
transactions, reducing the overall funds available for campaign creators.
• Lack of Transparency: Contributors have limited visibility regarding how their funds are used
after the donation, leading to concerns over fund mismanagement.
• Centralized Control: Traditional systems rely on centralized intermediaries to manage funds,
which can be vulnerable to fraud, hacking, or mismanagement.
• Trust Issues: Without proper monitoring, contributors may not trust that the campaign creator
will deliver on their promises or meet the goals set out at the beginning.
• Delays: The involvement of multiple intermediaries can slow down the fundraising process and
delay the transfer of funds, making it less efficient.

These drawbacks are significant in limiting the potential of crowdfunding platforms and can discourage
contributors from participating.
2.3 Problem Definition

The problem addressed by this project is the lack of transparency, security, and high transaction fees in
traditional centralized crowdfunding platforms, which can lead to inefficiencies and trust issues
between campaign creators and contributors.

2.4 The Proposed System

The proposed Crowdfunding DApp utilizes blockchain and smart contracts to revolutionize the
crowdfunding process:

1. Smart Contracts: These are self-executing contracts where the terms and conditions of the
agreement between the campaign creator and contributors are directly written into lines of code.
Once the specified conditions are met, the smart contract will automatically release funds to the
campaign creator.
2. Decentralization: The system eliminates the need for a central authority by utilizing
blockchain, where transactions are validated and recorded on a distributed ledger.
3. Transparency: All transactions, including contributions and fund transfers, are visible to
everyone on the blockchain, ensuring complete transparency.
4. Lower Transaction Costs: By removing intermediaries, the platform significantly reduces the
fees charged for transactions, allowing campaign creators to keep a larger portion of the raised
funds.
5. Security: Blockchain technology ensures that the funds are securely managed, with no single
point of failure, reducing the chances of fraud or hacking.
6. Real-Time Updates: Contributors can track the progress of the campaign in real-time, ensuring
that funds are being used as promised.

2.5 Scope of the System


This project has been done in the third semester of the Master of Computer Application (MCA) course
of Tezpur University .The scope of the Crowdfunding DApp project is to develop a decentralized
crowdfunding platform using blockchain technology, specifically designed to provide transparency,
security, and efficiency in fundraising activities. The project includes the creation of smart contracts to
automate the crowdfunding process, allowing for secure and transparent transactions between
campaign creators and contributors. It involves building a frontend using React and TypeScript to allow
users to easily interact with the platform, and deploying the smart contract on the Sepolia testnet for
testing. The project will focus on the core functionality of campaign creation, contributions, and smart
contract execution, with plans for future enhancements such as multi-currency support and integration
with other blockchain networks. The development will follow an Agile methodology, with emphasis on
testing and documentation for both developers and users.

2.7 System Development Approach


The development of the Crowdfunding DApp will follow an Agile development approach with the
following phases:

1. Requirement Analysis: Understanding the user needs and defining the requirements for the
crowdfunding platform, focusing on user functionality and blockchain integration.
2. System Design: Designing the architecture of the DApp, including smart contract logic,
frontend layout, and user interaction flow.
3. Development: Writing and testing the smart contracts, developing the user interface, and
integrating both to create a fully functional system.
4. Testing: Conducting extensive testing on the Sepolia testnet to ensure that the platform
functions as expected and is secure.
5. Deployment and Documentation: Deploying the DApp on the testnet, preparing user manuals,
and documenting the development process.
CHAPTER 3

FEASIBILITY ANALYSIS

3.1 Requirements for System Deployment

The successful deployment of the Crowdfunding DApp requires both hardware and software
components that work seamlessly together. Below are the key requirements:

Hardware Requirements:

1. Development Machine: A computer with at least 8 GB of RAM, multi-core processor, and a


stable internet connection for development and testing.
2. Smart Contract Testing Environment: A machine to deploy the smart contracts to the Sepolia
testnet, which does not require special hardware but requires an Ethereum node or access to a
blockchain network like ThirdWeb.
3. Server Requirements: For production deployment, a cloud service like AWS, Azure, or
Heroku may be used to host the frontend of the DApp.
4. Backup Storage: A secure cloud storage or local backups for smart contract code, front-end
assets, and user data.

Software Requirements:

1. Blockchain Network: Sepolia Testnet (for testing purposes) and Ethereum (for future
production deployment).
2. Smart Contract Development Tools: Solidity compiler, Hardhat for writing, testing, and
deploying smart contracts.
3. Frontend Development Tools: React (JavaScript framework), TypeScript, and Node.js to build
the user interface.
4. Version Control: Git and GitHub for source code management and version control.
5. API Tools: Web3.js or Ethers.js to enable interaction between the frontend and the blockchain
network.
6. Wallet Integration: MetaMask or any compatible cryptocurrency wallet for user interaction
and transaction signing.

These requirements ensure that the system is capable of handling the decentralized nature of the
crowdfunding process securely and efficiently.

3.2 Behavioral Aspects of the Proposed System

The Crowdfunding DApp system will exhibit the following behavioral aspects:

1. User Interaction:

i. Campaign Creators will interact with the system to create new crowdfunding
campaigns, define funding goals, and set the timeline.
ii. Contributors will browse active campaigns, read the terms and conditions, and
contribute funds securely through the platform.
2. Smart Contract Execution:

i. Once the specified funding goal is reached, the smart contract will automatically release
funds to the campaign creator.
ii. If the campaign fails to meet its goal, the funds will be refunded to the contributors,
ensuring transparency and fairness.
3. Real-Time Updates:

i. The system will provide real-time status updates on the campaign’s funding progress,
showing contributors how much has been raised and whether the goal has been met.
4. Security:

i. All transactions will be processed through Ethereum smart contracts, ensuring that funds
are transferred only when predefined conditions are met, reducing the risk of fraud.
5. Transparency:

i. All contributions, fund transfers, and smart contract executions will be publicly available
on the blockchain, allowing users to verify the legitimacy of transactions.

These behavioral aspects ensure that the system operates according to its intended functionality,
providing a transparent, secure, and efficient environment for both campaign creators and contributors.
3.3 Feasibility Statement

The proposed Crowdfunding DApp is technically and economically feasible within the scope of the
project. Blockchain technology provides the necessary infrastructure to achieve the objectives of
transparency, decentralization, and security. The project is feasible in terms of:

1. Technical Feasibility: The development of smart contracts using Solidity is supported by the
Ethereum blockchain, and the integration of frontend technologies like React and TypeScript
with Web3 libraries ensures smooth interaction with the blockchain.
2. Operational Feasibility: The system can be deployed on a test network (Sepolia) to evaluate its
functionality before moving to a live environment. The required tools and resources are
available, and the platform will be easy for users to interact with.
3. Economic Feasibility: With the use of decentralized technology, the system reduces costs
associated with intermediaries, transaction fees, and trust-related issues inherent in traditional
crowdfunding platforms. Future scalability can be achieved through the addition of other
blockchain networks, further increasing the reach and viability of the platform.
CHAPTER 4

1
SYSTEM ANALYSIS

4.1 Introduction

System analysis plays a critical role in the design and development of any software system. It involves
understanding the requirements, processes, and interactions of various system components to ensure
smooth execution of functionalities. For the Crowdfunding DApp, system analysis focuses on the
crowdfunding process, user interactions, and blockchain-based operations to achieve transparency,
security, and efficiency. This chapter provides an overview of the fundraising process, visual
representations through Data Flow Diagrams (DFDs), and a description of the system's physical and
behavioral aspects.

4.2 Process of Fundraising in the DApp

The process of fundraising in the Crowdfunding DApp is decentralized and operates using blockchain
smart contracts. The steps involved in this process are as follows:

1. Campaign Creation:

i. A campaign creator (user) initiates a campaign by entering details such as campaign


title, description, funding goal, deadline, and other necessary information.
ii. This information is then recorded on the blockchain using a smart contract, making it
immutable and transparent.
2. Campaign Listing:

i. The campaign is displayed on the frontend (React UI), allowing potential contributors to
view the active campaigns and their details.
ii. Contributors can browse the campaign's description, funding goal, and deadline to
decide on contributing.
3. Contribution:

i. A contributor can donate funds to a specific campaign using a connected cryptocurrency


wallet (like MetaMask).
ii. The transaction is signed by the contributor, and the smart contract ensures the
contribution is securely recorded on the blockchain.
4. Goal Achievement or Expiration:

i. If the campaign reaches its funding goal before the deadline, the smart contract
automatically transfers the collected funds to the campaign creator.
ii. If the campaign does not reach its funding goal by the deadline, the funds are
automatically refunded to the contributors through the smart contract.
5. Campaign Closure:

i. Once the funds are released or refunded, the campaign is marked as "Closed" and can no
longer accept contributions.
ii. The blockchain maintains an immutable record of the transaction history, ensuring full
transparency and accountability.

4.3 Data Flow Diagram (DFD):


A Data Flow Diagram (DFD) represents how data flows through the system. Below is a simple DFD
for the Crowdfunding Dapp.

4.4 Data Dictionary:

A Data Dictionary lists and defines all data items, variables, and constants used in the system. Here is
the Data Dictionary for key elements in the Crowdfunding Dapp.

Data Item Data Type Description


campaignTitle String Title of the crowdfunding campaign
campaignDesc String Description of the crowdfunding campaign
Data Item Data Type Description
fundingGoal Number (ETH) The target amount of funds to be raised
amountRaised Number (ETH) The total amount raised for the campaign
deadline Date/Time The last date for collecting funds
contributorAddress String Blockchain address of the contributor
campaignID Unique ID Unique identifier for each campaign
transactionHash String Unique hash for a blockchain transaction
status String (Active, Closed) Status of the campaign
contributionAmount Number (ETH) Amount of cryptocurrency contributed

The data dictionary ensures that all variables used in the smart contract, frontend, and blockchain
system are well defined and understood.
CHAPTER 5

SOFTWARE REQUIREMENTS AND SPECIFICATIONS

5.1 General Descriptions

This section provides an overview of the Crowdfunding DApp from a high-level perspective, outlining
its purpose, key functionalities, user characteristics, and system constraints.

5.1.1 Product Perspective

The Crowdfunding DApp is a decentralized application built on the Ethereum blockchain using
Solidity smart contracts. Unlike traditional centralized crowdfunding platforms, this system ensures
transparency, immutability, and decentralization. Users can create, contribute to, and track fundraising
campaigns directly on the blockchain without relying on intermediaries. The application comprises:

i. Frontend: Built using React and TypeScript for user interaction.


ii. Backend: Replaced by Ethereum smart contracts, eliminating the need for traditional databases.
iii.Blockchain: Uses the Sepolia testnet for smart contract deployment and transaction tracking.

5.1.2 Product Functions

The key functions of the Crowdfunding DApp are:

i. Campaign Creation: Allows users to create new fundraising campaigns with details like title,
description, funding goal, and deadline.
ii. Campaign Browsing: Users can browse active campaigns, view descriptions, and track their
progress.
iii.Contribution to Campaigns: Contributors can send ETH to support campaigns directly via a
crypto wallet (like MetaMask).
iv. Automatic Refunds: If the funding goal is not met, the smart contract refunds contributors
automatically.
v. Fund Withdrawal: If the funding goal is met, the campaign creator can withdraw funds.
vi. Auditability and Transparency: Blockchain ensures immutability and transparency of all
transactions.

5.1.3 User Characteristics

The system supports the following user roles:

i. Campaign Creators: Users who launch fundraising campaigns. They require basic knowledge
of campaign creation, and access to a crypto wallet like MetaMask.
ii. Contributors: Users who support campaigns by donating ETH. They should know how to
connect a wallet to the application.
iii.System Administrator (Smart Contract Owner): This role is responsible for deploying the
smart contract and ensuring the platform's smooth operation.

5.1.4 General Constraints

The development of this DApp is subject to the following constraints:

i. Gas Fees: Users must pay gas fees for transactions, which may vary depending on network
traffic.
ii. Blockchain Immutability: Once deployed, the smart contract cannot be changed. Any logic
errors require a new contract deployment.
iii.Wallet Requirement: Users must have a MetaMask wallet or similar to interact with the
DApp.
iv. Internet Requirement: Since the DApp interacts with the blockchain, a stable internet
connection is essential.

5.1.5 Assumptions and Dependencies

i. MetaMask Wallet is used for wallet interaction.


ii. Web3.js or Ethers.js is used to interact with the blockchain.
iii.Sepolia Testnet is used for development and testing.
iv. React.js and TypeScript are used for the frontend.
v. Node.js is required to run local development servers.
vi. Users have a basic understanding of blockchain and crypto wallets.
5.2 Functional Requirements

The functional requirements define the primary operations and processes of the system.

5.2.1 Functional Requirement 1: Campaign Creation

i. Description: Users can create a new campaign by entering details like title, description, funding
goal, and deadline.
ii. Input: Title, description, goal amount, deadline.
iii.Output: Campaign is listed on the DApp, and its details are stored on the blockchain.
iv. Actors: Campaign Creator.

5.2.2 Functional Requirement 2: Contribution to Campaigns

i. Description: Users can contribute ETH to any ongoing campaign.


ii. Input: Amount of ETH to contribute.
iii.Output: Transaction confirmation, updated campaign details.
iv. Actors: Contributors.

5.2.3 Functional Requirement 3: Withdrawal of Funds

i. Description: Campaign creators can withdraw funds if the funding goal is met before the
deadline.
ii. Input: Withdrawal request.
iii.Output: Funds are transferred to the campaign creator's wallet.
iv. Actors: Campaign Creator, Smart Contract.

5.3 External Interface Requirements

This section outlines the system's external interfaces, including how users interact with the system.

5.3.1 User Interfaces

The user interfaces include:

i. Campaign Creation Page: Form to create a new campaign.


ii. Campaign List Page: Displays all active campaigns.
iii.Campaign Details Page: Shows details of a specific campaign, including contributions made
and goal status.
iv. Contribution Page: Allows users to contribute ETH to a campaign.

The frontend is built using React.js and styled with CSS/Bootstrap for a responsive and interactive user
experience.

5.4 Performance Requirements

The system's performance depends on blockchain performance and network conditions. Key
performance requirements include:

• Transaction Latency: Transaction time depends on network congestion but should not exceed
15 seconds.
• Throughput: The system can handle multiple user interactions simultaneously.
• Scalability: The system should remain functional even with an increase in the number of
campaigns and contributors.
• Availability: The system should be available 24/7, subject to the availability of the Ethereum
network.

5.5 Design Constraints


The design of the Crowdfunding DApp is subject to certain constraints.

5.5.1 Standard Compliance

The system complies with the following standards:

i. EIP-20 (Ethereum Token Standard) for handling ERC20 tokens.


ii. EIP-721 (NFT Standard) if tokenized campaign receipts are provided.
iii.OWASP security standards to protect users from threats like re-entrancy attacks and integer
overflows.
5.5.2 Hardware Constraints

There are no stringent hardware requirements as most processing is done on the blockchain. Users
require:

i. Laptop/PC with access to a web browser.


ii. MetaMask or a compatible crypto wallet browser extension.
iii.Internet Connection for real-time interaction with the blockchain.

5.6 Other Requirements


Other requirements include:

i. Security Requirements: Smart contracts must prevent attacks like re-entrancy, overflow, and
underflow errors.
ii. Regulatory Requirements: Must comply with regulations for financial transactions involving
cryptocurrency.
iii.Ethical Requirements: Should maintain transparency and trust, as funds are raised publicly.

5.7 Scope of this Project


The scope of the Crowdfunding DApp encompasses the design, development, testing, and deployment
of a decentralized platform for crowdfunding campaigns. The platform aims to solve issues of trust,
transparency, and security associated with traditional platforms. The DApp enables campaign creators
to launch campaigns and contributors to support them using cryptocurrency.

Key deliverables of the project include:


i. Smart Contracts: Written in Solidity, deployed on the Sepolia testnet.
ii. Frontend Interface: A user-friendly React.js application for campaign creation, contribution,
and fund tracking.
iii.Deployment: The application is deployed on a live blockchain testnet, ensuring immutability
and auditability.
iv. Documentation: A detailed project report containing system design, feasibility analysis, testing,
and user manual.
CHAPTER 6

2
SYSTEM DESIGN

6.1 Introduction
System design plays a crucial role in ensuring that the system functions as intended. This chapter
outlines the architectural layout, design methodologies, key modules, and the interaction between the
system's components. The design approach for this blockchain-based crowdfunding DApp focuses on
ensuring security, scalability, and transparency. Each component of the system is discussed in detail,
with an emphasis on the design of the smart contract, which serves as the backbone of the decentralized
application (DApp).

6.2 System Architecture

The architecture of the Crowdfunding DApp is divided into three main layers:

1. Client-Side (Frontend)

i. Technologies Used: React, TypeScript, Thirdweb SDK.


ii. Role: Provides an interactive user interface where users can view campaigns, contribute
to campaigns, and request refunds.
iii.Interaction: Interacts with the blockchain network via the Thirdweb SDK.
2. Middleware (API/Thirdweb SDK)

i. Technologies Used: Thirdweb SDK


ii. Role: Serves as a bridge between the frontend and the blockchain. Handles API calls to
the blockchain, initiates transactions, and retrieves real-time data from the smart
contract.
iii.Interaction: Receives requests from the frontend and sends them to the smart contract
deployed on the Sepolia testnet.
3. Blockchain Layer (Smart Contract on Ethereum)
i. Technologies Used: Solidity, Ethereum (Sepolia Testnet)
ii. Role: Manages campaign logic, tracks contributions, handles funds, and ensures security
and immutability.
iii.Interaction: Processes and records all transactions on the blockchain, making them
irreversible and transparent.

6.3 Module Design

The system consists of the following core modules:

1. User Module

i. Actors: Campaign backers, contributors, and campaign creators (owners).


ii. Features:
(a)View available campaigns and tiers.
(b)Contribute to a campaign by funding a specific tier.
(c)Request refunds if the campaign fails.
2. Owner Module

i. Actors: Campaign owner (admin).


ii. Features:
(a)Create and launch a new campaign.
(b)Add and remove funding tiers.
(c)Withdraw funds if the campaign is successful.
(d)Pause/unpause the campaign and extend deadlines.
3. Smart Contract Module

i. Actors: Backers, owner, and system (blockchain network).


ii. Features:
(a)Handles secure storage of contributions.
(b)Manages campaign status (active, successful, or failed).
(c)Executes logic for refunds and withdrawals.
4. Payment/Wallet Integration Module
i. Actors: Campaign contributors.
ii. Features:
(a)Allows backers to make payments using their crypto wallets.
(b)Uses Metamask or other Web3 wallet providers to interact with the Dapp.

6.4 Input/Output Design

This section outlines the key inputs and outputs for various components of the system.

Inputs

1. Campaign Creation:

i. Inputs: Name, description, goal amount, duration, owner address.


ii. Source: Owner via frontend UI.
iii.Destination: Blockchain (Smart Contract).
2. Contribution to Campaign:

i. Inputs: Tier selection, payment amount.


ii. Source: Backer via frontend UI.
iii.Destination: Blockchain (Smart Contract).
3. Refund Request:

i. Inputs: Request for a refund.


ii. Source: Backer via frontend UI.
iii.Destination: Blockchain (Smart Contract).
4. Tier Management:

i. Inputs: Add or remove tier.


ii. Source: Owner via frontend UI.
iii.Destination: Blockchain (Smart Contract).

Outputs

1. Campaign Status:

i. Output: Campaign state (Active, Successful, Failed).


ii. Source: Blockchain (Smart Contract).
iii.Destination: Frontend UI (displayed to users).
2. Backer Contributions:

i. Output: Total contribution and funded tiers.


ii. Source: Blockchain (Smart Contract).
iii.Destination: Displayed to backers via the frontend.
3. Tier Details:

i. Output: List of tiers (name, amount, backer count).


ii. Source: Blockchain (Smart Contract).
iii.Destination: Displayed on the frontend UI.

6.5 Algorithm Design

The algorithm design has already been provided earlier in detail. It explains the logic behind the core
operations like campaign creation, contributions, refunds, and withdrawals.

START

1. Campaign Initialization:
- Set owner, name, description, goal, deadline
- Set state to "Active"

2. Owner can add or remove tiers:


- Owner adds tier with name and amount
- Owner removes tier by index

3. Backer Funds Campaign:


- Backer selects a tier and sends payment
- Check if amount matches the tier's price
- Update backer's contribution and mark tier as funded
- Increment backer count for the tier
- Check if goal is met or deadline is passed
- If goal is met, change state to "Successful"
- If deadline is passed and goal is not met, change state to "Failed"

4. Owner can:
- Withdraw funds if campaign is successful
- Extend the campaign deadline
- Pause/unpause the campaign

5. Backers can:
- Request refunds if the campaign failed

6. Functions:
- View the status of tiers
- Check if a backer funded a specific tier
- View campaign balance

END

6.6 System Maintenance


System maintenance is crucial for ensuring a smooth user experience and long-term system efficiency.

1. Smart Contract Upgrades

i. Since smart contracts are immutable, any update would require deploying a new version
of the contract.
ii. Proxy contracts can be used to maintain upgradability.
2. Bug Fixes and Security Patches

i. Regular audits of the smart contract are required to detect and fix vulnerabilities.
3. Tier Adjustments

i. Owners can add or remove funding tiers during the campaign.


4. Deadline Extension

i. The owner can extend the deadline if required to give backers more time to fund the
campaign.
6.7 Other Alternatives Considered

During the development of the system, alternative approaches were evaluated.

Alternative Reason for Rejection


No transparency, high security risk, prone to single points of
Centralized Server
failure.
Custom Blockchain High cost of development, lack of industry adoption.
Manual Payment Processing No automation, prone to human errors, and no immutability.
CrowdfundingWithout
Lacks transparency, trust, and security of funds.
Blockchain
Why Blockchain?

1. Security: All transactions are transparent, and the logic is immutable.


2. Decentralization: No single party controls the system.
3. Trust: Smart contracts ensure automatic refunds and transparent contributions.
CHAPTER 7

SYSTEM IMPLEMENTATION

7.1 Hardware Components


The hardware components required for the development, testing, and deployment of the
Crowdfunding DApp are minimal, as it primarily relies on cloud-based development tools and
blockchain infrastructure. However, the following hardware components were used during the
development process:

Hardware
Specification Purpose
Component
Development Apple M1, 8GB RAM, 256GB Used for local development, testing, and
Machine SSD deployment of the DApp.
Broadband with 10+ Mbps Required for accessing blockchain networks
Internet Connection
speed (Sepolia) and GitHub for version control.
External Storage Backup of source code and important
32GB USB
(Optional) resources.

7.2 Software Environment

The following software tools and platforms were used for the development, testing, and deployment of
the Crowdfunding DApp.

Software/Tool Version Purpose


Operating Ubuntu 22.04.5 LTS &
Used for local development and testing.
System macOS
Visual Studio Code (VS Writing, debugging, and testing smart contracts (Solidity)
IDE/Editor
Code) and React (TypeScript) frontend.
Blockchain Ethereum (Sepolia Deploying and testing the smart contract in a live
Software/Tool Version Purpose
Testnet) environment.
Provides the runtime environment for running the DApp
Node.js Version 18.x
and managing dependencies.
Used to connect the DApp with the blockchain and
Thirdweb SDK Latest version
interact with smart contracts.
Used for blockchain interaction (alternative to Thirdweb
Web3.js Version 1.x
SDK).
Solidity Version ^0.8.2 Used to write the smart contract logic.
Metamask Latest version Used as a wallet to sign blockchain transactions.
Ganache Local Ethereum environment for testing before
Local Blockchain
(Optional) deployment to Sepolia.
CHAPTER 8

SYSTEM TESTING

8.1 Types of Testing


Unit Testing: Verifies individual functions like fund(), withdraw(), and addTier().

1. Integration Testing: Ensures proper interaction between the smart contract, Thirdweb SDK,
and React frontend.
2. System Testing: End-to-end testing to validate the entire system workflow (campaign creation,
funding, withdrawal, refunds).
3. Security Testing: Identifies vulnerabilities like reentrancy attacks using MythX and Slither.
4. Performance Testing: Tests system stability under concurrent users and transaction load.
5. Regression Testing: Ensures that updates to the contract or UI don't break existing features.

8.2 Test Plan and Test Cases

Objective: Ensure campaign creation, funding, refunds, and withdrawals work as expected.

Test Case Test Description Expected Result Status


Campaign is created
Create Campaign Owner creates a campaign Pass
successfully
Add Tier Owner adds a new funding tier Tier appears in the tier list Pass
Fund Campaign User funds the campaign User's balance updates Pass
Withdraw Funds Owner withdraws funds after success Owner receives the funds Pass
User requests refund after campaign
Refund User receives refund Pass
fails
Access Control Non-owner attempts restricted actions Access is denied Pass
CHAPTER 9

RESULTS AND DISCUSSION

9.1 Observations and Outcomes

1. Successful Campaign Execution: Users can create, fund, and track crowdfunding campaigns
in real time.
2. Efficient Fund Management: Funds are securely stored in the smart contract and released only
after campaign success.
3. Transparency & Security: Blockchain ensures transparency, immutability, and verifiability of
transactions.
4. User-Friendly Interface: Integrated a seamless UI using React and Thirdweb SDK for a
smooth user experience.

9.2 Challenges Faced and Solutions

1. Challenge: Ensuring proper wallet connectivity and user experience.


Solution: Integrated Thirdweb's Wallet SDK for seamless multi-wallet support.

2. Challenge: Accurate state updates for the campaign's success/failure.


Solution: Used periodic checks with checkAndUpdateCampaignState() to ensure
accurate campaign status.
CHAPTER 10

CONCLUSION AND FUTURE SCOPE

10.1 Conclusion

The blockchain-based crowdfunding platform successfully achieves its goal of providing a


decentralized, secure, and transparent method for fundraising. By utilizing smart contracts on the
Sepolia testnet, the platform eliminates the need for intermediaries, ensuring trust and transparency.
The system allows campaign creators to define funding goals, deadlines, and contribution tiers, while
backers can securely contribute to campaigns. The use of Thirdweb SDK and React enhances user
experience and simplifies interactions. Overall, the project demonstrates the potential of blockchain
technology in redefining traditional crowdfunding methods.

10.2 Future Enhancements

1. Multi-Currency Support: Enable support for multiple cryptocurrencies for wider participation.
2. Governance Mechanism: Introduce a voting system where backers can influence campaign
decisions.
3. Milestone-based Funding: Release funds in stages as campaign milestones are achieved.
4. Enhanced UI/UX: Improve user experience with better animations, notifications, and error
handling.
5. Integration with IPFS: Store campaign details and media files on a decentralized storage
platform like IPFS.
BIBLIOGRAPHY

[1] React Team, "Getting Started with React," React Official Documentation. Available:
https://legacy.reactjs.org/docs/getting-started.html
[2] Solidity Developers, "Solidity — Solidity 0.8.28 Documentation," Solidity Official Documentation.
Available: https://docs.soliditylang.org/en/v0.8.28/
[3] Thirdweb Team, "Thirdweb Developer Portal," Thirdweb Documentation. Available:
https://portal.thirdweb.com/
[4] Ethereum Foundation, "Ethereum Developer Documentation," Ethereum Official Documentation.
Available: https://ethereum.org/en/developers/docs/
[5] Etherscan Developers, "Sepolia Testnet Etherscan Documentation," Etherscan Documentation.
Available: https://docs.etherscan.io/sepolia-etherscan
[6] TypeScript Team, "TypeScript Documentation," TypeScript Official Documentation. Available:
https://www.typescriptlang.org/docs/

You might also like