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 Aug 18, 2024. It is now read-only.
0xrice.cooker - Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
#9
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
Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
Summary
Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
Vulnerability Detail
Stagate's LPStakingTime have no method to specialise to only withdrawing reward out. Due to that, LPStakingTime.deposit() and LPStakingTime.withdraw() beside depositing/withdraw funds, it will also send the accumulated reward to the caller.
In StakedStargateAM, we don't have any logic to store the value of received reward during a call deposit() and withdraw(), hence the protocol is not even know that the reward is already distribute
Impact
This will lead to user who owns StakedStargateAM NFT will lose majority of reward. And the StakedStargateAM contract have the no method to take the un distribute reward out
sherlock-admin
changed the title
Deep Menthol Meerkat - Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
0xrice.cooker - Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
Feb 28, 2024
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
0xrice.cooker
high
Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
Summary
Wrong intergation with Stargate's LPStakingTime contract leads to all users earn less interest than expected and rewards got stuck in StakedStargateAM contract
Vulnerability Detail
Stagate's LPStakingTime have no method to specialise to only withdrawing reward out. Due to that, LPStakingTime.deposit() and LPStakingTime.withdraw() beside depositing/withdraw funds, it will also send the accumulated reward to the caller.
In StakedStargateAM, we don't have any logic to store the value of received reward during a call deposit() and withdraw(), hence the protocol is not even know that the reward is already distribute
Impact
This will lead to user who owns StakedStargateAM NFT will lose majority of reward. And the StakedStargateAM contract have the no method to take the un distribute reward out
Code Snippet
https://github.com/sherlock-audit/2023-12-arcadia/blob/de7289bebb3729505a2462aa044b3960d8926d78/accounts-v2/src/asset-modules/Stargate-Finance/StakedStargateAM.sol#L82C1-L97C6
https://basescan.org/address/0x06Eb48763f117c7Be887296CDcdfad2E4092739C#code#F1#L159
https://basescan.org/address/0x06Eb48763f117c7Be887296CDcdfad2E4092739C#code#F1#174
Tool used
Manual Review
Recommendation
Duplicate of #38
The text was updated successfully, but these errors were encountered: