Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atharv - maxWithdraw doesn't comply with ERC-4626 #460

Closed
sherlock-admin2 opened this issue Aug 24, 2024 · 0 comments
Closed

Atharv - maxWithdraw doesn't comply with ERC-4626 #460

sherlock-admin2 opened this issue Aug 24, 2024 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Aug 24, 2024

Atharv

Medium

maxWithdraw doesn't comply with ERC-4626

Summary

maxWithdraw doesn't comply with ERC-4626 since it should return 0 if the deposit is paused.

Vulnerability Detail

The contract's maxWithdraw function doesn't comply with ERC-4626 which is a mentioned requirement. According to the specification, if withdrawals are entirely disabled (even temporarily) it MUST return 0..
The maxWithdraw is not returning 0 when the system is paused.

Impact

Failure to comply with the specification which is a mentioned necessity

Code Snippet

https://github.com/sherlock-audit/2024-08-sentiment-v2/blob/main/protocol-v2/src/SuperPool.sol#L220

Tool used

Manual Review

Recommendation

Return 0 when the withdrawals is paused.

Duplicate of #110

@github-actions github-actions bot closed this as completed Sep 5, 2024
@github-actions github-actions bot added Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. labels Sep 5, 2024
@sherlock-admin4 sherlock-admin4 changed the title Small Wool Squid - maxWithdraw doesn't comply with ERC-4626 Atharv - maxWithdraw doesn't comply with ERC-4626 Sep 15, 2024
@sherlock-admin4 sherlock-admin4 added the Reward A payout will be made for this issue label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Medium A Medium severity issue. Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

2 participants