Category: Coding Mistakes
Flawed Pause Logic
Medium Impact
Medium Severity
Medium Likelihood
Description
The contract implementation contains faulty pause logic.
The
_updatefunction inUSPCdoes not havewhenNotPausedmodifier.Price reading functions (e.g.,
getLatestPrice) are protected bywhenNotPausedmodifier, but price management functions (addPrice,updatePrice) are not.The
processRedemptionsfunction applies only the globalwhenNotPausedmodifier. However, the validation for theredemptionPausedflag has been omitted.
Impact
This incorrect logic renders the pause mechanism ineffective, resulting in a loss of control in emergency scenarios.
Recommendations
We recommend to add missing whenNotPaused modifier and redemptionPaused check.
Remediation
This issue has been acknowledged by Coinshift, and a fix was implemented in commit d14d8915↗.