diff --git a/dexs/bifrost-dex.ts b/dexs/bifrost-dex.ts index 65a2c2ec8d..35eb38c819 100644 --- a/dexs/bifrost-dex.ts +++ b/dexs/bifrost-dex.ts @@ -7,7 +7,7 @@ const fetch = async (_: any, _1: any, options: FetchOptions) => { const startTime = new Date(options.startTimestamp * 1000).toISOString().split("T")[0] if (!res) res = fetchURL('https://dapi.bifrost.io/api/dapp/stats/swap') - const v = (await res).volume.find(v => v.date === startTime) + const v = (await res).volume.find((v: any) => v.date === startTime) return { dailyVolume: v.amount }; }; diff --git a/fees/bifrost-chain.ts b/fees/bifrost-chain.ts index 69e57feb92..21b2af7b74 100644 --- a/fees/bifrost-chain.ts +++ b/fees/bifrost-chain.ts @@ -7,7 +7,7 @@ const fetch = async (_: any, _1: any, options: FetchOptions) => { const startTime = new Date(options.startTimestamp * 1000).toISOString().split("T")[0] if (!res) res = fetchURL('https://dapi.bifrost.io/api/dapp/stats/overview') - const v = (await res).find(v => v.date === startTime) + const v = (await res).find((v: any) => v.date === startTime) return { dailyFees: +v.txFee }; }; diff --git a/helpers/curators/index.ts b/helpers/curators/index.ts index 2d4f9e6131..9d4b96d15e 100644 --- a/helpers/curators/index.ts +++ b/helpers/curators/index.ts @@ -146,13 +146,16 @@ async function getVaultERC4626Info(options: FetchOptions, vaults: Array) for (let i = 0; i < vaults.length; i++) { const asset = assets[i] if (asset) { + const assetDecimals = Number(decimals[i]); + const decimalAdjustment = BigInt(10 ** (18 - assetDecimals)); + vaultInfo.push({ vault: vaults[i], asset, assetDecimals: Number(decimals[i]), balance: BigInt(balances[i] ? balances[i] : 0), - rateBefore: BigInt(ratesBefore[i] ? ratesBefore[i] : 0), - rateAfter: BigInt(ratesAfter[i] ? ratesAfter[i] : 0), + rateBefore: BigInt(ratesBefore[i] ? ratesBefore[i] : 0) * decimalAdjustment, + rateAfter: BigInt(ratesAfter[i] ? ratesAfter[i] : 0) * decimalAdjustment, }) } } diff --git a/package-lock.json b/package-lock.json index 206f7d0a89..0de9428df9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@defillama/sdk": "^5.0.179", + "@defillama/sdk": "^5.0.185", "@supercharge/promise-pool": "^3.1.0", "@types/async-retry": "^1.4.8", "async-retry": "^1.3.3", @@ -560,6 +560,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.645.0.tgz", "integrity": "sha512-X9ULtdk3cO+1ysurEkJ1MSnu6U00qodXx+IVual+1jXX4RYY1WmQmfo7uDKf6FFkz7wW1DAqU+GJIBNQr0YH8A==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", @@ -613,6 +614,7 @@ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.645.0.tgz", "integrity": "sha512-6azXYtvtnAsPf2ShN9vKynIYVcJOpo6IoVmoMAVgNaBJyllP+s/RORzranYZzckqfmrudSxtct4rVapjLWuAMg==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", @@ -1146,9 +1148,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.179", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.179.tgz", - "integrity": "sha512-1JipOLDrmzd7+pkTOThD4t9ycocvdF7NJWXVVYfLyRxYiXo6EOYLsGPDAiixa4swlQHf/Yr7PlA+lEaNXClM6Q==", + "version": "5.0.185", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.185.tgz", + "integrity": "sha512-+nW+084WuAqjtV4zxnPdEZRU2GA3cxNPZ891TYUgj9rPbi5pTs7GJaIyWY8YkOwSK5+AA8NBV+AnjAD8BdAaTA==", "license": "ISC", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", @@ -2185,6 +2187,7 @@ "version": "18.19.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.10.tgz", "integrity": "sha512-IZD8kAM02AW1HRDTPOlz3npFava678pr8Ie9Vp8uRhBROXAv8MXT2pCnGZZAKYdromsNQLHQcfWQ6EOatVLtqA==", + "peer": true, "dependencies": { "undici-types": "~5.26.4" } @@ -2918,6 +2921,7 @@ "version": "16.8.1", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", + "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -3060,6 +3064,7 @@ "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@inquirer/external-editor": "^1.0.0", "ansi-escapes": "^4.2.1", @@ -3713,6 +3718,7 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", + "peer": true, "dependencies": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", @@ -4218,6 +4224,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4263,9 +4270,10 @@ "dev": true }, "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "version": "13.15.20", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.20.tgz", + "integrity": "sha512-KxPOq3V2LmfQPP4eqf3Mq/zrT0Dqp2Vmx2Bn285LwVahLc+CsxOM0crBHczm8ijlcjZ0Q5Xd6LW3z3odTPnlrw==", + "license": "MIT", "engines": { "node": ">= 0.10" }