The unstreamed storage variable is redundant and the system can already track everything without this storage variable.
Note that this variable is never read and only written to.
(The system essentially tracks deposit_balance * deposit_duration for each user and pays out the fair share compared to the total cumulative balance times duration once at the end.)
Removing this variable saves a lot of gas as every updateStreamInternal call has to do fewer computations.
Handle
cmichel
Vulnerability details
The
unstreamed
storage variable is redundant and the system can already track everything without this storage variable. Note that this variable is never read and only written to. (The system essentially tracksdeposit_balance * deposit_duration
for each user and pays out the fair share compared to the total cumulative balance times duration once at the end.)Removing this variable saves a lot of gas as every
updateStreamInternal
call has to do fewer computations.