Closed github-actions[bot] closed 1 year ago
@clems4ev3r this is not a valid concern. Carapace protocol has its own criteria for default which is managed/assessed in DefaultStateManager
and it doesn't rely on supported lending protocol, at least for now.
See: https://github.com/sherlock-audit/2023-02-carapace/blob/main/contracts/core/DefaultStateManager.sol#L359
@vnadoda, agreed Carapace can have different parameters than individual lending protocols
Closing based on the above comments
joestakey
medium
assessState()
does not check when a pool is inDefaulted
stateSummary
assessState()
will returnLate
for aDefaulted
poolVulnerability Detail
As per the docs:
But looking at
_getLendingPoolStatus()
, it actually does not handle theDefaulted
case, returningLate
insteadImpact
assessState()
is here a view function, but returning that a pool isLate
while it is defaulted may lead to issues with composability with external contracts querying this function to assess whether to perform certain actions or not.Code Snippet
https://github.com/sherlock-audit/2023-02-carapace/blob/main/contracts/core/pool/ReferenceLendingPools.sol#L322-L348
Tool used
Manual Review
Recommendation
The function should handle the
Defaulted
state too.