It checks if pool exists in the stakingContract during the construction but doesn't validate stargate at all.
So users won't receive any rewards like the below.
The stakingContract contains pool and stargate as a reward token.
During the construction, pool and stargateWrong were set.
When users deposit/withdraw the underlying funds, the rewards will be accumulated with stargateWrong token in _claimAndSyncRewards. And the reward amount will be 0 always.
But in _claimAssetRewards(), the real rewards of stargate are transferred to the contract.
Users won't receive any rewards and the real rewards will be locked inside the contract forever.
Tools Used
Manual Review
Recommended Mitigation Steps
We should validate stargate_ during the construction.
Lines of code
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/stargate/StargateRewardableWrapper.sol#L21
Vulnerability details
Impact
Stakers won't get any rewards and the rewards might be locked inside the contract.
Proof of Concept
In
StargateRewardableWrapper
, it setspool
,stakingContract
, andstargate(reward token)
.It checks if
pool
exists in thestakingContract
during the construction but doesn't validatestargate
at all.So users won't receive any rewards like the below.
stakingContract
containspool
and stargate as a reward token.pool
andstargateWrong
were set.stargateWrong
token in _claimAndSyncRewards. And the reward amount will be 0 always.stargate
are transferred to the contract.Tools Used
Manual Review
Recommended Mitigation Steps
We should validate
stargate_
during the construction.Assessed type
Invalid Validation