Instead, it directly creates a staking rewards event using current Kwenta balance. Based on the main functionality, this value should be equal to mintedAmount. In the end, anyone can change and increase this staking rewards by sending some Kwenta.
Impact
Anyone can increase reward amount
Wrong main system functionality
TessKimy
Medium
In Rewards Notifier, notifyRewardAmount is not correctly implemented
Summary
Staking rewards configured wrongly in Rewards Notifier contract.
Vulnerability Detail
Based on the system mechanism, supply scheduler can schedule a staking reward event when a new minting occur on supply schedule.
This amountToStakingRewards parameter is not used in the Reward Notifier contract:
Instead, it directly creates a staking rewards event using current Kwenta balance. Based on the main functionality, this value should be equal to mintedAmount. In the end, anyone can change and increase this staking rewards by sending some Kwenta.
Impact
Anyone can increase reward amount Wrong main system functionality
Code Snippet
https://github.com/sherlock-audit/2024-07-kwenta-staking-contracts/blob/main/token/contracts/StakingRewardsNotifier.sol#L88C1-L95C6
Tool used
Manual Review
Recommendation
Forwarding the mintedAmount parameter to Staking Reward will fix the functionality.