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

Fluid-Lending Updated #1674

Closed
wants to merge 18 commits into from
7 changes: 3 additions & 4 deletions src/adaptors/fluid-lending/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const CONSTANTS = {
arbitrum: 42161,
base: 8453,
},
// SUPPORTED_CHAINS: ['ethereum'],

SUPPORTED_CHAINS: ['ethereum', 'arbitrum', 'base'],
RESOLVERS: {
LENDING: {
Expand Down Expand Up @@ -77,9 +77,7 @@ const getLendingApy = async (chain) => {
chain,
ltv: 0,
apyBase: Number((token.supplyRate / 1e2).toFixed(2)),
apyBaseBorrow: 0,
apyReward: Number((token.rewardsRate / 1e12).toFixed(2)),
apyRewardBorrow: 0,
}))
.filter((i) => utils.keepFinite(i));
} catch (error) {
Expand Down Expand Up @@ -227,7 +225,6 @@ const calculateVaultPoolData = (
ltv: vaultDetails.ltv[index] / 1e4,
}));
};

// Main Function
const apy = async () => {
const [lendingData, vaultData] = await Promise.all([
Expand All @@ -242,3 +239,5 @@ module.exports = {
apy,
url: 'https://fluid.instadapp.io',
};

apy();
Loading