Trang 1 Hội nghị Khoa học trẻ lần 5 năm 2023YSC2023-ỈUHYSC5.F001ChainForHelp: HIGHLY TRANSPARENT PEER-TO-PEER CHARITY FUNDING SYSTEM BASED ON BLOCKCHAIN TECHNOLOGYĐẶNG NGỌCPHONG1*, NGUYỄ
Trang 1Hội nghị Khoa học trẻ lần 5 năm 2023(YSC2023)-ỈUH
YSC5.F001
ĐẶNG NGỌCPHONG1*, NGUYỄNĐẶNG HOÀNGTHI1, PHANHẢI TRIỀU1, GIÁPCHÍ CƯỜNG1,
faculty of Information Technology, Industrial University of Ho Chi Minh City
1 'phongdang.contact@gmail com, thinguyen28060l @gmail com, trieuphanS70Ỉ@gmail.com,
giapchicuong@gmail.com, huynhnam@iuh edu vn;
Abstract. Every year, many individuals and organizations have built and organized charity funds, communitycontributionactivities, and scholarship programsthat take place atthe Industrial University of
information about thesecharity calls.Therefore, it is essentialto build a platform to help call for and manage charity information ChainForHelp is an application thatwe built based on blockchain technology tohelp
activities with high transparency and integrity ChainForHelp consists of two parts: a website application
is built on technology platforms such as JavaScript, Solidity,ReactJS, and Thirdweb The application will
Keywords.Charity, Transparency, Smart contract, Blockchain, Peer-to-peer network
ChainForHelp: HẸ THỐNG GÂY QUỸ TỪ THIỆN NGANG HÀNG VỚI TÍNH MINH
Tóm tắt. Hằng năm, có rấtnhiều cá nhân, tổ chức đãxây dựngvàtổ chứccác quỹtừthiện, các hoạt động
cáccuộc kêu gọi từthiện này.Do đó, việc xâydựngmộtnền tảng giúpkêugọi và quản lý thông tin từthiện
từ thiện với tính minhbạch và toàn vẹn cao ChainForHelp gồm hai phần: ứng dụng website hiển thị giao
xửlýdữ liệu của các hoạt động từthiện đượctạovà lưu trữchúng hên mạng lướiblockchain ChainForHelp
đượcxâydựng dựa trên các nền tảng côngnghệ như:JavaScript, Solidity, ReactJS và Thirdweb ứng dụng
phù hợp và mức độ hiệu quả Trong tươnglai,chúng tôi sẽ mở rộngứng dụng sang nhiều trườngđại học
Từ khóa.Từ thiện, Minhbạch, Hợp đồng thông minh, Blockchain, Mạng ngang hàng
Every year, hundreds of charity campaignsrelatedto finance take placeatdie Industrial University of Ho
Trang 2Hội nghị Khoa học trẻ lần 5 năm 2023(YSC2023)-ỈUH
used[l] However, there are stillmanylimitations and difficulties in carryingout online charity7 activities, mainly in transparency7and financial management With the goal of makingonline charity activities more
for charity calls using Blockchain technology, making fundraising and sponsorship distribution more
and transparent
To achievetheresearch goal, theproj ect will be conducted using the product development research method, combined with experimentation and analysis Specifically,theproj ect will include the followingstages: Stage 1 ResearchingBlock chain technology and its applicati ons inthe fieldof charity7
Stage 2 Research andlearn howto use related technologiesto develop web3 applications
Stage 3 Design andbuild the application
Stage 4 Evaluate the results and provide future developmentdirections
2 THEORETICAL BASIS
2.1 Blockchain Technology 7 and Its Application in the Field of Charity
Blockchain technology isa decentralizeddatabase that storesinformation in blocks of information that are
transactions and data management^ ]
Blockchaintechnolog}7 has many applications indifferent fields, including the charity7 sector Some of the
potential uses ofblockchaintechnology7 in the charity sector are:
support, avoiding corruptionand waste
Creatinga connected andcollaborative philanthropic community, enablingcharities to shareinformation,
experiences, and resources with each other, strengthens the powerof philanthropy[3]
FUNDRAISERS WEB PORTALS
Fundrisers collect money by Charitypay.
Money goes to the e-wallet
The NPO/NGO opens a
project on Charity Wall
Theewallet related to the project is opened
Money can follow the transparency flow of Charity Wall
Figure 1: Managing Charity 4.0 with Blockchain[3]
2.2 Smart Contract
A smart contract is an application or programthat runs on the blockchain, a decentralized databasethat
stores information in linked blocks ofinformation Smart contracts can automatically execute terms or
Trang 3Hội nghị Khoa học trẻ lần 5 nám 2023(YSC2023)-ỈUH
predefined by computer code, and allnodes in the network must copyand enforce those rules
Smart contracts have many advantages, suchas[5][6]:
• Automation: Everything is automated, sothere areno delays or mistakes
• High transparency: The regulations are clearly written and unedited, so interference behind the
scenes isimpossible
• Easy to control:Just open it up to see it again.Documents will be encrypted on a shared ledger, so
• Security Guarantee: Blockchain always ensures thesafety of the documents inthe contract
• Accuracy: Common errors on paper will not appear on smartcontracts
Autonomy
You to the one making the agreement, there's no need
to rely on a broker or lawyer
Trust
Your documents
are encrypted on a shared ledger
Backup
On the btockcKainVour documents are dupr>catod
miny time* over T
Figure 2: TheAwesomeness ofSmart Contracts
2.3 Related Technologies
2.3.1 ReactJS
ReactJS[7] is a JavaScript library? usedtobuild user interfaces for single-page webapplications ReactJS
To define aRe act component class, you need to extend Re act Component and overridethe renderQ method
ReactJS isone ofthe most popular JavaScript libraries available today Itis used by many big companies
like Facebook, Instagram, Netflix, Airbnb, etc
Seamless Update o
Ease of Use Q
z- React \
Developer Tools [5] Ử Opensource
© 2023 TrườngĐạihọcCôngnghiệpThànhphố HồChí Minh 7
Trang 4Hội nghị Khoa học trẻ lần 5 nám 2023(YSC2023)-ỈUH
2.3.2 Solidity
Solidity [9] is a programming language that is being widely used in the development of blockchain
becomes oneofthe top choices for developingblockchainapplications
The properties of Solidity include high interpretability, staticness of data types, function support, inheritance, polymorphism, and abstraction Solidity also supports featuressuchas account andtransaction
management, access decentralization, andsmartcontracts
Solidity's current applications includethe development ofblockchainapplications suchas Ethereum, those
programmers to create smartcontracts andblockchain-based applications quickly and easily[8]
Technologies related to Solidity include blockchain platforms such as Ethereum, EOS, Tezos and
technologies related to blockchain application development suchas Web3.js, Truffle, and Ganache These
Solidity
Going forward, Solidity is expected to continue to grow and improve to meet the growing needs ofthe
blockchain market Many developers areusing Solidity to createnew applications andthe motivationto
technologies, Solidity could become one of the most important programming languages for the
development of blockchain applications inthefuture [10],
' 4 101 Blockchains I ULTIMATE SOLIDITY TUTORIAL
WHAT IS SOLIDITY?
DIFFERENT METHODS FOR SETTING UP THE SOLIDITY ENVIRONMENT
It Is a high level programming language focused on designing and implementing smart contracts The primary influences on Solidity Include c** JavaScript, and Python with a specific orientation for targeting the Ethereum
Virtual Machine
DIFFERENT VARIABLES IN SOLIDITY
CREATED BY I01BLOCKCHAINS.COM
2.3.3 Thirdweb
The ThirdWeb framework is an open-sourceframework developed on the Ethereumplatform, intended to
8 © 2023 TrườngĐạihọcCôngnghiệpThànhphốHồChí Minh
Trang 5Hội nghị Khoa học trẻ lần 5 năm 2023(YSC2023)-ỈƯH
Solidity, Vyper, Javascript, Python, etc This gives developers flexibility in choosing programming languages andincreasestheapplicability of ThirdWeb
The ThirdWeb Framework has many practical applications today, such as building decentralized finance applications, intellectual property management systems, applications in the healthcare industry, etc
Technologies related to the Thirdweb framework include blockchain-related technologies and
Ethereum-related protocols ThirdWeb also uses manynew technologies such as IPFS, Web3.js,Ethers.js,
The future ofThird webframework isvery promising, because decentralized applications are becoming a
businesses tobuild their decentralized applications The features and stability ofdieThirdweb framework are continuously improved, promisingto bring bettersolutionstodevelopers and usersinthefuture
Figure 5: Thirdweb Functions
2.3.4 Metamask
Metamask is a cryptocurrency wallet software and web browser based on the Ethereum blockchain
Launched in 201Ố,Metamask allows users to store, manage, and tradetokens and cryptocurrencies based
onthe Ether eumblockchain on their web browser
Metamask alsoallows for the creation and management of diverse wallet accounts,allowing users to store
Metamask's applications arediverse,from conducting cryptocurrency and tokentransactions,toaccessing
dApp services such as NFT marketplaces, games, and complex financial applications such as lending and
borrowing In addition, Metamask offers security features such as two-factor authentication and limiting
gas fees in transactions toreduce costs for users
Metamask is built onblockchain and open-source technologies, allowing users to easily learn and change its functions Metamask also integrates the latest technologies, such as EIP-1559, and is continuing to
develop new features to improve theuser experience andenhance security
As for thefuture of Metamask, it seems thatitwill continue toevolve and enhanceits features to meet the
growing needs of its users.In addition, with therapiddevelopment of DeFi and thegrowthofblockchain
applications, Metamask will also play an important role in bringing blockchain technology closerto end users[ll]
Here's how Metamask's passwordless cryptographically secure login flow works:
Step 1: Modifythe user model (Back-end)
Theuser model needstwonew required fields: publicAddress and nonce WithpublicAddressbeingunique
You can keep the usual username, email, and passwordfields—especially if you wantto implement your
MetaMask login alongside your email/p ass word login—but they areoptional
Trang 6Hội nghị Khoa học trẻ lần 5 nám 2023(YSC2023)-ỈUH
Step 3: User Fetches TheirNonce (Front-end)
Theuser enters the publicAddress inthe login form,when they clickthelogin button, the applicationwill
any results, it means thatthecurrentpublic address is not registered
Step 4:User Signs the Nonce (Front-end)
signing some malicious data When the user accepts it, thecallback function will be called with thesigned
message (called the signature) as an argument The front end then makes another API call to
POST/api/authentication,passing the bodywithboththesignatureandthe public address
Step 5: Signature Verification(Back-end)
database corresponding to the public address provided in the request body, specifically, it fetches the associated nonce
address and wecan considerthe person authenticated Then the JWT or sessionidentifier can be returned
Step 6: ChangetheNonce (Back-end)
Metamaskensures that the next time the same user wants to log in, they need to signanew nonce This is
2.3.5 Firebase storage
Ffrebase storage[12] is a sendee built for thepurposeofstoring and managing user-generated content such
as images, videos, or file data
Some strong pointssuch as:
10 © 2023 TrườngĐạihọcCôngnghiệpThànhphốHồChí Minh
Trang 7Hội nghị Khoa học trẻ lần 5 năm 2023(YSC2023)-IƯH
• Secure: Built-inFirebaseAuthentication for security, soit’seasy to manage access tofiles
Petabytes of data
Figure 7: Store and serve content with ease on firebase storage [12]
3.1 Software Architecture
0
Provider
Figure 8: ChainForHelp Architecture
Trang 8Hội nghị Khoa học trẻ ỉần 5 năm 2023(YSC2023)-ỈUH
ChainForHelp application,users firstneed to have aMetamask wallet account and have abalance inside it The condition of havingabalanceinthe account will not be requữed when you justwantto "roam around"
in this application However, when you want to create aproject to raise capital or support other projects
campaign data todie Ethereum Virtual Machine(EVM) Then,the EVM will perform the processing
stored as:
o Target: The donation goal of the project
o Amountcollected: Thetotal amount of donates collectedduring the campaign
o Category:Type of campaign
• The functions ofthe smart contractinclude:
o getDonators: Returnsthelist of wallet addresses of individuals who have contributedtoaspecific campaign
o filterCampaign: Returns analphabeticallist of campaigns
decentralized network Once the deployment process is complete, all activities after the client-side are
3.2 Technologies used for ChainForHelp
In the ChainForHelpapplication[14], Rcact.ISare used to design the userinterface along with technologies
Next, in orderforusers tobe able to donateto charity,they will need to useMetamask wallet, whenusers
transaction, Metamaskdigitally signs itand broadcastsit tothe Ethereum network.Additionally, Metamask
limits to prioritize transaction speed or reduce fees, and choose from a variety of Ethereum networks,
including mainnet, test network,andcustom network Finally, Google Cloud Storage is used tostore images
3.3 Results
❖ Login:byconnecting their Metamask wallet account to die application
required information As this is aBlockchain and SmartContract-based application, there willbe a
Trang 9Hội nghị Khoa học trẻ lần 5 nám 2023(YSC2023)-ỈUH
❖ Support other fundraising projects: userswill use thefr wallet balance to support other ongoing fundraising projects, provided that the deadline for theprojecthas not passed
filtering conditions These twotools will increase search speed and user-friendliness
All Campaigns (4)
Create a campaign
Figure 9:ChainForHelpHomepage
4 CONCLUSION AND OUR VISION
After analyzing and assessing the societal situation, specifically at the Industrial University of Ho Chi Minh
Ffrstly, we have built a user-friendly website application that facilitates seamless and transparent
storing it securely on theEthereum blockchain network
onlybeen deployed on theETH test network It servesto verify the application's features among a group of users Inthe upcomingversion, we plan to deploy ittothe ETH main network to gather further feedback and evaluate theapplication'soverallperformance
transactions, they need to install alot of things that make users afraid when they intend to use the
widely to Vietnamese people about blockchain technology - a technology that will be the foundationof many applications in the near future
REFERENCES
[1] J Wu, K Lin, D Lin,z Zheng, H Huang, and z Zheng, "Financial Crimes in Webs-Empowered Metaverse:
[2] Chen, c., Zhang, L., Li, Y,Liao,T., Zhao, s., Zheng, z., Huang, H,&Wu, J (2022) When Digital Economy
Meets WebS.O: Applications and Challenges IEEE Open Journal of the Computer Society,3, 225-235
© 2023 TrườngĐạihọcCôngnghiệpThànhphố HồChí Minh 13
Trang 10Hội nghị Khoa học trẻ ỉần 5 năm 2023(YSC2023)-ỈUH
[3] A Rangone and L Busolli, "Managing charity 4.0 with Blockchain: a case study at the time of Covid-19," International Review on Public and Nonprofit Marketing, vol 18, pp 491-521, 2021
[Accessed: 02/03/2023],
https://vjcc.org.vn/tri- thuc/cong-nghe-blockchain-va-ung-dung-trong-thi-truong-chuoi-cung-ung.htrnl
[5] "What Are Smart Contracts? - Binance Academy" [Online], Available:
[Accessed: 03/03/2023], https://academy.binance.com/en/articles/what-are-smart-contracts
[Accessed: 03/03/2023],
https://fptshop.com.vn/tin- tuc/danh-gia/hop-dong-thong-minh-la-gi-138549
05/03/2023],
https://reactjs.org/
[9] "What is Solidity Programming: Data Types, Smart Contracts, and EVM?" [Online], Available:
[Accessed: 08/03/2023], [10] "A Beginners Guide to Web3" [Online], Available:
[Accessed: 08/03/2023],
https://www.simplilearn.com/tutorials/blockchain-tutorial/what-is-solidity-programming
https://surajondev.com/2022/05/17/a-beginners-guide-to- web3/
[11] "Metamask - What is it, and How Does it Work?" [Online], Available:
[Accessed: 09/03/2023],
https://originstamp.com/blog/metamask- what-is-it-and-how-does-it-work/
[Accessed: 01/04/2023], https://firebase.google.com/products/storage
Organizations and Operations: Architectures, Models, and Mechanisms," IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol 53, no 4, pp 1-14, 2023
[14] "Build and Deploy a Web3 Crowdfunding Platform (Kickstarter) As Your First Blockchain Application"
[15] "The Architecture of a Web 3.0 application" [Online], Available:
[Accessed: 15/03/2023],
https://www.preethikasireddy.com/post/the- architecture-of-a-web-3-0-application
[16] "Top Web3 Architecture Layers Explained: Frontend, Backend, and Data" [Online], Available:
[Accessed: 15/03/2023],
https://itnext.io/top-3-web-3-0-architecture-layers-explained-frontend-backend-and-data-el0200f7fc76
[17] "One-click Login With Blockchain: A MetaMask Tutorial" [Online], Available:
[Accessed: 09/03/2023], https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial/