-
Notifications
You must be signed in to change notification settings - Fork 5
Interest rate modeling #34
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
Conversation
- Everything is async, so we have to implement some asset locking (`borrow_asset_in_flight`, not yet implemented) - Some updates to requesting current balance: let's just go with making everything a return value. - Will also need to implement borrow record locking.
…sset_usage_ratio `maximum_borrow_asset_usage_ratio`
…ion_ms `maximum_borrow_duration_ms`
Borrow Limits
Liquidation Flow
Staging contract is deployed to |
Staging contract is deployed to |
Staging contract is deployed to |
Staging contract is deployed to |
Staging contract is deployed to |
Staging contract is deployed to |
Introduces
InterestRateStrategy
which provides a few different strategies:Linear
takes two parameters: the minimum interest rate (at 0% usage) and the maximum interest rate (at 100% usage) and linearly interpolates between them.Piecewise
takes four parameters: the base rate, the optimal usage ratio, and two slopes: one for 0%<->optimal%, and the other for optimal%<->100%.Exponential2
takes three parameters, and implements this function:Additionally:
get_last_interest_rate
andget_last_yield_rate
.