The abstract contract VaultImplementation is inherited by Vault.sol and PublicVault.sol. Its shutdown() can be called by the strategist to make _loadVISlot().isShutdown = true. This will make the modifier whenNotPaused() revert, rendering commitToLien() and buyoutLien() unable to execute forever because no where in the contract can be found a function to undo the shutdown.
Proof of Concept
The second if block of the following modifier is dependent on _loadVISlot().isShutdown:
It is recommended implementing unShutdown() in the contract with opposite logic to shutdown() so that the strategist gets the option to reverse whenNotPaused.
Lines of code
https://github.com/code-423n4/2023-01-astaria/blob/main/src/VaultImplementation.sol#L146-L150
Vulnerability details
Impact
The abstract contract VaultImplementation is inherited by Vault.sol and PublicVault.sol. Its
shutdown()
can be called by the strategist to make_loadVISlot().isShutdown = true
. This will make the modifierwhenNotPaused()
revert, renderingcommitToLien()
andbuyoutLien()
unable to execute forever because no where in the contract can be found a function to undo the shutdown.Proof of Concept
The second if block of the following modifier is dependent on
_loadVISlot().isShutdown
:VaultImplementation.sol#L131-L140
The above modifier is going to revert with the following function invoked:
VaultImplementation.sol#L146-L150
Consequently, the following two functions whose visibility includes
whenNotPaused
will be non-callable:VaultImplementation.sol#L287-L306
VaultImplementation.sol#L313-L330
Recommended Mitigation Steps
It is recommended implementing
unShutdown()
in the contract with opposite logic toshutdown()
so that the strategist gets the option to reversewhenNotPaused
.