Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Stable rate borrowing #175

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open

Stable rate borrowing #175

wants to merge 24 commits into from

Conversation

Debugger022
Copy link
Collaborator

Description

Resolves #

Checklist

  • I have updated the documentation to account for the changes in the code.
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a test preventing this bug from silently reappearing again.
  • My contribution follows Venus contribution guidelines.

@chechu
Copy link
Member

chechu commented Mar 1, 2023

We have to apply here the suggestions done in VenusProtocol/venus-protocol#210

Debugger022 and others added 18 commits October 3, 2023 12:22
* Added basic functionality for the stable rate.

* Calculate Stable rate formulas.

* Added Ownable functionality in the stable rate model

* WIP: get supply rate method.

* Added stable rate setter in the vToken.

* Updated getSupplyRate and utilizationRate.

* Removed supply rate from interest rate model.

* CHnages after merging main branch.

* Updated tests for the vToken.

* Added tests for the stable rate borrowing.

* Updated the stable rate model.

* Updated the test for the add market.

* Changes in the stable rate borrow tests.

* Lint fix.

* fix : Minor Fix

* FIxed tests after merging main branch.

* Added states for the stableborrowing.

* Calculate stable rate functionality.

* Added borow on stable rate functionality.

* Fixed tests.

* Removed unwanted check.

* Added harness functions and helpers for vTOken.

* Added tests for the stable rate borrows.

* Refactored accrue interest calculations.

* Added tests for the stable accureinterest.

* Fix lint.

* Refactored functionality to get intreset at stable rate.

* Added repay funcitonality for the stable rate.

* Refactored borrow for stable rate.

* Fixed tests.

* Fixed minor issue.

* Tests: Repay-stable rate.

* Added stable rate in the heal borrowing.

* Refactored: get stable borrow amount and update borrow amount for user.

* Update states for stable borrow for user.

* Updated get getAccountSnapshot, borrowBalanceCurrent, borrowBalanceStored.

* Took care of stable borrows.

* Added funcionality to swap borrow rate.

* Added event.

* Tests: swap borrow rate mode.

* Fixed tests.

* Fixed PR comments.

* Fixed PR comments.

* Fixed naming conventions.

* Created seperate borrow and repay methods for stable rate borrowing.

* Changed StableRate file name to stableRateModel.

* Added method to get stable borrow rate per block.

* Fix: Stable rate formulas (1/2).

* Refactored other contracts and tests for stable rate (2/2).

* Added event and fixed PR comments.

* Added tests fot the interest accrual at stable rate.

* Fix: minor issue.

* Fix: PR comments.
@Debugger022 Debugger022 force-pushed the feature/stable-borrowing branch from 781e097 to 6e73662 Compare October 3, 2023 18:36
@Debugger022 Debugger022 changed the base branch from main to develop October 3, 2023 18:57
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
contracts 95% 77%
contracts.InterestRate 100% 88%
contracts.Lens 95% 65%
contracts.Pool 100% 92%
contracts.Rewards 95% 62%
contracts.RiskFund 99% 71%
contracts.Shortfall 100% 85%
contracts.lib 100% 89%
Summary 96% (1617 / 1680) 76% (491 / 648)

@chechu chechu added this to the 007 milestone Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants