Open code423n4 opened 2 years ago
WatchPug
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L344-L346
uint totalAccountBorrow = _borrowBalanceConverted(_account, tokenA, tokenA, priceA, priceA) + _borrowBalanceConverted(_account, tokenB, tokenA, priceB, priceA);
Change to:
uint totalAccountBorrow = _debtOf(tokenA, _account) + _borrowBalanceConverted(_account, tokenB, tokenA, priceB, priceA);
Handle
WatchPug
Vulnerability details
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L344-L346
Recommendation
Change to: