Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS-BOLD-010 Low 5.13: Shutdown Can Be Triggered Twice #474

Closed
bingen opened this issue Oct 8, 2024 · 0 comments · Fixed by #393
Closed

CS-BOLD-010 Low 5.13: Shutdown Can Be Triggered Twice #474

bingen opened this issue Oct 8, 2024 · 0 comments · Fixed by #393
Assignees

Comments

@bingen
Copy link
Collaborator

bingen commented Oct 8, 2024

The shutdown function in BorrowerOperations is used to shut down the branch when the TCR falls below the SCR. If the branch is already shut down, the function will revert.

However, the function calls priceFeed.fetchPrice(), which can also shut down the branch if the price feed is failing.

This means that if the oracle fails at the same time that the branch's TCR falls below the SCR, the branch can be shut down twice. This will emit both the ShutDown and ShutDownFromOracleFailure events, which should be mutually exclusive and may not be handled correctly by off-chain infrastructure. There don't seem to be any other side effects, as the _applyShutdown will have no additional effect if it is called twice in the same block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants