sherlock-audit / 2024-06-magicsea-judging

2 stars 0 forks source link

Tricky Pebble Dachshund - Dust amounts can be used to create/add positions #698

Closed sherlock-admin3 closed 2 months ago

sherlock-admin3 commented 2 months ago

Tricky Pebble Dachshund

Low/Info

Dust amounts can be used to create/add positions

Summary

Users can create positions with Dust amounts. Like wise, users can add positions with dust amounts. This opens up opportunity to abuse the staking opportunity and take advantage.

Vulnerability Detail

Dust amounts is an overhead on the system.

Impact

Stealing rewards by abusing how the system only looks a lock period to compute rewards.

Code Snippet

https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L354

https://github.com/sherlock-audit/2024-06-magicsea/blob/main/magicsea-staking/src/MlumStaking.sol#L397

Tool used

Manual Review

Recommendation

Configure a minimum deposit amount when create a new position or adding additional position.