Open code423n4 opened 2 years ago
Jujic
The rJoePerSec does not have any upper or lower bounds. Values that are too large will lead to reversions in several critical functions.
rJoePerSec
https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/RocketJoeStaking.sol#L151
function updateEmissionRate(uint256 _rJoePerSec) external onlyOwner { updatePool(); rJoePerSec = _rJoePerSec; emit UpdateEmissionRate(msg.sender, _rJoePerSec); }
Remix
Consider define upper and lower bounds on the _rJoePerSec.
_rJoePerSec
Confirming issue but disagree with severity.
Fix: https://github.com/traderjoe-xyz/rocket-joe/pull/112
Handle
Jujic
Vulnerability details
Impact
The
rJoePerSec
does not have any upper or lower bounds. Values that are too large will lead to reversions in several critical functions.Proof of Concept
https://github.com/code-423n4/2022-01-trader-joe/blob/a1579f6453bc4bf9fb0db9c627beaa41135438ed/contracts/RocketJoeStaking.sol#L151
Tools Used
Remix
Recommended Mitigation Steps
Consider define upper and lower bounds on the
_rJoePerSec
.