Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Unchecked External Call to ERC-20 Transfer Functions

Summary

report identifies a critical vulnerability in the SablierV2BatchLockup contract related to unchecked external calls to ERC-20 transfer functions. This issue could lead to unexpected behavior, such as Denial of Service (DoS) attacks or unauthorized token transfers.

Vulnerability Details

The vulnerability is found in the _handleTransfer method of the contract, where the transfer and approve functions of the ERC-20 token are called without checking their return values. According to the ERC-20 standard, these functions return a boolean indicating success. Failing to verify these return values could allow the contract to proceed as if the transfers were successful, even when they fail.

Impact

The unchecked external calls can have severe consequences:

Denial of Service (DoS): An attacker could exploit this vulnerability by causing the transfer function to fail repeatedly, preventing legitimate users from transferring their tokens.
Unauthorized Token Transfers: If an ERC-20 token has a non-standard implementation that returns false or reverts under certain conditions, it could lead to tokens being transferred without proper authorization.

Tools Used

Manual Code Review
Mythril

Recommendations

To mitigate this vulnerability, it is essential to add checks that verify the success of the ERC-20 transfer and approve calls. like:
require(asset.transferFrom(msg.sender, address(this), amount), "Transfer failed");
require(asset.approve(sablierContract, amount), "Approval failed");

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

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