sherlock-audit / 2024-05-napier-update-judging

8 stars 7 forks source link

Drynooo - The revert of _stake will cause many functions of the protocol to be unavailable. #60

Closed sherlock-admin2 closed 3 months ago

sherlock-admin2 commented 3 months ago

Drynooo

medium

The revert of _stake will cause many functions of the protocol to be unavailable.

Summary

_stake is the core function of protocol staking. The revert of stake may cause users to be unable to stake, and may also cause errors in many functions in the router.

Vulnerability Detail

Errors in _stake are generally due to certain restrictions in the staking agreement, but these restrictions are almost always temporary. Therefore, even if there is an error in _stake, it should not prevent users from staking and should not affect the normal functions of the protocol. Protocol can wait until the next time the user pledges before calling _stake. Therefore, can use try to call stake to ensure the stable operation of the protocol.

Impact

This may result in the agreement being unable to be issue.

Code Snippet

https://github.com/sherlock-audit/2024-05-napier-update/blob/c31af59c6399182fd04b40530d79d98632d2bfa7/napier-uups-adapters/src/adapters/BaseLSTAdapterUpgradeable.sol#L158

Tool used

Manual Review

Recommendation

It is recommended to use try to call the _stake function.

sherlock-admin3 commented 3 months ago

1 comment(s) were left on this issue during the judging contest.

z3s commented:

Invalid; For an issue to be a valid Denial of Service (DoS), it must meet one of these criteria: 1. The issue causes locking of funds for users for more than a week. 2. The issue impacts the availability of time-sensitive functions.