Skip to content

Commit

Permalink
refactor: add total retained amount to pool info (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
gidonkatten authored Sep 11, 2024
1 parent 51c4420 commit a06cebb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nervous-berries-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@folks-finance/xchain-sdk": patch
---

add total retained amount to pool info
3 changes: 2 additions & 1 deletion src/chains/evm/hub/modules/folks-hub-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function getPoolInfo(
allowFailure: false,
});

const { flashLoanFee, retentionRate } = feeData;
const { flashLoanFee, retentionRate, totalRetainedAmount } = feeData;
const {
optimalUtilisationRatio,
totalAmount: depositTotalAmount,
Expand Down Expand Up @@ -116,6 +116,7 @@ export async function getPoolInfo(
feeData: {
flashLoanFee: [BigInt(flashLoanFee), 6],
retentionRate: [BigInt(retentionRate), 6],
totalRetainedAmount,
},
depositData: {
optimalUtilisationRatio: [BigInt(optimalUtilisationRatio), 4],
Expand Down
1 change: 1 addition & 0 deletions src/chains/evm/hub/types/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { Dnum } from "dnum";
type FeeData = {
flashLoanFee: Dnum;
retentionRate: Dnum;
totalRetainedAmount: bigint;
};

type DepositData = {
Expand Down

0 comments on commit a06cebb

Please sign in to comment.