20,000 USDC
View results
Submission Details
Severity: medium

Check whether the value of `outstandingLoans` has been modified, which could potentially lead to a transaction revert

Summary

Check whether the value of outstandingLoans has been modified, which could potentially lead to a transaction revert

Vulnerability Details

1.user retrieve pool information like outstandingLoans from blockchain storage when modify pool balance.
2.user invoke setPool function use the above pool information.

But between step1 and step2 outstandingLoans may have changed due to actions such as repay.The whole transaction will be revert since:

// you can't change the outstanding loans
if (p.outstandingLoans != pools[poolId].outstandingLoans)
revert PoolConfig();

Impact

whole create new pool or modify pool balance transaction revert because of outstandingLoans been modified by repay or other action.

Tools Used

manual

Recommendations

As outstandingLoans cannot be modified directly, we can set p.outstandingLoans to the current correct data directly.

Support

FAQs

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

Give us feedback!