Certain ERC-20 tokens do not support zero-value token transfers and revert.
As ERC20 can be an arbitrary token, in the case when such token doesn't allow for zero amount transfers.
Vulnerability Detail
See summary
Impact
This may break systems or burn tokens by transferring them to address(0).
tsvetanovv
medium
ERC20 transfer zero amount can be reverted
Summary
Certain ERC-20 tokens do not support zero-value token transfers and revert. As ERC20 can be an arbitrary token, in the case when such token doesn't allow for zero amount transfers.
Vulnerability Detail
See summary
Impact
This may break systems or burn tokens by transferring them to address(0).
Code Snippet
https://github.com/sherlock-audit/2023-02-surge/blob/main/surge-protocol-v1/src/Pool.sol#L19
Tool used
Manual Review
Recommendation
Add a simple check for zero-value token transfers.