The calculation of ````totalUSDborrowed```` in ````openLoan()```` is not correct
The `openLoan()` function wrongly use `isoUSDLoaned` to calculate `totalUSDborrowed`. Attacker can exploit it to bypass security check and loan isoUSD with no enough collateral.\\nvulnerability point\\n```\\nfunction openLoan(\\n    // // rest of code\\n    ) external override whenNotPaused \\n    {\\n    //// rest of code\\n    uint256 colInUSD = priceCollateralToUSD(currencyKey, _colAmount\\n                        + collateralPosted[_collateralAddress][msg.sender]);\\n    uint256 totalUSDborrowed = _USDborrowed \\n        +  (isoUSDLoaned[_collateralAddress][msg.sender] * virtualPrice)/LOAN_SCALE;\\n        // @audit should be isoUSDLoanAndInterest[_collateralAddress][msg.sender]\\n    require(totalUSDborrowed >= ONE_HUNDRED_DOLLARS, "Loan Requested too small");\\n    uint256 borrowMargin = (totalUSDborrowed * minOpeningMargin) / LOAN_SCALE;\\n    require(colInUSD >= borrowMargin, "Minimum margin not met!");\\n\\n    // // rest of code\\n}\\n```\\n\\nAttack example: <1>Attacker normally loans and produces 10000 isoUSD interest <2>Attacker repays principle but left interest <3>Attacker open a new 10000 isoUSD loan without providing collateral
See Vulnerability Detail
Attacker can loan isoUSD with no enough collateral.
```\\nfunction openLoan(\\n    // // rest of code\\n    ) external override whenNotPaused \\n    {\\n    //// rest of code\\n    uint256 colInUSD = priceCollateralToUSD(currencyKey, _colAmount\\n                        + collateralPosted[_collateralAddress][msg.sender]);\\n    uint256 totalUSDborrowed = _USDborrowed \\n        +  (isoUSDLoaned[_collateralAddress][msg.sender] * virtualPrice)/LOAN_SCALE;\\n        // @audit should be isoUSDLoanAndInterest[_collateralAddress][msg.sender]\\n    require(totalUSDborrowed >= ONE_HUNDRED_DOLLARS, "Loan Requested too small");\\n    uint256 borrowMargin = (totalUSDborrowed * minOpeningMargin) / LOAN_SCALE;\\n    require(colInUSD >= borrowMargin, "Minimum margin not met!");\\n\\n    // // rest of code\\n}\\n```\\n