Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Since we updated interest model the market changed a lot. DDEX's interest rate is obviously higher than other protocols and it's time to adjust the interest model.
Other protocol's interest rate model
Compound and AAVE (click to see their curve) use jump interest rate model, which jump up at a certain interest rate.
DYDX use the formula Y=(0.1 * X) + (0.1 * X^32) + (0.3 * X^64).
We could find two key features:
Our new interest rate
Y = 0.1x + 0.2x^16 + 0.2*x^32
As you can see, basically, our curve follows dydx's curve but becomes sharp earlier than dydx's. That's because our pool size is relatively small and should reserve more space for users' withdraw.
After the adjustment, interest rate on DDEX becomes flatter and more friendly for traders.