// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract Fund { mapping(address…
- User
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20;
contract Fund { mapping(address => uint) public shares;
function withdraw() public { if (payable(msg.sender).send(shares[msg.sender])) { shares[msg.sender] = 0; } }} Would you feel secure placing your funds in this cntract? If so, kindly why?
- Assistant
From a security perspective, there are a few concerns with the given contract: