Open code423n4 opened 2 years ago
While the problem can seem trivial, the warden has proven that the contract can over time end up leaking excess value as any additional pool will dilute the totalAllocPoint
and old pools cannot be retired.
The sponsor also confirms.
I believe the finding to be valid, but because the leak is contingent on settings, I believe Medium Severity to be more appropriate
Lines of code
https://github.com/code-423n4/2022-02-concur/blob/main/contracts/MasterChef.sol
Vulnerability details
Impact
There is no functionality for removing pools/setting pool's allocPoints. Therefore
totalAllocPoint
only increases and rewards for pool decreases.Proof of Concept
Scenario:
Tools Used
Manual review
Recommended Mitigation Steps
Add functionality for removing pool or functionality for setting pool's
totalAllocPoint
param.