osmosis-labs / isotonic

Smart Contracts for the Lendex Protocol
MIT License
1 stars 0 forks source link

Piecewise linear interest rate model #72

Closed uint closed 2 years ago

uint commented 2 years ago

Closes #64

According to the board, this should come after #59 and the 0.3.0 release. Happy to refactor the PR and merge then if necessary.

uint commented 2 years ago

I tried to make this work (and stay sane) no matter what input it gets, but we could consider validating that 0 < optimal_utilisation < 1.

optimal_utilisation being 0 or 1 basically turns it into a plain linear function.

uint commented 2 years ago

Rebased