Missing access control in `setAmbRewards` and `setConcRewards` functions of `LiquidityMiningPath.sol`. Malicious user can call them and increase the reward by passing `poolIdx` for his pool. #192
There is no access control implemented in setAmbRewards and setConcRewards functions. concRewardPerWeek_ and ambRewardPerWeek_ mapping can be changed for any poolIdx and can exploit the protocol by getting maximum possible rewards by setting them.
Add proper access control on setAmbRewards and setConcRewards functions of LiquidityMiningPath.sol so that only protocol admin/governance can call this to change the rewards.
Lines of code
https://github.com/code-423n4/2023-10-canto/blob/main/canto_ambient/contracts/callpaths/LiquidityMiningPath.sol#L65-L81
Vulnerability details
Impact :
There is no access control implemented in
setAmbRewards
andsetConcRewards
functions.concRewardPerWeek_
andambRewardPerWeek_
mapping can be changed for anypoolIdx
and can exploit the protocol by getting maximum possible rewards by setting them.POC :
Vulnerable Code :contracts/callpaths/LiquidityMiningPath.sol#L65-L81
Tools Used
Manual Review
Recommended Mitigation Steps :
setAmbRewards
andsetConcRewards
functions ofLiquidityMiningPath.sol
so that only protocol admin/governance can call this to change the rewards.Assessed type
Access Control