Overview
Early cancellation of streams by senders provides no penalty, enabling fee-free capital extraction strategies where senders create and cancel streams speculatively.
Problem
Without a cancellation fee, senders can abuse the protocol's escrow function with no cost, effectively using it as a free temporary holding mechanism for tokens.
Proposed Solution
- Add an admin-configurable
cancellation_fee_basis_points: u32 parameter
- On
cancel_stream, deduct a percentage of the sender's unstreamed refund and transfer it to the protocol treasury
- No fee applied when the stream has already passed its
end_time (natural expiry is free)
- Emit the fee amount in the
CancelledStream event
Acceptance Criteria
Overview
Early cancellation of streams by senders provides no penalty, enabling fee-free capital extraction strategies where senders create and cancel streams speculatively.
Problem
Without a cancellation fee, senders can abuse the protocol's escrow function with no cost, effectively using it as a free temporary holding mechanism for tokens.
Proposed Solution
cancellation_fee_basis_points: u32parametercancel_stream, deduct a percentage of the sender's unstreamed refund and transfer it to the protocol treasuryend_time(natural expiry is free)CancelledStreameventAcceptance Criteria
cancellation_fee_basis_pointscancel_streamdeducts the fee from the sender's refund and credits the treasurycurrent_time >= end_timeCancelledStreamevent includescancellation_feefield