add scaled init asset/liab weight to dashboard

This commit is contained in:
saml33 2023-07-09 19:47:52 +10:00
parent f6b3d2c5e7
commit 5bbba8727c
2 changed files with 10 additions and 4 deletions

View File

@ -500,6 +500,10 @@ const Dashboard: NextPage = () => {
}` }`
} }
/> />
<KeyValuePair
label="Scaled Init Asset/Liab Weight"
value={`${formattedBankValues.scaledInitAssetWeight} / ${formattedBankValues.scaledInitLiabWeight}`}
/>
<KeyValuePair <KeyValuePair
label="Deposit weight scale start quote" label="Deposit weight scale start quote"
value={`$${formattedBankValues.depositWeightScale}`} value={`$${formattedBankValues.depositWeightScale}`}

View File

@ -495,6 +495,8 @@ export const getFormattedBankValues = (group: Group, bank: Bank) => {
maintLiabWeight: bank.maintLiabWeight.toFixed(2), maintLiabWeight: bank.maintLiabWeight.toFixed(2),
initAssetWeight: bank.initAssetWeight.toFixed(2), initAssetWeight: bank.initAssetWeight.toFixed(2),
initLiabWeight: bank.initLiabWeight.toFixed(2), initLiabWeight: bank.initLiabWeight.toFixed(2),
scaledInitAssetWeight: bank.scaledInitAssetWeight(bank.price).toFixed(2),
scaledInitLiabWeight: bank.scaledInitLiabWeight(bank.price).toFixed(2),
depositWeightScale: toUiDecimalsForQuote(bank.depositWeightScaleStartQuote), depositWeightScale: toUiDecimalsForQuote(bank.depositWeightScaleStartQuote),
borrowWeightScale: toUiDecimalsForQuote(bank.borrowWeightScaleStartQuote), borrowWeightScale: toUiDecimalsForQuote(bank.borrowWeightScaleStartQuote),
rate0: (100 * bank.rate0.toNumber()).toFixed(2), rate0: (100 * bank.rate0.toNumber()).toFixed(2),