From 22efc16a79f867606b374441daa5b149982fb849 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Fri, 24 Jan 2025 09:56:10 -0500 Subject: [PATCH] updated charm fee yield logic --- spot-staking-subgraph/src/charmVault.ts | 2 +- spot-subgraph/scripts/deploy.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/spot-staking-subgraph/src/charmVault.ts b/spot-staking-subgraph/src/charmVault.ts index 1540527b..3a420458 100644 --- a/spot-staking-subgraph/src/charmVault.ts +++ b/spot-staking-subgraph/src/charmVault.ts @@ -148,6 +148,6 @@ export function handleFees(event: CollectFees): void { dailyStat.token0Fees = dailyStat.token0Fees.plus(formatBalance(event.params.feesToVault0, vault.token0Decimals)) dailyStat.token1Fees = dailyStat.token1Fees.plus(formatBalance(event.params.feesToVault1, vault.token1Decimals)) dailyStat.totalFeeVal = dailyStat.token1Fees.times(dailyStat.token1Price).plus(dailyStat.token0Fees.times(dailyStat.token0Price)) - dailyStat.feeYield = dailyStat.totalFeeVal.div(dailyStat.tvl) + dailyStat.feeYield = dailyStat.totalFeeVal.div(dailyStat.tvl.minus(dailyStat.totalFeeVal)) dailyStat.save() } diff --git a/spot-subgraph/scripts/deploy.sh b/spot-subgraph/scripts/deploy.sh index a6bcbc3f..e6c0c3c6 100755 --- a/spot-subgraph/scripts/deploy.sh +++ b/spot-subgraph/scripts/deploy.sh @@ -9,5 +9,4 @@ yarn build yarn graph deploy $2 \ --node https://subgraphs.alchemy.com/api/subgraphs/deploy \ - --deploy-key $GRAPH_AUTH \ - --ipfs https://ipfs.satsuma.xyz \ No newline at end of file + --deploy-key $GRAPH_AUTH \ No newline at end of file