Skip to content

Fix paused-stream clawback bypass - #475

Open
babawo96 wants to merge 1 commit into
conduit-protocol:mainfrom
babawo96:fix-paused-clawback
Open

Fix paused-stream clawback bypass#475
babawo96 wants to merge 1 commit into
conduit-protocol:mainfrom
babawo96:fix-paused-clawback

Conversation

@babawo96

@babawo96 babawo96 commented Aug 31, 2026

Copy link
Copy Markdown

closes #369

Summary

This patch blocks clawback() while a stream is paused, preventing the sender from freezing accrual and immediately draining the remaining principal while the recipient is unable to earn any additional funds.

Root cause

streamed_amount() freezes accrual at paused_at, so a paused stream reports a tiny owed amount. The previous clawback() logic then reclaimed balance - owed, which could be effectively the entire remaining principal in the same block the sender paused the stream.

Fix

  • reject clawback() when info.is_paused() is true
  • require resume() before sender/operator may claw back any unstreamed funds
  • add the paused-stream regression assertion to the clawback tests
  • document the resume-first behavior in the contract docs

Notes

Per the request, this change was made without running tests or compilation checks in this session, so CI status is not claimed here.

## Summary

This patch blocks `clawback()` while a stream is paused, preventing the sender from freezing accrual and immediately draining the remaining principal while the recipient is unable to earn any additional funds.

## Root cause

`streamed_amount()` freezes accrual at `paused_at`, so a paused stream reports a tiny `owed` amount. The previous `clawback()` logic then reclaimed `balance - owed`, which could be effectively the entire remaining principal in the same block the sender paused the stream.

## Fix

- reject `clawback()` when `info.is_paused()` is true
- require `resume()` before sender/operator may claw back any unstreamed funds
- add the paused-stream regression assertion to the clawback tests
- document the resume-first behavior in the contract docs

## Notes

Per the request, this change was made without running tests or compilation checks in this session, so CI status is not claimed here.
@babawo96
babawo96 requested a review from Jaydbrown as a code owner August 31, 2026 09:22
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@babawo96 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: DripStream::clawback during a pause lets the sender bypass the force_cancel recipient protection

1 participant