This commit is contained in:
Adrian Brzeziński 2023-10-01 16:57:32 +02:00
parent a0fc49b9de
commit ff087e79dc
1 changed files with 13 additions and 0 deletions

View File

@ -258,3 +258,16 @@ export const coinTiersToNames: {
SHIT: "Shit Coin",
UNTRUSTED: "Untrusted",
};
export const getTierWithAdjustedNetBorrows = (
tier: ListingPreset,
currentTotalDepositsInUsdc: number,
): ListingPreset => {
const newNetBorrowLimitPerWindowQuote =
Math.round(currentTotalDepositsInUsdc / 1_000_000_000) * 1_000_000_000;
return {
...tier,
netBorrowLimitPerWindowQuote: newNetBorrowLimitPerWindowQuote,
};
};