The function Steaking.vy::stake()
overwrites the previously staked value, leading to a user losing ETH.
The function Steaking.vy::stake()
uses the following code to record the staked value of each user:
Each time a user stakes their ETH, the function creates a new mapping instead of adding to the previous staked value, resulting in the loss of the earlier staked amount.
Add the following code to the end of Steaking.t.sol
in the test folder:
Users will lose their previously staked ETH.
Update the Steaking.vy::stake() function with the following code:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.