modifyCollateralAndDebt()
doesn't work as intended when the vault is paused since debts can still be increased
#32
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
🤖_primary
AI based primary recommendation
🤖_16_group
AI based duplicate group recommendation
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-10-loopfi/blob/d219f0132005b00a68f505edc22b34f9a8b49766/src/CDPVault.sol#L422-L533
Vulnerability details
Proof of Concept
Take a look at https://github.com/code-423n4/2024-10-loopfi/blob/d219f0132005b00a68f505edc22b34f9a8b49766/src/CDPVault.sol#L422-L533
This function is used to modify a Position's collateral and debt balances, it checks that the global debt ceiling and the vault's debt ceiling have not been exceeded via the CDM, etc.
Now one of the new changes in scope as hinted by the
@audit
tag is that in the case where the vault is paused only debt decreases should be accepted, however this is not enforced, considering a call is made to_requireNotPaused()
that lacks any implementation across scope whatsoever, thereby allowing for debt to be increased even if the vault is paused.Impact
Modifying the position is broken, considering even if the revert that's supposed to occur here during an increase of debt whenever protocol is paused would not, since
_requireNotPaused()
lacks any implementation whatsoever.Recommended Mitigation Steps
Implement the
_requireNotPaused()
functionality and correctly check that the protocol is indeed not paused in the case where an attempt is made to increase the debt.Assessed type
Context
The text was updated successfully, but these errors were encountered: