Skip to content

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

0xbigz
Copy link
Member

@0xbigz 0xbigz commented Apr 3, 2025

No description provided.

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];
Copy link
Member

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

Copy link
Member

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)?;
Copy link
Member

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)] = &[
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants