use borrow bank apy
This commit is contained in:
parent
bd8cab80dd
commit
7a4a2b09f2
|
@ -13,7 +13,7 @@ const TokenButton = ({
|
|||
handleTokenSelect: (v: string) => void
|
||||
}) => {
|
||||
const leverage = useLeverageMax(tokenName)
|
||||
const { estimatedMaxAPY } = useBankRates(tokenName, leverage)
|
||||
const { borrowBankStakeRate } = useBankRates(tokenName, leverage)
|
||||
|
||||
return (
|
||||
<button
|
||||
|
@ -59,7 +59,7 @@ const TokenButton = ({
|
|||
// />
|
||||
// </SheenLoader>
|
||||
// ) :
|
||||
`${estimatedMaxAPY.toFixed(2)}%`
|
||||
`${borrowBankStakeRate.toFixed(2)}%`
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -32,6 +32,7 @@ export default function useLeverageMax(selectedToken: string) {
|
|||
conversionRate *
|
||||
floorToDecimal(stakeInitAssetWeight.toNumber(), 2).toNumber()
|
||||
const max = floorToDecimal(1 + x.toNumber() / y, 2).toNumber()
|
||||
|
||||
return max
|
||||
}, [stakeBank, borrowBank])
|
||||
|
||||
|
|
Loading…
Reference in New Issue