DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: medium
Invalid

DOS issue in `SiloFacter:transferDeposit`

Summary

The transferDeposit function in the SiloFacet contract facilitates the transfer of a single deposit of ERC20 tokens from one user (sender) to another (recipient). The function's security relies on correctly identifying the transaction initiator (msg.sender or designated sender). However, there is a critical issue with how the sender (LibTractor._user()) is determined and used in the function, particularly when activePublisher is set in LibTractor.

Vulnerability Details

In the current implementation of transferDeposit, the function uses LibTractor._user() to determine the sender's address. This function is intended to return msg.sender or the activePublisher if set. However, there is a risk associated with this approach. If LibTractor._user() returns an activePublisher address due to it being set (not equal to address(1)), the function may revert transactions unexpectedly. This can occur despite msg.sender being equal to the designated sender or having sufficient allowance, leading to transaction failures and potential user frustration.

The issue primarily stems from the reliance on LibTractor._user() to determine the transaction initiator. When activePublisher is set, it may override the intended msg.sender or designated sender, leading to unexpected transaction behavior and potential reverts.

Impact

The incorrect determination of the sender's address can lead to security vulnerabilities, especially in scenarios where activePublisher does not align with the expected transaction originator.

Tools Used

Manual Review

Recommendations

To mitigate this issue, consider revising the transferDeposit function to explicitly use msg.sender or the provided sender parameter as the transaction sender. This approach ensures clarity and consistency in how transactions are processed, reducing the risk of unintended reverts and enhancing security.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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