Skip to content
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

Add Folks Finance yield #746

Merged
merged 18 commits into from
May 8, 2023
Prev Previous commit
Refactor func to calculate ratio percentage
  • Loading branch information
pf55351 committed May 8, 2023
commit 6ff93680eb0ddea1bd70be7ca2744d8c96b70012
2 changes: 1 addition & 1 deletion src/adaptors/folks-finance-lending/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const poolsFunction = async () => {
const tvlUsd = Number((depositsUsd - borrowsUsd).toFixed(2));
const apyBase = interestRateToPercentage(depositInterestYield);
const apyBaseBorrow = interestRateToPercentage(variableBorrowInterestYield);
const ltv = ratioToPercentage(poolsLoanInfo[pool.appId].collateralFactor)/100;
const ltv = ratioToPercentage(poolsLoanInfo[pool.appId].collateralFactor);

let dataSource = {
pool: `${pool.appId}-algorand`,
Expand Down
2 changes: 1 addition & 1 deletion src/adaptors/folks-finance-lending/v2/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function interestRateToPercentage(interestRate, decimals = 2) {
}

function ratioToPercentage(ratio) {
const percentage = Number(ratio) / Number(ONE_2_DP);
const percentage = Number(ratio) / Number(ONE_4_DP);
return Number(percentage.toFixed(2));
}

Expand Down