Problem
The pool_is_paused guard is only checked in lock_assets and unlock_assets. Several other functions that should be restricted during an emergency pause are not gated:
| Function |
Paused check? |
lock_assets |
Yes |
unlock_assets |
Yes |
stake |
No |
unstake |
No |
set_boost |
No |
set_global_multiplier |
No |
This means a paused pool continues to accept new stakes and boost changes through the boost/stake system, defeating the purpose of the emergency pause.
Analysis
The pause was likely designed to block both staking systems. The inconsistency exists because the lock/unlock system and the boost/stake system were implemented at different times without a unified pause invariant.
Fix
Add assert!(!pool_is_paused(&env), "pool is paused"); (or the typed-error equivalent after issue #10 is resolved) to:
set_global_multiplier, pause, unpause, and transfer_admin should not be gated — the admin must be able to act even while paused.
Acceptance Criteria
Problem
The
pool_is_pausedguard is only checked inlock_assetsandunlock_assets. Several other functions that should be restricted during an emergency pause are not gated:lock_assetsunlock_assetsstakeunstakeset_boostset_global_multiplierThis means a paused pool continues to accept new stakes and boost changes through the boost/stake system, defeating the purpose of the emergency pause.
Analysis
The pause was likely designed to block both staking systems. The inconsistency exists because the lock/unlock system and the boost/stake system were implemented at different times without a unified pause invariant.
Fix
Add
assert!(!pool_is_paused(&env), "pool is paused");(or the typed-error equivalent after issue #10 is resolved) to:stakeunstakeset_boostset_global_multiplier,pause,unpause, andtransfer_adminshould not be gated — the admin must be able to act even while paused.Acceptance Criteria
stakeblocked when pool is pausedunstakeblocked when pool is pausedset_boostblocked when pool is pausedset_global_multiplierremains callable while paused (admin op)