Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.21 KB

Wrong Order of Operations Leads to Exponentiation of `rewardPerTokenStored`.md

File metadata and controls

30 lines (24 loc) · 1.21 KB

rewardPerTokenStored is mistakenly used in the numerator of a fraction instead of being added to the fraction.

The result is that rewardPerTokenStored will grow exponentially thereby severely overstating each individual's rewards earned.

Individuals will therefore either be able to withdraw more funds than should be allocated to them or they will not be able to withdraw their funds at all as the contract has insufficient SNX balance.

This vulnerability makes the Unipool contract unusable.

Recommendation:

Adjust the function rewardPerToken() to represent the original functionality.


Slide Screenshot

072.jpg


Slide Text

  • Sigma Prime Unipool Finding 1
  • Ordering
  • Critical Severity
  • Wrong Ordering
  • Operands in Expression
  • Correct Operand Ordering

References


Tags