Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: lending market improvements #40

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

EvgeniiZaitsevCW
Copy link
Collaborator

Main changes

  1. A new view function named programCounter() has been introduced to fetch the current lending program counter.
  2. A bug in the auto repayment logic has been fixed.
  3. A redundant check in the the auto repayment logic has been removed.
  4. The outstanding balance math has been made more reliable and lightweight.
  5. New checks when registering credit lines and liquidity pools have been added. The new checks prevent registration of an address that belongs to an inappropriate contract or not to a contract at all. This reduces the likelihood of misconfiguration of the lending market contract.
  6. Unit tests for the lending market contract have been revised, optimized and improved.

Test Coverage

Test coverage details
File % Stmts % Branch % Funcs % Lines
contracts/ 100.00 98.19 100.00 100.00
├─ LendingMarket.sol 100.00 98.17 100.00 100.00
├─ LendingMarketStorage.sol 100.00 100.00 100.00 100.00
├─ LendingMarketUUPS.sol 100.00 100.00 100.00 100.00
contracts/common/ 100.00 100.00 100.00 100.00
├─ AccessControlExtUpgradeable.sol 100.00 100.00 100.00 100.00
contracts/common/interfaces/ 100.00 100.00 100.00 100.00
├─ ICreditLineConfigurable.sol 100.00 100.00 100.00 100.00
├─ ILiquidityPoolAccountable.sol 100.00 100.00 100.00 100.00
contracts/common/interfaces/core/ 100.00 100.00 100.00 100.00
├─ ICreditLine.sol 100.00 100.00 100.00 100.00
├─ ILendingMarket.sol 100.00 100.00 100.00 100.00
├─ ILiquidityPool.sol 100.00 100.00 100.00 100.00
contracts/common/libraries/ 100.00 70.00 100.00 98.86
├─ ABDKMath64x64.sol 100.00 65.91 100.00 98.63
├─ Constants.sol 100.00 100.00 100.00 100.00
├─ Error.sol 100.00 100.00 100.00 100.00
├─ InterestMath.sol 100.00 100.00 100.00 100.00
├─ Loan.sol 100.00 100.00 100.00 100.00
├─ Round.sol 100.00 100.00 100.00 100.00
├─ SafeCast.sol 100.00 100.00 100.00 100.00
contracts/credit-lines/ 100.00 97.37 100.00 100.00
├─ CreditLineConfigurable.sol 100.00 97.32 100.00 100.00
├─ CreditLineConfigurableUUPS.sol 100.00 100.00 100.00 100.00
contracts/liquidity-pools/ 100.00 96.67 100.00 100.00
├─ LiquidityPoolAccountable.sol 100.00 96.55 100.00 100.00
├─ LiquidityPoolAccountableUUPS.sol 100.00 100.00 100.00 100.00
contracts/mocks/ 100.00 100.00 100.00 100.00
├─ AccessControlExtUpgradeableMock.sol 100.00 100.00 100.00 100.00
├─ CreditLineMock.sol 100.00 100.00 100.00 100.00
├─ ERC20Mock.sol 100.00 100.00 100.00 100.00
├─ LendingMarketMock.sol 100.00 100.00 100.00 100.00
├─ LiquidityPoolMock.sol 100.00 100.00 100.00 100.00
contracts/testables/ 100.00 100.00 100.00 100.00
├─ CreditLineConfigurableTestable.sol 100.00 100.00 100.00 100.00
----------------------------------------- ---------- ---------- ---------- ----------
All files 94.33 94.31 100.00 99.85
----------------------------------------- ---------- ---------- ---------- ----------

@EvgeniiZaitsevCW EvgeniiZaitsevCW merged commit cda9787 into main Dec 9, 2024
6 checks passed
@EvgeniiZaitsevCW EvgeniiZaitsevCW deleted the lending-market-improvements branch December 9, 2024 11:32
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants