Problem
The emergency_pause circuit breaker is implemented in vault.rs, but test.rs contains no assertions verifying that it successfully blocks deposits and withdrawals when active.
Expected behavior
The test suite is expanded to simulate the admin pausing the vault, followed by assertions that user calls to deposit and withdraw trigger the expected panic.
Files to update
Project relevance
This mathematically guarantees the reliability of the protocol's primary security mechanism, ensuring funds can be safely frozen during an external exploit.
Acceptance criteria
Problem
The
emergency_pausecircuit breaker is implemented invault.rs, buttest.rscontains no assertions verifying that it successfully blocks deposits and withdrawals when active.Expected behavior
The test suite is expanded to simulate the admin pausing the vault, followed by assertions that user calls to
depositandwithdrawtrigger the expected panic.Files to update
src/test.rsProject relevance
This mathematically guarantees the reliability of the protocol's primary security mechanism, ensuring funds can be safely frozen during an external exploit.
Acceptance criteria
#[should_panic(expected = "Vault is currently paused")]for testing blocked actions