-
Notifications
You must be signed in to change notification settings - Fork 37
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
copied apy calculation code from solend-lite to sdk (calculation was broken) #70
copied apy calculation code from solend-lite to sdk (calculation was broken) #70
Conversation
Someone is attempting to deploy a commit to the Solend Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for papaya-travesseiro-c75216 canceled.
|
hm so i was looking at the code and i think issue was also that the rates calcs are duplicated in |
Yea I was in a hurry to get things fixed so copy/pasted lol. I updated the code and fixed in a couple other places in the same file as well. There's still a lot more code that's duped and can get cleaned up in that file... |
solend-sdk/src/classes/reserve.ts
Outdated
|
||
return currentUtilization; | ||
} | ||
|
||
private calculateBorrowAPR(reserve: ParsedReserve) { | ||
private calculateBorrowAPR = (reserve: ParsedReserve) => { |
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.
i think this as caclulateUtilizationRatio are also in that other file
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.
sorry, i'd just edit it but i think i can't edit a fork
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.
Removed that method along with the caclulateUtilizationRatio from the reserve.ts file as they're no longer used.
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.
i think possible one might want to grab the utilization ratio but yeh seems fine now ill merge this
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.
actually kinda same with calculateBorrowAPR one probably would want it
copied apy calculation code from solend-lite to sdk (calculation was broken)
the calculated supply apy was way off from what's shown on lite.solend.fi and solend.fi. copied the code over from the lite.solend.fi code to the sdk.