The vulnerability is arise on the block timestamp to determine the status of a stream, it's allow Miners that can manipulate the block timestamp within a certain range to benefit from specific transactions.
The _statusOf function is determines the status of a stream based on the current block timestamp and the stream's start time, here the function first checks if the stream is depleted or was canceled and returns the respective status
and then checks if the current block timestamp is less than the stream's start time. If true, it returns PENDING
and then move to calculates the streamed amount and compares it to the deposited amount. and If the streamed amount is less, it returns STREAMING; otherwise, it returns SETTLED here
The issue is arises from that the function is relie on the block timestamp to determine the PENDING status and allow Miners to manipulate the block timestamp within a certain range to delay or accelerate the transition between PENDING and STREAMING statuses and also Miners can adjust the block timestamp backward to keep a stream in PENDING status longer than intended, and delaying the recipient's ability to withdraw funds also there is a possibility that miners can adjust the block timestamp forward to transition a stream to STREAMING status prematurely, allowing withdrawals to start earlier than intended.
i test with a scenario that confirm this :
i simulate a stream and set it to start 1 hour from the current time with a deposited amount of 1000 tokens.
and adjusted the block timestamp within a ±15-minute range and checked the stream's status here is the details :
Stream ID: 1
Start Time: datetime.now() + timedelta(hours=1) (1 hour from current time)
Deposited Amount: 1000 tokens
in Manipulation the Miner adjusts the block timestamp backward by 15 minutes.
The stream remains in the PENDING status because the manipulated timestamp is still less than the start time.
here is the test :
Recipients cannot start withdrawing funds as the stream is incorrectly kept in the PENDING status.
manual review
need a to add a Safety Buffer and Reference Multiple Timestamps
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.