The positon method gets the users pending stakes and updates state of the contract by adding the stakes to the position, without checking if the the stakes are matured yet resulting in two thing
By passing of the 1 day waiting time
Double State update of the same stake amounts
The positions Function as shown below, gets the users pending stakes and adds them to the position
This Leads to a situation where the stakes have not being consolidated as shown in the holderPendingStakes
method it just retrieves the pending stakes
When the time passes and the pending stake is now consolidated as shown in the consolidatePendingStakes
below, it does not check if the stakes have been added before it just checks for the time and adds the pending stakes to the positions
A User can bypass the 24 hour waiting period due to the position function not checking for the maturity of the pending stake
When the consolidatePendingStakes
is called due to other actions, it adds the same pending stakes to the position, which means double stakes are added to the same position
Manual Review
Prevent the position
function from updating the state of unmatured stakes to the holders position.
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.