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:
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.
Implement validation in the setEarlyExitFeeBps function to restrict earlyExitFeeBps to a reasonable range, preventing the owner from setting excessively high or low fee values.
FadoBagi
High
FadoBagi - Lack of Validation on
earlyExitFeeBps
FadoBagi
High
Lack of Validation on
earlyExitFeeBps
Summary
The
VaultFactory
contract allows the owner to set theearlyExitFeeBps
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, thesetEarlyExitFeeBps
function permits the owner to set theearlyExitFeeBps
without any constraints: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
setEarlyExitFeeBps
https://github.com/sherlock-audit/2024-08-saffron-finance/blob/main/lido-fiv/contracts/VaultFactory.sol#L101-L104Tool used
Manual Review
Recommendation
Implement validation in the
setEarlyExitFeeBps
function to restrictearlyExitFeeBps
to a reasonable range, preventing the owner from setting excessively high or low fee values.