The ModuleCore::updatePoolsStatus function is intended to pause or unpause withdrawals and deposits the PSM. However using this function has no effect on repurchase's operation.
Root Cause
The issue arises because the pausing mechanism implemented in updatePoolsStatus is not being validated when user call PsmCore::repurchase
When calling the repurchase function, the user receives DS and PA while depositing RA. This process may introduce potential risks in scenarios where pausing functionality is crucial for security or operational reasons.
Mitigation
The recommendation is to revisit the implementation and ensure that the pausing logic is properly integrated into repurchase function.
High Flint Llama
Low/Info
Ineffective PSM Pausing
Summary
The
ModuleCore::updatePoolsStatus
function is intended to pause or unpause withdrawals and deposits the PSM. However using this function has no effect on repurchase's operation.Root Cause
The issue arises because the pausing mechanism implemented in
updatePoolsStatus
is not being validated when user callPsmCore::repurchase
https://github.com/sherlock-audit/2024-08-cork-protocol/blob/db23bf67e45781b00ee6de5f6f23e621af16bd7e/Depeg-swap/contracts/core/Psm.sol#L34
Impact
When calling the repurchase function, the user receives DS and PA while depositing RA. This process may introduce potential risks in scenarios where pausing functionality is crucial for security or operational reasons.
Mitigation
The recommendation is to revisit the implementation and ensure that the pausing logic is properly integrated into repurchase function.