Submitted by Nyx
Users can alter the record of their balances.
If the users delegateBalance has changed, observations will be recorded. If there is a need for a new observation, the new observation will be created; otherwise, it will be overwritten.
A new observation creation will be decided in the _getNextObservationIndex() function.
newestObservationPeriod is the last observations period. currentPeriod is a period that calculated with uint32 currentTime = uint32(block.timestamp).
The problem is, if someone deposits a small amount frequently, currentPeriod and newestObservationPeriod will always be the same and a new observation wont be created. Attackers can keep doing this until closeDraw and manipulate their balances.
According to the docs, if a draw were to start and end within a period, a user would be able to alter the record of their balance for that draw by overwriting an Observation.
It is important to note that due to Observation overwriting, average balances for a period are not finalized until a period ends. Therefore, if a draw ends but a period has not, a user would be able to manipulate their average balance for that final period of time after the draw ends. This would result in an inaccurate record of their balance held during the draw.
asselstine (PoolTogether) confirmed
Picodes (judge) decreased severity to Medium and commented:
PoolTogether mitigated:
Status: Mitigation confirmed with comments. Full details in reports from dirk_y, 0xStalin and rvierdiiev.
