Open code423n4 opened 2 years ago
Issue already raised in https://github.com/code-423n4/2022-03-paladin-findings/issues/14 PR with the changes: https://github.com/PaladinFinance/Paladin-Tokenomics/pull/5
Given that the contract can be moved back out of the emergency state I don't think the sponsors assessment of this being a low risk issue is correct. I do think due to the external circumstances required for this to be achieved that it is probably best qualifies as a medium risk
2 — Med: Assets not at direct risk, but the function of the protocol or its availability could be impacted, or leak value with a hypothetical attack path with stated assumptions, but external requirements.
Will mark #14 a duplicate of this issue as well.
Lines of code
https://github.com/code-423n4/2022-03-paladin/blob/9c26ec8556298fb1dc3cf71f471aadad3a5c74a0/contracts/HolyPaladinToken.sol#L1338
Vulnerability details
Impact
In the Emergency withdraw function userCurrentBonusRatio and durationRatio aren't update which will user clime funds with the wrong ratio
Proof of Concept
https://github.com/code-423n4/2022-03-paladin/blob/9c26ec8556298fb1dc3cf71f471aadad3a5c74a0/contracts/HolyPaladinToken.sol#L1338
Tools Used
Manual
Recommended Mitigation Steps
set these variables to zero in the EmergencyWithdraw function