Beginner FriendlyFoundryDeFi
100 EXP
View results
Submission Details
Severity: high
Valid

Manupulating in Users Staking

Vulnerability Details

The stake function allows manipulation of users' stake amounts. The function incorrectly assigns the entire msg.value to the _onBehalfOf address instead of adding it to the existing stake. This overwrites any previous stake, potentially leading to loss of funds and allowing malicious actors to manipulate others' stake amounts.

self.usersToStakes[_onBehalfOf] = msg.value

Impact

High

Tools Used

Manual Review

Recommendations

self.usersToStakes[_onBehalfOf] += msg.value
Updates

Lead Judging Commences

inallhonesty Lead Judge
10 months ago
inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Steaking::stake overwrites the msg.value into storage

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.