solidity-challenge
solidity-challenge copied to clipboard
Proposed solution to the challenge
I share a possible solution to the proposed challenge.
Use hardhat and etherjs for this solution. I would appreciate any feedback.
You're not considering the time when the users deposited, so with this solution a user could wait for the total rewards to be significant, deposit double the total deposits and withdraw to get almost all the reward :fearful: