-
Notifications
You must be signed in to change notification settings - Fork 141
program: multi-piecewise-interest-rate-curve #1560
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
base: master
Are you sure you want to change the base?
Conversation
let mut rate = optimal_rate; | ||
let mut prev_util = optimal_util; | ||
|
||
let breakpoints = [850_000, 900_000, 950_000, 990_000, 995_000, 1_000_000]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would make this an array of arrays so you can index the data at same time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe ask chatgpt if there is a way to make it spend less CUs
} | ||
.max(spot_market.get_min_borrow_rate()?.cast()?); | ||
} else { | ||
let total_extra_util = SPOT_UTILIZATION_PRECISION.safe_sub(optimal_util)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesnt look like this is used
let min_rate = spot_market.get_min_borrow_rate()?.cast::<u128>()?; | ||
|
||
let weights_divisor = 1000; | ||
let segments: &[(u128, u128)] = &[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would make this a constant
No description provided.