Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

lendingPool.updateState is updated incorrectly in the function liquidateBorrower(StabilityPool.sol).

Summary

lendingPool.updateState should be updated before userDebt calculation in the function liquidateBorrower. as lendingPool.updateState is updated after userDebt calculation in the function liquidateBorrower,so userDebt calculation will be incorrect.

Vulnerability Details

lendingPool.updateState should be updated before userDebt calculation in the function liquidateBorrower. as lendingPool.updateState is updated after userDebt calculation in the function liquidateBorrower,so userDebt calculation will be incorrect.

Impact

** userDebt calculation will be incorrect in the liquidateBorrower(StabilityPool.sol).**

Tools Used

manual review

Recommendations

update lendingPool.updateState before userDebt calculation in the function liquidateBorrower.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

StabilityPool: liquidateBorrower should call lendingPool.updateState earlier, to ensure the updated usageIndex is used in calculating the scaledUserDebt

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.