the getRefundedAmount() function calculates the amount that the sender would be refunded if the stream were canceled.
when a stream get canceled it will be marked as a cold stream as the following:
https://github.com/sablier-labs/v2-core/blob/ba1cda3b43ba3a5b542433e0f12f843398fd089f/src/interfaces/ISablierV2Lockup.sol#L122C5-L125C75
there is no need of a local variable that is always zero.
manual review
to calculate the stream value we need only for :
depositedAmount,
withdrawnAmount.
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.