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

Proud Wintergreen Butterfly - deposit function redundant check that may lead to DOS #82

Open
sherlock-admin3 opened this issue Sep 24, 2024 · 0 comments

Comments

@sherlock-admin3
Copy link

Proud Wintergreen Butterfly

Medium

deposit function redundant check that may lead to DOS

Summary

In deposit_withdraw.rs the function deposit may revert due to the call to balance.

Vulnerability Detail

The revert will be caused due to the unnecessary check to verify that the token_vault.amount is greater than woopool.unclaimed_fee, despite the fact that token_vault.amount will be increased within the deposit function.

Impact

Incorrect check within deposit leads to the function reverting.

Code Snippet

deposit instruction

Tool used

Manual Review

Recommendation

Remove the incorrect check in the line let _balance_before = balance(woopool, token_vault)?; to avoid unintended reverts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant