isValidRefinance will approve invalid refinances and reject valid refinances due to buggy math
The math in `isValidRefinance()` checks whether the rate increased rather than decreased, resulting in invalid refinances being approved and valid refinances being rejected.\\nWhen trying to buy out a lien from `LienToken.sol:buyoutLien()`, the function calls `AstariaRouter.sol:isValidRefinance()` to check whether the refi terms are valid.\\n```\\nif (!ASTARIA_ROUTER.isValidRefinance(lienData[lienId], ld)) {\\n  revert InvalidRefinance();\\n}\\n```\\n\\nOne of the roles of this function is to check whether the rate decreased by more than 0.5%. From the docs:\\nAn improvement in terms is considered if either of these conditions is met:\\nThe loan interest rate decrease by more than 0.5%.\\nThe loan duration increases by more than 14 days.\\nThe current implementation of the function does the opposite. It calculates a `minNewRate` (which should be maxNewRate) and then checks whether the new rate is greater than that value.\\n```\\nuint256 minNewRate = uint256(lien.rate) - minInterestBPS;\\nreturn (newLien.rate >= minNewRate // rest of code\\n```\\n\\nThe result is that if the new rate has increased (or decreased by less than 0.5%), it will be considered valid, but if it has decreased by more than 0.5% (the ideal behavior) it will be rejected as invalid.
Flip the logic used to check the rate to the following:\\n```\\nuint256 maxNewRate = uint256(lien.rate) - minInterestBPS;\\nreturn (newLien.rate <= maxNewRate// rest of code\\n```\\n
Users can perform invalid refinances with the wrong parameters.\\nUsers who should be able to perform refinances at better rates will not be able to.
```\\nif (!ASTARIA_ROUTER.isValidRefinance(lienData[lienId], ld)) {\\n  revert InvalidRefinance();\\n}\\n```\\n