Broken invariant
if isVoided = false => expected amount streamed = td + amount withdrawn
Knowing what is amount streamed and how its calculated we get
its elapsedTime * ratePerSecond
going back to the equation
td=
so its elapsedTime * ratePerSecond + _streams[streamId].snapshotDebtScaled
and amount withdrawn is scaled and subtracted from _streams[streamId].snapshotDebtScaled
gathering all equations then
elapsedTime * ratePerSecond = elapsedTime * ratePerSecond + _streams[streamId].snapshotDebtScaled + withdrawnAmountScaled
solving equation
then
streams[streamId].snapshotDebtScaled = 0
and streams[streamId].snapshotDebtScaled != 0
Broken invariant cause that
contract logic may operate in unexpected ways
also this give Loss of Trust and Reputation of the protocol
manual review
correct the invariant
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.