Question: [ 4 0 ] 4 . The smart contract in the figure below is to be used as a third party to donate funds to

[40]4. The smart contract in the figure below is to be used as a third party to donate funds to other
users.
A. Research common smart contract vulnerabilities and explain in detail why this con-
tract is not secure and how an exploiter can exploit this contract to steal all the funds
Homework Assignment 3
deposited in the contract. We have provided the exploiter contract at contracts/ Vulner-
abilityExploit.sol. Try to analyze the logic of this exploiter contract and how it might
interact maliciously with the vulnerable contract (contracts/Vulnerability.sol).
Hints: If a function from one contract is called from another contract, msg.sender will be the calling
contract's address. The unnamed receive() external payable function is a fallback function (if you are
unfamiliar with a fallback function, research what a fallback function is).
[ 4 0 ] 4 . The smart contract in the figure

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!