Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
transfer_and_update_stream (lib.rs:396-407) calls token_client.transfer to the recipient and mutates only a local Stream; withdraw persists it afterward at lib.rs:448. cancel_stream transfers to recipient (lib.rs:502) and sender (lib.rs:512) before save_stream (lib.rs:523). token_address is an arbitrary caller-supplied contract (validate_token_contract only checks a decimals() symbol exists, lib.rs:314), so a token with a transfer hook could re-enter while storage still shows the pre-update is_active/withdrawn_amount, enabling a double payout.
Acceptance criteria
Files to touch
contracts/stream_contract/src/lib.rs
Out of scope
- Replacing the Soroban token interface
Why this matters
transfer_and_update_stream (lib.rs:396-407) calls token_client.transfer to the recipient and mutates only a local Stream; withdraw persists it afterward at lib.rs:448. cancel_stream transfers to recipient (lib.rs:502) and sender (lib.rs:512) before save_stream (lib.rs:523). token_address is an arbitrary caller-supplied contract (validate_token_contract only checks a decimals() symbol exists, lib.rs:314), so a token with a transfer hook could re-enter while storage still shows the pre-update is_active/withdrawn_amount, enabling a double payout.
Acceptance criteria
Files to touch
contracts/stream_contract/src/lib.rsOut of scope