Flow

Sablier
FoundryDeFi
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

USDC Blacklist Prevents Stream Refunds

Summary

The _refund function in SablierFlow contract lacks handling for cases where the sender's address is blacklisted in USDC's contract. This prevents blacklisted senders from receiving refunds of their remaining stream balance, effectively locking their funds in the contract.

Vulnerability Details

The issue arises because USDC includes a blacklist feature that prevents transfers to/from certain addresses. If a stream sender becomes blacklisted after creating a stream, they cannot receive refunds as the USDC transfer will revert, but the contract doesn't provide any alternative mechanism for fund recovery.
(https://github.com/Cyfrin/2024-10-sablier/blob/8a2eac7a916080f2022527408b004578b21c51d0/src/SablierFlow.sol#L673C1-L711C6)[https://github.com/Cyfrin/2024-10-sablier/blob/8a2eac7a916080f2022527408b004578b21c51d0/src/SablierFlow.sol#L673C1-L711C6]

function _refund(uint256 streamId, uint128 amount) internal {
...
address sender = _streams[streamId].sender;
IERC20 token = _streams[streamId].token; <-- USDC
...
// Interaction: perform the ERC-20 transfer.
token.safeTransfer({ to: sender, value: amount }); <-- WILL BE REVERT IF BLACKLISTED
}

Impact

  • Medium severity because:

    • It requires specific conditions: the stream sender must be added to USDC's blacklist after creating the stream

    • The recipient would need to intentionally blacklist the sender

  • Affects one of the most widely used stablecoins (USDC)

  • Stream senders who become blacklisted have no way to recover their remaining stream balance

Tools Used

Manual code review

Recommendations

There are two potential approaches to mitigate this issue:

  1. Add an optional "alternativeAddress" parameter to the _refund function.

  2. Implement sender transfer functionality to allow changing the sender address.

Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

0x180db Submitter
8 months ago
inallhonesty Lead Judge
8 months ago
0x180db Submitter
8 months ago
inallhonesty Lead Judge
8 months ago
inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.