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

Keen Lead Squid - FadoBagi - Lack of Validation on earlyExitFeeBps #151

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

Comments

@sherlock-admin3
Copy link

Keen Lead Squid

High

FadoBagi - Lack of Validation on earlyExitFeeBps

FadoBagi

High

Lack of Validation on earlyExitFeeBps

Summary

The VaultFactory contract allows the owner to set the earlyExitFeeBps without any validation. This enables the owner to assign arbitrary and malicious fee values, which can result in users being overcharged or losing their entire withdrawal amounts.

Vulnerability Detail

In the VaultFactory contract, the setEarlyExitFeeBps function permits the owner to set the earlyExitFeeBps without any constraints:

function setEarlyExitFeeBps(uint256 _earlyExitFeeBps) external onlyOwner {
    earlyExitFeeBps = _earlyExitFeeBps;
    // ...
}

The function does not validate the value of _earlyExitFeeBps before setting it. The owner can set it to any value, including excessively high or low values.

High earlyExitFeeBps can result in users being overcharged during withdrawals. Users might lose a significant portion or all of their withdrawal amounts.

Impact

The lack of validation on earlyExitFeeBps allows the contract owner to set arbitrary fee values, leading to users being overcharged or losing their entire withdrawal amounts.

Code Snippet

Tool used

Manual Review

Recommendation

Implement validation in the setEarlyExitFeeBps function to restrict earlyExitFeeBps to a reasonable range, preventing the owner from setting excessively high or low fee values.

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