You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Users are not able to withdraw their funds from LMPVault
Summary
Users need to stake their TOKE rewards in GPToke.sol.
However, GPToke.sol has a MIN_STAKE_AMOUNT which is a constant
uint256public constant MIN_STAKE_AMOUNT =10_000;
so users should earn at least 10_000 to avoid this revert
Vulnerability Detail
This will happen when the user withdraws his funds from the LMPVault
But if this Vault has a hard time with no reward or just dust, for a period of time. Also the claimsVaultRewards() wouldn't be called when there is only say $50 worth of rewards to collect, gas would eat all the profits. Same with liquidateVaultsForToken. So the reward will be too small
The MainRewarder.sol will be forced by GPToke.sol to revert with StakingAmountInsufficient() error.
Impact
The user is not able to withdraw his funds. They are locked until the reward of the user reaches the MIN_STAKE_AMOUNT
Code Snippet
Tool used
Manual Review
Recommendation
in AbstractRewarder._getReward() add check if the TOKE reward is small than MIN_STAKE_AMOUNT skip the stake action
sherlock-admin
changed the title
Formal Magenta Okapi - Users are not able to withdraw their funds from LMPVault
Ch_301 - Users are not able to withdraw their funds from LMPVaultOct 3, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Ch_301
medium
Users are not able to withdraw their funds from
LMPVault
Summary
Users need to stake their TOKE rewards in
GPToke.sol
.However,
GPToke.sol
has aMIN_STAKE_AMOUNT
which is a constantso users should earn at least
10_000
to avoid this revertVulnerability Detail
This will happen when the user withdraws his funds from the
LMPVault
But if this Vault has a hard time with no reward or just dust, for a period of time. Also the
claimsVaultRewards()
wouldn't be called when there is only say $50 worth of rewards to collect, gas would eat all the profits. Same withliquidateVaultsForToken
. So the reward will be too smallThe
MainRewarder.sol
will be forced byGPToke.sol
to revert withStakingAmountInsufficient()
error.Impact
MIN_STAKE_AMOUNT
Code Snippet
Tool used
Manual Review
Recommendation
in
AbstractRewarder._getReward()
add check if the TOKE reward is small thanMIN_STAKE_AMOUNT
skip the stake actionDuplicate of #565
The text was updated successfully, but these errors were encountered: