add/update copy
This commit is contained in:
commit
e6e86bcf96
|
@ -3,6 +3,8 @@ import Modal from '../shared/Modal'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { PerpMarket } from '@blockworks-foundation/mango-v4'
|
import { PerpMarket } from '@blockworks-foundation/mango-v4'
|
||||||
import Button from '@components/shared/Button'
|
import Button from '@components/shared/Button'
|
||||||
|
import useOracleProvider from 'hooks/useOracleProvider'
|
||||||
|
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid'
|
||||||
// import Tooltip from '@components/shared/Tooltip'
|
// import Tooltip from '@components/shared/Tooltip'
|
||||||
|
|
||||||
interface PerpMarketDetailsModalProps {
|
interface PerpMarketDetailsModalProps {
|
||||||
|
@ -17,6 +19,9 @@ const PerpMarketDetailsModal = ({
|
||||||
market,
|
market,
|
||||||
}: ModalCombinedProps) => {
|
}: ModalCombinedProps) => {
|
||||||
const { t } = useTranslation(['common', 'trade'])
|
const { t } = useTranslation(['common', 'trade'])
|
||||||
|
const { oracleProvider, oracleLinkPath } = useOracleProvider()
|
||||||
|
|
||||||
|
console.log(oracleProvider, oracleLinkPath)
|
||||||
|
|
||||||
return market ? (
|
return market ? (
|
||||||
<Modal isOpen={isOpen} onClose={onClose}>
|
<Modal isOpen={isOpen} onClose={onClose}>
|
||||||
|
@ -62,6 +67,22 @@ const PerpMarketDetailsModal = ({
|
||||||
{(100 * market.maxFunding.toNumber()).toFixed(2)}%
|
{(100 * market.maxFunding.toNumber()).toFixed(2)}%
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<p>{t('trade:oracle')}</p>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5">{oracleProvider}</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-th-fgd-2">{oracleProvider}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{/* Uncomment when insurance fund is ready */}
|
{/* Uncomment when insurance fund is ready */}
|
||||||
{/* <div className="flex justify-between">
|
{/* <div className="flex justify-between">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
|
|
@ -4,6 +4,8 @@ import { useTranslation } from 'next-i18next'
|
||||||
import useSelectedMarket from 'hooks/useSelectedMarket'
|
import useSelectedMarket from 'hooks/useSelectedMarket'
|
||||||
import { Serum3Market } from '@blockworks-foundation/mango-v4'
|
import { Serum3Market } from '@blockworks-foundation/mango-v4'
|
||||||
import Button from '@components/shared/Button'
|
import Button from '@components/shared/Button'
|
||||||
|
import useOracleProvider from 'hooks/useOracleProvider'
|
||||||
|
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid'
|
||||||
// import useMangoGroup from 'hooks/useMangoGroup'
|
// import useMangoGroup from 'hooks/useMangoGroup'
|
||||||
// import { useMemo } from 'react'
|
// import { useMemo } from 'react'
|
||||||
// import Tooltip from '@components/shared/Tooltip'
|
// import Tooltip from '@components/shared/Tooltip'
|
||||||
|
@ -23,6 +25,7 @@ const SpotMarketDetailsModal = ({
|
||||||
}: ModalCombinedProps) => {
|
}: ModalCombinedProps) => {
|
||||||
const { t } = useTranslation(['common', 'trade'])
|
const { t } = useTranslation(['common', 'trade'])
|
||||||
const { serumOrPerpMarket } = useSelectedMarket()
|
const { serumOrPerpMarket } = useSelectedMarket()
|
||||||
|
const { oracleProvider, oracleLinkPath } = useOracleProvider()
|
||||||
// const { group } = useMangoGroup()
|
// const { group } = useMangoGroup()
|
||||||
|
|
||||||
// const [baseBank, quoteBank] = useMemo(() => {
|
// const [baseBank, quoteBank] = useMemo(() => {
|
||||||
|
@ -61,6 +64,22 @@ const SpotMarketDetailsModal = ({
|
||||||
<p>{t('trade:max-leverage')}</p>
|
<p>{t('trade:max-leverage')}</p>
|
||||||
<p className="font-mono text-th-fgd-2">5x</p>
|
<p className="font-mono text-th-fgd-2">5x</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<p>{t('trade:oracle')}</p>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5">{oracleProvider}</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-th-fgd-2">{oracleProvider}</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{/* {baseMintInfo ? (
|
{/* {baseMintInfo ? (
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
Area,
|
Area,
|
||||||
XAxis,
|
XAxis,
|
||||||
YAxis,
|
YAxis,
|
||||||
Tooltip,
|
Tooltip as RechartsTooltip,
|
||||||
ResponsiveContainer,
|
ResponsiveContainer,
|
||||||
ReferenceLine,
|
ReferenceLine,
|
||||||
} from 'recharts'
|
} from 'recharts'
|
||||||
|
@ -29,6 +29,7 @@ import { AxisDomain } from 'recharts/types/util/types'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import FormatNumericValue from './FormatNumericValue'
|
import FormatNumericValue from './FormatNumericValue'
|
||||||
import { ContentType } from 'recharts/types/component/Tooltip'
|
import { ContentType } from 'recharts/types/component/Tooltip'
|
||||||
|
import Tooltip from './Tooltip'
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
dayjs.extend(relativeTime)
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ interface DetailedAreaChartProps {
|
||||||
suffix?: string
|
suffix?: string
|
||||||
tickFormat?: (x: number) => string
|
tickFormat?: (x: number) => string
|
||||||
title?: string
|
title?: string
|
||||||
|
tooltipContent?: string
|
||||||
xKey: string
|
xKey: string
|
||||||
yDecimals?: number
|
yDecimals?: number
|
||||||
yKey: string
|
yKey: string
|
||||||
|
@ -78,6 +80,7 @@ const DetailedAreaChart: FunctionComponent<DetailedAreaChartProps> = ({
|
||||||
suffix = '',
|
suffix = '',
|
||||||
tickFormat,
|
tickFormat,
|
||||||
title,
|
title,
|
||||||
|
tooltipContent,
|
||||||
xKey,
|
xKey,
|
||||||
yDecimals,
|
yDecimals,
|
||||||
yKey,
|
yKey,
|
||||||
|
@ -135,6 +138,8 @@ const DetailedAreaChart: FunctionComponent<DetailedAreaChartProps> = ({
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const titleClasses = `${small ? 'text-sm' : 'mb-0.5 text-base'} text-th-fgd-3`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FadeInFadeOut show={true}>
|
<FadeInFadeOut show={true}>
|
||||||
<ContentBox hideBorder hidePadding>
|
<ContentBox hideBorder hidePadding>
|
||||||
|
@ -160,13 +165,18 @@ const DetailedAreaChart: FunctionComponent<DetailedAreaChartProps> = ({
|
||||||
</IconButton>
|
</IconButton>
|
||||||
) : null}
|
) : null}
|
||||||
<div>
|
<div>
|
||||||
<p
|
{tooltipContent ? (
|
||||||
className={`${
|
<Tooltip content={tooltipContent}>
|
||||||
small ? 'text-sm' : 'mb-0.5 text-base'
|
<p
|
||||||
} text-th-fgd-3`}
|
className={`${titleClasses}
|
||||||
>
|
tooltip-underline`}
|
||||||
{title}
|
>
|
||||||
</p>
|
{title}
|
||||||
|
</p>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
<p className={titleClasses}>{title}</p>
|
||||||
|
)}
|
||||||
{mouseData ? (
|
{mouseData ? (
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
|
@ -301,7 +311,7 @@ const DetailedAreaChart: FunctionComponent<DetailedAreaChartProps> = ({
|
||||||
onMouseMove={handleMouseMove}
|
onMouseMove={handleMouseMove}
|
||||||
onMouseLeave={handleMouseLeave}
|
onMouseLeave={handleMouseLeave}
|
||||||
>
|
>
|
||||||
<Tooltip
|
<RechartsTooltip
|
||||||
cursor={{
|
cursor={{
|
||||||
strokeOpacity: 0.09,
|
strokeOpacity: 0.09,
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -5,9 +5,13 @@ import { breakpoints } from '../../utils/theme'
|
||||||
import ContentBox from '../shared/ContentBox'
|
import ContentBox from '../shared/ContentBox'
|
||||||
import MarketLogos from '@components/trade/MarketLogos'
|
import MarketLogos from '@components/trade/MarketLogos'
|
||||||
import { Table, Td, Th, TrBody, TrHead } from '@components/shared/TableElements'
|
import { Table, Td, Th, TrBody, TrHead } from '@components/shared/TableElements'
|
||||||
import { ChevronDownIcon } from '@heroicons/react/20/solid'
|
import {
|
||||||
|
ArrowTopRightOnSquareIcon,
|
||||||
|
ChevronDownIcon,
|
||||||
|
} from '@heroicons/react/20/solid'
|
||||||
// import Tooltip from '@components/shared/Tooltip'
|
// import Tooltip from '@components/shared/Tooltip'
|
||||||
import { Disclosure, Transition } from '@headlessui/react'
|
import { Disclosure, Transition } from '@headlessui/react'
|
||||||
|
import { getOracleProvider } from 'hooks/useOracleProvider'
|
||||||
|
|
||||||
const PerpMarketSettingsTable = () => {
|
const PerpMarketSettingsTable = () => {
|
||||||
const { t } = useTranslation(['common', 'trade'])
|
const { t } = useTranslation(['common', 'trade'])
|
||||||
|
@ -28,6 +32,7 @@ const PerpMarketSettingsTable = () => {
|
||||||
<Th className="text-right">{t('trade:max-leverage')}</Th>
|
<Th className="text-right">{t('trade:max-leverage')}</Th>
|
||||||
<Th className="text-right">{t('fees')}</Th>
|
<Th className="text-right">{t('fees')}</Th>
|
||||||
<Th className="text-right">{t('trade:funding-limits')}</Th>
|
<Th className="text-right">{t('trade:funding-limits')}</Th>
|
||||||
|
<Th className="text-right">{t('trade:oracle')}</Th>
|
||||||
{/* Uncomment when insurance fund is ready */}
|
{/* Uncomment when insurance fund is ready */}
|
||||||
{/* <Th className="text-right">
|
{/* <Th className="text-right">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -56,6 +61,8 @@ const PerpMarketSettingsTable = () => {
|
||||||
publicKey,
|
publicKey,
|
||||||
} = market
|
} = market
|
||||||
|
|
||||||
|
const [oracleProvider, oracleLinkPath] = getOracleProvider(market)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TrBody key={publicKey.toString()}>
|
<TrBody key={publicKey.toString()}>
|
||||||
<Td>
|
<Td>
|
||||||
|
@ -100,6 +107,23 @@ const PerpMarketSettingsTable = () => {
|
||||||
{(100 * maxFunding.toNumber()).toFixed(2)}%
|
{(100 * maxFunding.toNumber()).toFixed(2)}%
|
||||||
</p>
|
</p>
|
||||||
</Td>
|
</Td>
|
||||||
|
<Td>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center justify-end"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5 font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-right font-body">{oracleProvider}</p>
|
||||||
|
)}
|
||||||
|
</Td>
|
||||||
{/* <Td>
|
{/* <Td>
|
||||||
<p className="text-right">
|
<p className="text-right">
|
||||||
{groupInsuranceFund ? t('yes') : t('no')}
|
{groupInsuranceFund ? t('yes') : t('no')}
|
||||||
|
@ -112,7 +136,7 @@ const PerpMarketSettingsTable = () => {
|
||||||
</Table>
|
</Table>
|
||||||
) : (
|
) : (
|
||||||
<div className="border-b border-th-bkg-3">
|
<div className="border-b border-th-bkg-3">
|
||||||
{perpMarkets.map((market) => {
|
{perpMarkets.map((market, i) => {
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
minOrderSize,
|
minOrderSize,
|
||||||
|
@ -126,12 +150,15 @@ const PerpMarketSettingsTable = () => {
|
||||||
maxFunding,
|
maxFunding,
|
||||||
publicKey,
|
publicKey,
|
||||||
} = market
|
} = market
|
||||||
|
const [oracleProvider, oracleLinkPath] = getOracleProvider(market)
|
||||||
return (
|
return (
|
||||||
<Disclosure key={publicKey.toString()}>
|
<Disclosure key={publicKey.toString()}>
|
||||||
{({ open }) => (
|
{({ open }) => (
|
||||||
<>
|
<>
|
||||||
<Disclosure.Button
|
<Disclosure.Button
|
||||||
className={`w-full border-t border-th-bkg-3 p-4 text-left focus:outline-none`}
|
className={`w-full border-t border-th-bkg-3 p-4 text-left focus:outline-none ${
|
||||||
|
i === 0 ? 'border-t-0' : ''
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
|
@ -220,6 +247,26 @@ const PerpMarketSettingsTable = () => {
|
||||||
{(100 * maxFunding.toNumber()).toFixed(2)}%
|
{(100 * maxFunding.toNumber()).toFixed(2)}%
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="col-span-1">
|
||||||
|
<p className="text-xs">{t('trade:oracle')}</p>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5 font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-right font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{/* <div className="col-span-1">
|
{/* <div className="col-span-1">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={t('trade:tooltip-insured', {
|
content={t('trade:tooltip-insured', {
|
||||||
|
|
|
@ -34,22 +34,26 @@ const StatsPage = () => {
|
||||||
const tabsWithCount: [string, number][] = useMemo(() => {
|
const tabsWithCount: [string, number][] = useMemo(() => {
|
||||||
return TABS.map((t) => [t, 0])
|
return TABS.map((t) => [t, 0])
|
||||||
}, [])
|
}, [])
|
||||||
return market ? (
|
return (
|
||||||
<PerpStatsPage />
|
|
||||||
) : token ? (
|
|
||||||
<TokenPage />
|
|
||||||
) : (
|
|
||||||
<div className="pb-20 md:pb-16">
|
<div className="pb-20 md:pb-16">
|
||||||
<div className="border-b border-th-bkg-3">
|
{market ? (
|
||||||
<TabButtons
|
<PerpStatsPage />
|
||||||
activeValue={activeTab}
|
) : token ? (
|
||||||
fillWidth={fullWidthTabs}
|
<TokenPage />
|
||||||
onChange={(v) => setActiveTab(v)}
|
) : (
|
||||||
showBorders
|
<>
|
||||||
values={tabsWithCount}
|
<div className="border-b border-th-bkg-3">
|
||||||
/>
|
<TabButtons
|
||||||
</div>
|
activeValue={activeTab}
|
||||||
<TabContent activeTab={activeTab} />
|
fillWidth={fullWidthTabs}
|
||||||
|
onChange={(v) => setActiveTab(v)}
|
||||||
|
showBorders
|
||||||
|
values={tabsWithCount}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<TabContent activeTab={activeTab} />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Disclosure, Transition } from '@headlessui/react'
|
import { Disclosure, Transition } from '@headlessui/react'
|
||||||
import {
|
import {
|
||||||
|
ArrowTopRightOnSquareIcon,
|
||||||
ChevronDownIcon,
|
ChevronDownIcon,
|
||||||
QuestionMarkCircleIcon,
|
QuestionMarkCircleIcon,
|
||||||
} from '@heroicons/react/20/solid'
|
} from '@heroicons/react/20/solid'
|
||||||
|
@ -14,9 +15,10 @@ import useJupiterMints from 'hooks/useJupiterMints'
|
||||||
import { Table, Td, Th, TrBody, TrHead } from '@components/shared/TableElements'
|
import { Table, Td, Th, TrBody, TrHead } from '@components/shared/TableElements'
|
||||||
import useMangoGroup from 'hooks/useMangoGroup'
|
import useMangoGroup from 'hooks/useMangoGroup'
|
||||||
import useBanksWithBalances from 'hooks/useBanksWithBalances'
|
import useBanksWithBalances from 'hooks/useBanksWithBalances'
|
||||||
|
import { getOracleProvider } from 'hooks/useOracleProvider'
|
||||||
|
|
||||||
const TokenSettingsTable = () => {
|
const TokenSettingsTable = () => {
|
||||||
const { t } = useTranslation(['common', 'activity', 'token'])
|
const { t } = useTranslation(['common', 'activity', 'token', 'trade'])
|
||||||
const { group } = useMangoGroup()
|
const { group } = useMangoGroup()
|
||||||
const { mangoTokens } = useJupiterMints()
|
const { mangoTokens } = useJupiterMints()
|
||||||
const { width } = useViewport()
|
const { width } = useViewport()
|
||||||
|
@ -42,6 +44,7 @@ const TokenSettingsTable = () => {
|
||||||
</Th>
|
</Th>
|
||||||
<Th className="text-right">{t('borrow-fee')}</Th>
|
<Th className="text-right">{t('borrow-fee')}</Th>
|
||||||
<Th className="text-right">{t('activity:liquidation-fee')}</Th>
|
<Th className="text-right">{t('activity:liquidation-fee')}</Th>
|
||||||
|
<Th className="text-right">{t('trade:oracle')}</Th>
|
||||||
{/* Uncomment when insurance fund is ready */}
|
{/* Uncomment when insurance fund is ready */}
|
||||||
{/* <Th className="text-right">
|
{/* <Th className="text-right">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -65,6 +68,8 @@ const TokenSettingsTable = () => {
|
||||||
)?.logoURI
|
)?.logoURI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [oracleProvider, oracleLinkPath] = getOracleProvider(bank)
|
||||||
|
|
||||||
// const mintInfo = group.mintInfosMapByMint.get(
|
// const mintInfo = group.mintInfosMapByMint.get(
|
||||||
// bank.mint.toString()
|
// bank.mint.toString()
|
||||||
// )
|
// )
|
||||||
|
@ -108,6 +113,23 @@ const TokenSettingsTable = () => {
|
||||||
{(bank.liquidationFee.toNumber() * 100).toFixed(2)}%
|
{(bank.liquidationFee.toNumber() * 100).toFixed(2)}%
|
||||||
</p>
|
</p>
|
||||||
</Td>
|
</Td>
|
||||||
|
<Td>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center justify-end"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5 font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-right font-body">{oracleProvider}</p>
|
||||||
|
)}
|
||||||
|
</Td>
|
||||||
{/* <Td>
|
{/* <Td>
|
||||||
<p className="text-right">
|
<p className="text-right">
|
||||||
{mintInfo?.groupInsuranceFund ? t('yes') : t('no')}
|
{mintInfo?.groupInsuranceFund ? t('yes') : t('no')}
|
||||||
|
@ -129,6 +151,7 @@ const TokenSettingsTable = () => {
|
||||||
(t) => t.address === bank.mint.toString()
|
(t) => t.address === bank.mint.toString()
|
||||||
)?.logoURI
|
)?.logoURI
|
||||||
}
|
}
|
||||||
|
const [oracleProvider, oracleLinkPath] = getOracleProvider(bank)
|
||||||
// const mintInfo = group.mintInfosMapByMint.get(
|
// const mintInfo = group.mintInfosMapByMint.get(
|
||||||
// bank.mint.toString()
|
// bank.mint.toString()
|
||||||
// )
|
// )
|
||||||
|
@ -207,6 +230,26 @@ const TokenSettingsTable = () => {
|
||||||
%
|
%
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="col-span-1">
|
||||||
|
<p className="text-xs">{t('trade:oracle')}</p>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
className="flex items-center"
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<span className="mr-1.5 font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<p className="text-right font-body">
|
||||||
|
{oracleProvider}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Disclosure.Panel>
|
</Disclosure.Panel>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
|
|
@ -154,6 +154,7 @@ const TokenStatsCharts = () => {
|
||||||
prefix="$"
|
prefix="$"
|
||||||
tickFormat={(x) => `$${formatYAxis(x)}`}
|
tickFormat={(x) => `$${formatYAxis(x)}`}
|
||||||
title={t('token:token-fees-collected')}
|
title={t('token:token-fees-collected')}
|
||||||
|
tooltipContent={t('token:tooltip-token-fees-collected')}
|
||||||
xKey="date"
|
xKey="date"
|
||||||
yKey={'feesCollected'}
|
yKey={'feesCollected'}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -165,7 +165,7 @@ const CoingeckoStats = ({
|
||||||
<div className="col-span-1 border-y border-th-bkg-3 px-6 py-4 md:col-span-2">
|
<div className="col-span-1 border-y border-th-bkg-3 px-6 py-4 md:col-span-2">
|
||||||
<h2 className="text-base">{bank.name} Stats</h2>
|
<h2 className="text-base">{bank.name} Stats</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-1 border-r border-th-bkg-3 px-6 py-4">
|
<div className="col-span-1 px-6 py-4 md:border-r md:border-th-bkg-3">
|
||||||
<div className="flex justify-between pb-4">
|
<div className="flex justify-between pb-4">
|
||||||
<p>{t('token:market-cap')}</p>
|
<p>{t('token:market-cap')}</p>
|
||||||
<p className="font-mono text-th-fgd-2">
|
<p className="font-mono text-th-fgd-2">
|
||||||
|
|
|
@ -1,42 +1,29 @@
|
||||||
import {
|
import {
|
||||||
Bank,
|
Bank,
|
||||||
I80F48,
|
I80F48,
|
||||||
OracleProvider,
|
|
||||||
toUiDecimals,
|
toUiDecimals,
|
||||||
toUiDecimalsForQuote,
|
toUiDecimalsForQuote,
|
||||||
} from '@blockworks-foundation/mango-v4'
|
} from '@blockworks-foundation/mango-v4'
|
||||||
import Tooltip from '@components/shared/Tooltip'
|
import Tooltip from '@components/shared/Tooltip'
|
||||||
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid'
|
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid'
|
||||||
|
import { BN } from '@project-serum/anchor'
|
||||||
|
import { getOracleProvider } from 'hooks/useOracleProvider'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
import { formatCurrencyValue, formatNumericValue } from 'utils/numbers'
|
import { formatCurrencyValue } from 'utils/numbers'
|
||||||
|
|
||||||
const TokenParams = ({ bank }: { bank: Bank }) => {
|
const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
const { t } = useTranslation(['common', 'activity', 'token'])
|
const { t } = useTranslation(['common', 'activity', 'token'])
|
||||||
|
|
||||||
const [oracleProvider, oracleLinkPath] = useMemo(() => {
|
const [oracleProvider, oracleLinkPath] = useMemo(() => {
|
||||||
switch (bank.oracleProvider) {
|
if (!bank) return ['Unavaliable', '']
|
||||||
case OracleProvider.Pyth:
|
return getOracleProvider(bank)
|
||||||
return [
|
|
||||||
'Pyth',
|
|
||||||
`https://pyth.network/price-feeds/crypto-${bank.name.toLowerCase()}-usd`,
|
|
||||||
]
|
|
||||||
case OracleProvider.Switchboard:
|
|
||||||
return [
|
|
||||||
'Switchboard',
|
|
||||||
`https://switchboard.xyz/explorer/3/${bank.oracle.toString()}`,
|
|
||||||
]
|
|
||||||
case OracleProvider.Stub:
|
|
||||||
return ['Stub', '']
|
|
||||||
default:
|
|
||||||
return ['Unknown', '']
|
|
||||||
}
|
|
||||||
}, [bank])
|
}, [bank])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid grid-cols-1 border-b border-th-bkg-3 md:grid-cols-2">
|
<div className="grid grid-cols-1 border-b border-th-bkg-3 md:grid-cols-2">
|
||||||
<div className="col-span-1 border-b border-th-bkg-3 px-6 py-4 md:col-span-2">
|
<div className="col-span-1 border-b border-th-bkg-3 px-6 py-4 md:col-span-2">
|
||||||
<h2 className="text-base">{bank.name} Paramaters</h2>
|
<h2 className="text-base">{`${bank.name} ${t('token:parameters')}`}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-1 px-6 py-4 md:border-r md:border-th-bkg-3">
|
<div className="col-span-1 px-6 py-4 md:border-r md:border-th-bkg-3">
|
||||||
<div className="flex justify-between pb-4">
|
<div className="flex justify-between pb-4">
|
||||||
|
@ -76,8 +63,8 @@ const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between border-t border-th-bkg-3 py-4">
|
<div className="flex justify-between border-t border-th-bkg-3 py-4">
|
||||||
<Tooltip content={t('token:tooltip-borrow-upkeep-fee')}>
|
<Tooltip content={t('token:tooltip-borrow-upkeep-rate')}>
|
||||||
<p className="tooltip-underline">{t('token:borrow-upkeep-fee')}</p>
|
<p className="tooltip-underline">{t('token:borrow-upkeep-rate')}</p>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<p className="font-mono text-th-fgd-2">
|
<p className="font-mono text-th-fgd-2">
|
||||||
{(100 * bank.loanFeeRate.toNumber()).toFixed(2)}%
|
{(100 * bank.loanFeeRate.toNumber()).toFixed(2)}%
|
||||||
|
@ -116,14 +103,25 @@ const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-1 px-6 pb-4 md:pt-4">
|
<div className="col-span-1 px-6 pb-4 md:pt-4">
|
||||||
<div className="flex justify-between pb-4">
|
<div className="flex justify-between pb-4">
|
||||||
|
<Tooltip content={t('token:tooltip-net-borrow-period')}>
|
||||||
|
<p className="tooltip-underline">{t('token:net-borrow-period')}</p>
|
||||||
|
</Tooltip>
|
||||||
|
<p className="font-mono text-th-fgd-2">
|
||||||
|
{bank.netBorrowLimitWindowSizeTs.div(new BN(3600)).toNumber()}hrs
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="flex justify-between border-t border-th-bkg-3 py-4">
|
||||||
<Tooltip content={t('token:tooltip-net-borrows-in-period')}>
|
<Tooltip content={t('token:tooltip-net-borrows-in-period')}>
|
||||||
<p className="tooltip-underline">
|
<p className="tooltip-underline">
|
||||||
{t('token:net-borrows-in-period')}
|
{t('token:net-borrows-in-period')}
|
||||||
</p>
|
</p>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<p className="font-mono text-th-fgd-2">
|
<p className="font-mono text-th-fgd-2">
|
||||||
{formatNumericValue(
|
{formatCurrencyValue(
|
||||||
toUiDecimalsForQuote(I80F48.fromI64(bank.netBorrowsInWindow))
|
toUiDecimalsForQuote(
|
||||||
|
I80F48.fromI64(bank.netBorrowsInWindow).toNumber() *
|
||||||
|
bank.uiPrice
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -134,7 +132,7 @@ const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
</p>
|
</p>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<p className="font-mono text-th-fgd-2">
|
<p className="font-mono text-th-fgd-2">
|
||||||
{formatNumericValue(
|
{formatCurrencyValue(
|
||||||
toUiDecimals(bank.netBorrowLimitPerWindowQuote, 6)
|
toUiDecimals(bank.netBorrowLimitPerWindowQuote, 6)
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
@ -147,7 +145,7 @@ const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<p className="mr-1.5 text-th-fgd-2">{oracleProvider}</p>
|
<span className="mr-1.5">{oracleProvider}</span>
|
||||||
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -172,14 +170,6 @@ const TokenParams = ({ bank }: { bank: Bank }) => {
|
||||||
<span className="font-body text-th-fgd-4">Slots</span>
|
<span className="font-body text-th-fgd-4">Slots</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between border-t border-th-bkg-3 py-4">
|
|
||||||
<Tooltip content={t('token:tooltip-insurance-rate-curve')}>
|
|
||||||
<p className="tooltip-underline">
|
|
||||||
{t('token:insurance-rate-curve')}
|
|
||||||
</p>
|
|
||||||
</Tooltip>
|
|
||||||
<p className="font-mono text-th-fgd-2">?</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,11 +7,7 @@ import Tooltip from '@components/shared/Tooltip'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import mangoStore from '@store/mangoStore'
|
import mangoStore from '@store/mangoStore'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import {
|
import { PerpMarket, Bank } from '@blockworks-foundation/mango-v4'
|
||||||
PerpMarket,
|
|
||||||
Bank,
|
|
||||||
OracleProvider,
|
|
||||||
} from '@blockworks-foundation/mango-v4'
|
|
||||||
import { BorshAccountsCoder } from '@coral-xyz/anchor'
|
import { BorshAccountsCoder } from '@coral-xyz/anchor'
|
||||||
import {
|
import {
|
||||||
floorToDecimal,
|
floorToDecimal,
|
||||||
|
@ -21,6 +17,8 @@ import {
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import duration from 'dayjs/plugin/duration'
|
import duration from 'dayjs/plugin/duration'
|
||||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||||
|
import useOracleProvider from 'hooks/useOracleProvider'
|
||||||
|
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/20/solid'
|
||||||
|
|
||||||
const OraclePrice = ({
|
const OraclePrice = ({
|
||||||
setChangePrice,
|
setChangePrice,
|
||||||
|
@ -38,10 +36,10 @@ const OraclePrice = ({
|
||||||
|
|
||||||
const connection = mangoStore((s) => s.connection)
|
const connection = mangoStore((s) => s.connection)
|
||||||
const [price, setPrice] = useState(stalePrice)
|
const [price, setPrice] = useState(stalePrice)
|
||||||
const [oracleProviderName, setOracleProviderName] = useState('Unknown')
|
|
||||||
const [oracleLastUpdatedSlot, setOracleLastUpdatedSlot] = useState(0)
|
const [oracleLastUpdatedSlot, setOracleLastUpdatedSlot] = useState(0)
|
||||||
const [highestSlot, setHighestSlot] = useState(0)
|
const [highestSlot, setHighestSlot] = useState(0)
|
||||||
const [isStale, setIsStale] = useState(false)
|
const [isStale, setIsStale] = useState(false)
|
||||||
|
const { oracleProvider, oracleLinkPath } = useOracleProvider()
|
||||||
|
|
||||||
const { t } = useTranslation(['common', 'trade'])
|
const { t } = useTranslation(['common', 'trade'])
|
||||||
|
|
||||||
|
@ -64,20 +62,6 @@ const OraclePrice = ({
|
||||||
decimals = group.getMintDecimals(baseBank.mint)
|
decimals = group.getMintDecimals(baseBank.mint)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (marketOrBank.oracleProvider) {
|
|
||||||
case OracleProvider.Pyth:
|
|
||||||
setOracleProviderName('Pyth')
|
|
||||||
break
|
|
||||||
case OracleProvider.Switchboard:
|
|
||||||
setOracleProviderName('Switchboard')
|
|
||||||
break
|
|
||||||
case OracleProvider.Stub:
|
|
||||||
setOracleProviderName('Stub')
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
setOracleProviderName('Unknown')
|
|
||||||
}
|
|
||||||
|
|
||||||
const coder = new BorshAccountsCoder(client.program.idl)
|
const coder = new BorshAccountsCoder(client.program.idl)
|
||||||
const subId = connection.onAccountChange(
|
const subId = connection.onAccountChange(
|
||||||
marketOrBank.oracle,
|
marketOrBank.oracle,
|
||||||
|
@ -147,8 +131,21 @@ const OraclePrice = ({
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
content={
|
content={
|
||||||
<>
|
<>
|
||||||
<div>
|
<div className="flex">
|
||||||
{t('trade:price-provided-by')} {oracleProviderName}.
|
<span className="mr-1">{t('trade:price-provided-by')}</span>
|
||||||
|
{oracleLinkPath ? (
|
||||||
|
<a
|
||||||
|
href={oracleLinkPath}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="flex items-center"
|
||||||
|
>
|
||||||
|
<span className="mr-1">{oracleProvider}</span>
|
||||||
|
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<span className="text-th-fgd-2">{oracleProvider}</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
{t('trade:last-updated')}{' '}
|
{t('trade:last-updated')}{' '}
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
import {
|
||||||
|
Bank,
|
||||||
|
OracleProvider,
|
||||||
|
PerpMarket,
|
||||||
|
Serum3Market,
|
||||||
|
} from '@blockworks-foundation/mango-v4'
|
||||||
|
import mangoStore from '@store/mangoStore'
|
||||||
|
import { useMemo } from 'react'
|
||||||
|
import { formatTokenSymbol } from 'utils/tokens'
|
||||||
|
import useSelectedMarket from './useSelectedMarket'
|
||||||
|
|
||||||
|
export const getOracleProvider = (
|
||||||
|
marketOrBank: PerpMarket | Serum3Market | Bank
|
||||||
|
) => {
|
||||||
|
let marketOrBase: PerpMarket | Bank
|
||||||
|
let name: string
|
||||||
|
if (marketOrBank instanceof Bank) {
|
||||||
|
marketOrBase = marketOrBank
|
||||||
|
name = formatTokenSymbol(marketOrBank.name)
|
||||||
|
} else if (marketOrBank instanceof PerpMarket) {
|
||||||
|
marketOrBase = marketOrBank
|
||||||
|
name = marketOrBank.name.split('-')[0]
|
||||||
|
} else {
|
||||||
|
const group = mangoStore.getState().group
|
||||||
|
if (!group) return ['Unavailable', '']
|
||||||
|
const baseBank = group.getFirstBankByTokenIndex(marketOrBank.baseTokenIndex)
|
||||||
|
marketOrBase = baseBank
|
||||||
|
name = formatTokenSymbol(baseBank.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (name === 'USDC') return ['N/A', '']
|
||||||
|
|
||||||
|
switch (marketOrBase.oracleProvider) {
|
||||||
|
case OracleProvider.Pyth:
|
||||||
|
return [
|
||||||
|
'Pyth',
|
||||||
|
`https://pyth.network/price-feeds/crypto-${name.toLowerCase()}-usd`,
|
||||||
|
]
|
||||||
|
case OracleProvider.Switchboard:
|
||||||
|
return [
|
||||||
|
'Switchboard',
|
||||||
|
`https://switchboard.xyz/explorer/3/${marketOrBase.oracle.toString()}`,
|
||||||
|
]
|
||||||
|
case OracleProvider.Stub:
|
||||||
|
return ['Stub', '']
|
||||||
|
default:
|
||||||
|
return ['Unknown', '']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const useOracleProvider = () => {
|
||||||
|
const { selectedMarket } = useSelectedMarket()
|
||||||
|
|
||||||
|
const [oracleProvider, oracleLinkPath] = useMemo(() => {
|
||||||
|
if (!selectedMarket) return ['', '']
|
||||||
|
return getOracleProvider(selectedMarket)
|
||||||
|
}, [selectedMarket])
|
||||||
|
|
||||||
|
return { oracleProvider, oracleLinkPath }
|
||||||
|
}
|
||||||
|
|
||||||
|
export default useOracleProvider
|
|
@ -4,7 +4,7 @@
|
||||||
"borrowing": "Borrowing",
|
"borrowing": "Borrowing",
|
||||||
"borrows": "Borrows",
|
"borrows": "Borrows",
|
||||||
"borrow-rates": "Borrow Rates",
|
"borrow-rates": "Borrow Rates",
|
||||||
"borrow-upkeep-fee": "Borrow Upkeep Fee",
|
"borrow-upkeep-rate": "Borrow Upkeep Rate",
|
||||||
"chart-unavailable": "Chart Unavailable",
|
"chart-unavailable": "Chart Unavailable",
|
||||||
"circulating-supply": "Circulating Supply",
|
"circulating-supply": "Circulating Supply",
|
||||||
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
||||||
|
@ -20,26 +20,30 @@
|
||||||
"market-cap": "Market Cap",
|
"market-cap": "Market Cap",
|
||||||
"max-supply": "Max Supply",
|
"max-supply": "Max Supply",
|
||||||
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
||||||
|
"net-borrow-period": "Net Borrow Period",
|
||||||
"net-borrows-in-period": "Net Borrows in Period",
|
"net-borrows-in-period": "Net Borrows in Period",
|
||||||
"no-borrowers": "No Borrowers...",
|
"no-borrowers": "No Borrowers...",
|
||||||
"no-depositors": "No Depositors...",
|
"no-depositors": "No Depositors...",
|
||||||
"oracle": "Oracle",
|
"oracle": "Oracle",
|
||||||
"oracle-confidence": "Oracle Confidence",
|
"oracle-confidence": "Oracle Confidence",
|
||||||
"oracle-staleness": "Oracle Staleness",
|
"oracle-staleness": "Oracle Staleness",
|
||||||
|
"parameters": "Parameters",
|
||||||
"token-details": "Token Details",
|
"token-details": "Token Details",
|
||||||
"token-fees-collected": "Token Fees Collected (M2M)",
|
"token-fees-collected": "Token Fees Collected",
|
||||||
"token-not-found": "Token Not Found",
|
"token-not-found": "Token Not Found",
|
||||||
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
||||||
"tooltip-borrow-upkeep-fee": "",
|
"tooltip-borrow-upkeep-rate": "The yearly rate paid to the DAO on open borrows. This is included in the displayed borrow interest rate.",
|
||||||
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for opening new positions is scaled down. For borrows, the liability weight for opening new positions is scaled up.",
|
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for deposits is scaled down. For borrows, the liability weight for borrows is scaled up.",
|
||||||
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight increases health and liability weight reduces it. Initial health affects your ability to withdraw and open new positions and is reflected by the amount of free collateral in your account.",
|
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Initial health controls your ability to withdraw and open new positions and is shown as an account's free collateral.",
|
||||||
"tooltip-insurance-rate-curve": "",
|
"tooltip-insurance-rate-curve": "Interest rates are dependent on token utilization. The more tokens that are lent out the higher the rate. The curve scales up and down with long term trends in utilization.",
|
||||||
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
||||||
"tooltip-maint-asset-liability-weight": "The contribution a token has to your account health. Asset weight increases health and liability weight reduces it. Maintance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
"tooltip-maint-asset-liability-weight": "The contribution a token has to your maintenance account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Maintenance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
||||||
"tooltip-net-borrow-limit-in-period": "",
|
"tooltip-net-borrow-period": "As a safety feature, the amount of new borrows is limited. The limit resets at regular periods. This is the amount of time between resets.",
|
||||||
"tooltip-net-borrows-in-period": "",
|
"tooltip-net-borrow-limit-in-period": "Value of allowed net borrows. Once this value is reached, new borrows will be forbidden until the end of the period.",
|
||||||
"tooltip-oracle-confidence": "How much variation from the true price is tolerated.",
|
"tooltip-net-borrows-in-period": "Current value of net borrows in this period.",
|
||||||
"tooltip-oracle-staleness": "Price is considered valid when it is last udpated within {{slots}} slots.",
|
"tooltip-oracle-confidence": "Oracles work by aggregating multiple price sources. If these sources disagree too much, confidence will be low. If it's below this threshold, the price is considered invalid.",
|
||||||
|
"tooltip-oracle-staleness": "Price is considered valid when it is last updated within {{slots}} slots.",
|
||||||
|
"tooltip-token-fees-collected": "These fees accrue in every native token listed on Mango. The values in this chart are derived from the current market value.",
|
||||||
"top-borrowers": "Top {{symbol}} Borrowers",
|
"top-borrowers": "Top {{symbol}} Borrowers",
|
||||||
"top-depositors": "Top {{symbol}} Depositors",
|
"top-depositors": "Top {{symbol}} Depositors",
|
||||||
"total-supply": "Total Supply",
|
"total-supply": "Total Supply",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"notional": "Notional",
|
"notional": "Notional",
|
||||||
"notional-volume": "Notional Volume ($)",
|
"notional-volume": "Notional Volume ($)",
|
||||||
"open-interest": "Open Interest",
|
"open-interest": "Open Interest",
|
||||||
|
"oracle": "Oracle",
|
||||||
"oracle-not-updated": "This oracle has not updated recently.",
|
"oracle-not-updated": "This oracle has not updated recently.",
|
||||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||||
"oracle-price": "Oracle Price",
|
"oracle-price": "Oracle Price",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"post": "Post",
|
"post": "Post",
|
||||||
"preview-sound": "Preview Sound",
|
"preview-sound": "Preview Sound",
|
||||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||||
"price-provided-by": "This price is provided by",
|
"price-provided-by": "Oracle by",
|
||||||
"quote": "Quote",
|
"quote": "Quote",
|
||||||
"reduce-only": "Reduce Only",
|
"reduce-only": "Reduce Only",
|
||||||
"sells": "Sells",
|
"sells": "Sells",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"borrowing": "Borrowing",
|
"borrowing": "Borrowing",
|
||||||
"borrows": "Borrows",
|
"borrows": "Borrows",
|
||||||
"borrow-rates": "Borrow Rates",
|
"borrow-rates": "Borrow Rates",
|
||||||
"borrow-upkeep-fee": "Borrow Upkeep Fee",
|
"borrow-upkeep-rate": "Borrow Upkeep Rate",
|
||||||
"chart-unavailable": "Chart Unavailable",
|
"chart-unavailable": "Chart Unavailable",
|
||||||
"circulating-supply": "Circulating Supply",
|
"circulating-supply": "Circulating Supply",
|
||||||
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
||||||
|
@ -20,26 +20,30 @@
|
||||||
"market-cap": "Market Cap",
|
"market-cap": "Market Cap",
|
||||||
"max-supply": "Max Supply",
|
"max-supply": "Max Supply",
|
||||||
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
||||||
|
"net-borrow-period": "Net Borrow Period",
|
||||||
"net-borrows-in-period": "Net Borrows in Period",
|
"net-borrows-in-period": "Net Borrows in Period",
|
||||||
"no-borrowers": "No Borrowers...",
|
"no-borrowers": "No Borrowers...",
|
||||||
"no-depositors": "No Depositors...",
|
"no-depositors": "No Depositors...",
|
||||||
"oracle": "Oracle",
|
"oracle": "Oracle",
|
||||||
"oracle-confidence": "Oracle Confidence",
|
"oracle-confidence": "Oracle Confidence",
|
||||||
"oracle-staleness": "Oracle Staleness",
|
"oracle-staleness": "Oracle Staleness",
|
||||||
|
"parameters": "Parameters",
|
||||||
"token-details": "Token Details",
|
"token-details": "Token Details",
|
||||||
"token-fees-collected": "Token Fees Collected (M2M)",
|
"token-fees-collected": "Token Fees Collected",
|
||||||
"token-not-found": "Token Not Found",
|
"token-not-found": "Token Not Found",
|
||||||
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
||||||
"tooltip-borrow-upkeep-fee": "",
|
"tooltip-borrow-upkeep-rate": "The yearly rate paid to the DAO on open borrows. This is included in the displayed borrow interest rate.",
|
||||||
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for opening new positions is scaled down. For borrows, the liability weight for opening new positions is scaled up.",
|
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for deposits is scaled down. For borrows, the liability weight for borrows is scaled up.",
|
||||||
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight increases health and liability weight reduces it. Initial health affects your ability to withdraw and open new positions and is reflected by the amount of free collateral in your account.",
|
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Initial health controls your ability to withdraw and open new positions and is shown as an account's free collateral.",
|
||||||
"tooltip-insurance-rate-curve": "",
|
"tooltip-insurance-rate-curve": "Interest rates are dependent on token utilization. The more tokens that are lent out the higher the rate. The curve scales up and down with long term trends in utilization.",
|
||||||
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
||||||
"tooltip-maint-asset-liability-weight": "The contribution a token has to your account health. Asset weight increases health and liability weight reduces it. Maintance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
"tooltip-maint-asset-liability-weight": "The contribution a token has to your maintenance account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Maintenance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
||||||
"tooltip-net-borrow-limit-in-period": "",
|
"tooltip-net-borrow-period": "As a safety feature, the amount of new borrows is limited. The limit resets at regular periods. This is the amount of time between resets.",
|
||||||
"tooltip-net-borrows-in-period": "",
|
"tooltip-net-borrow-limit-in-period": "Value of allowed net borrows. Once this value is reached, new borrows will be forbidden until the end of the period.",
|
||||||
"tooltip-oracle-confidence": "How much variation from the true price is tolerated.",
|
"tooltip-net-borrows-in-period": "Current value of net borrows in this period.",
|
||||||
"tooltip-oracle-staleness": "Price is considered valid when it is last udpated within {{slots}} slots.",
|
"tooltip-oracle-confidence": "Oracles work by aggregating multiple price sources. If these sources disagree too much, confidence will be low. If it's below this threshold, the price is considered invalid.",
|
||||||
|
"tooltip-oracle-staleness": "Price is considered valid when it is last updated within {{slots}} slots.",
|
||||||
|
"tooltip-token-fees-collected": "These fees accrue in every native token listed on Mango. The values in this chart are derived from the current market value.",
|
||||||
"top-borrowers": "Top {{symbol}} Borrowers",
|
"top-borrowers": "Top {{symbol}} Borrowers",
|
||||||
"top-depositors": "Top {{symbol}} Depositors",
|
"top-depositors": "Top {{symbol}} Depositors",
|
||||||
"total-supply": "Total Supply",
|
"total-supply": "Total Supply",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"notional": "Notional",
|
"notional": "Notional",
|
||||||
"notional-volume": "Notional Volume ($)",
|
"notional-volume": "Notional Volume ($)",
|
||||||
"open-interest": "Open Interest",
|
"open-interest": "Open Interest",
|
||||||
|
"oracle": "Oracle",
|
||||||
"oracle-not-updated": "This oracle has not updated recently.",
|
"oracle-not-updated": "This oracle has not updated recently.",
|
||||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||||
"oracle-price": "Oracle Price",
|
"oracle-price": "Oracle Price",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"post": "Post",
|
"post": "Post",
|
||||||
"preview-sound": "Preview Sound",
|
"preview-sound": "Preview Sound",
|
||||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||||
"price-provided-by": "This price is provided by",
|
"price-provided-by": "Oracle by",
|
||||||
"quote": "Quote",
|
"quote": "Quote",
|
||||||
"reduce-only": "Reduce Only",
|
"reduce-only": "Reduce Only",
|
||||||
"sells": "Sells",
|
"sells": "Sells",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"borrowing": "Borrowing",
|
"borrowing": "Borrowing",
|
||||||
"borrows": "Borrows",
|
"borrows": "Borrows",
|
||||||
"borrow-rates": "Borrow Rates",
|
"borrow-rates": "Borrow Rates",
|
||||||
"borrow-upkeep-fee": "Borrow Upkeep Fee",
|
"borrow-upkeep-rate": "Borrow Upkeep Rate",
|
||||||
"chart-unavailable": "Chart Unavailable",
|
"chart-unavailable": "Chart Unavailable",
|
||||||
"circulating-supply": "Circulating Supply",
|
"circulating-supply": "Circulating Supply",
|
||||||
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
||||||
|
@ -20,26 +20,30 @@
|
||||||
"market-cap": "Market Cap",
|
"market-cap": "Market Cap",
|
||||||
"max-supply": "Max Supply",
|
"max-supply": "Max Supply",
|
||||||
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
||||||
|
"net-borrow-period": "Net Borrow Period",
|
||||||
"net-borrows-in-period": "Net Borrows in Period",
|
"net-borrows-in-period": "Net Borrows in Period",
|
||||||
"no-borrowers": "No Borrowers...",
|
"no-borrowers": "No Borrowers...",
|
||||||
"no-depositors": "No Depositors...",
|
"no-depositors": "No Depositors...",
|
||||||
"oracle": "Oracle",
|
"oracle": "Oracle",
|
||||||
"oracle-confidence": "Oracle Confidence",
|
"oracle-confidence": "Oracle Confidence",
|
||||||
"oracle-staleness": "Oracle Staleness",
|
"oracle-staleness": "Oracle Staleness",
|
||||||
|
"parameters": "Parameters",
|
||||||
"token-details": "Token Details",
|
"token-details": "Token Details",
|
||||||
"token-fees-collected": "Token Fees Collected (M2M)",
|
"token-fees-collected": "Token Fees Collected",
|
||||||
"token-not-found": "Token Not Found",
|
"token-not-found": "Token Not Found",
|
||||||
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
||||||
"tooltip-borrow-upkeep-fee": "",
|
"tooltip-borrow-upkeep-rate": "The yearly rate paid to the DAO on open borrows. This is included in the displayed borrow interest rate.",
|
||||||
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for opening new positions is scaled down. For borrows, the liability weight for opening new positions is scaled up.",
|
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for deposits is scaled down. For borrows, the liability weight for borrows is scaled up.",
|
||||||
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight increases health and liability weight reduces it. Initial health affects your ability to withdraw and open new positions and is reflected by the amount of free collateral in your account.",
|
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Initial health controls your ability to withdraw and open new positions and is shown as an account's free collateral.",
|
||||||
"tooltip-insurance-rate-curve": "",
|
"tooltip-insurance-rate-curve": "Interest rates are dependent on token utilization. The more tokens that are lent out the higher the rate. The curve scales up and down with long term trends in utilization.",
|
||||||
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
||||||
"tooltip-maint-asset-liability-weight": "The contribution a token has to your account health. Asset weight increases health and liability weight reduces it. Maintance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
"tooltip-maint-asset-liability-weight": "The contribution a token has to your maintenance account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Maintenance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
||||||
"tooltip-net-borrow-limit-in-period": "",
|
"tooltip-net-borrow-period": "As a safety feature, the amount of new borrows is limited. The limit resets at regular periods. This is the amount of time between resets.",
|
||||||
"tooltip-net-borrows-in-period": "",
|
"tooltip-net-borrow-limit-in-period": "Value of allowed net borrows. Once this value is reached, new borrows will be forbidden until the end of the period.",
|
||||||
"tooltip-oracle-confidence": "How much variation from the true price is tolerated.",
|
"tooltip-net-borrows-in-period": "Current value of net borrows in this period.",
|
||||||
"tooltip-oracle-staleness": "Price is considered valid when it is last udpated within {{slots}} slots.",
|
"tooltip-oracle-confidence": "Oracles work by aggregating multiple price sources. If these sources disagree too much, confidence will be low. If it's below this threshold, the price is considered invalid.",
|
||||||
|
"tooltip-oracle-staleness": "Price is considered valid when it is last updated within {{slots}} slots.",
|
||||||
|
"tooltip-token-fees-collected": "These fees accrue in every native token listed on Mango. The values in this chart are derived from the current market value.",
|
||||||
"top-borrowers": "Top {{symbol}} Borrowers",
|
"top-borrowers": "Top {{symbol}} Borrowers",
|
||||||
"top-depositors": "Top {{symbol}} Depositors",
|
"top-depositors": "Top {{symbol}} Depositors",
|
||||||
"total-supply": "Total Supply",
|
"total-supply": "Total Supply",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"notional": "Notional",
|
"notional": "Notional",
|
||||||
"notional-volume": "Notional Volume ($)",
|
"notional-volume": "Notional Volume ($)",
|
||||||
"open-interest": "Open Interest",
|
"open-interest": "Open Interest",
|
||||||
|
"oracle": "Oracle",
|
||||||
"oracle-not-updated": "This oracle has not updated recently.",
|
"oracle-not-updated": "This oracle has not updated recently.",
|
||||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||||
"oracle-price": "Oracle Price",
|
"oracle-price": "Oracle Price",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"post": "Post",
|
"post": "Post",
|
||||||
"preview-sound": "Preview Sound",
|
"preview-sound": "Preview Sound",
|
||||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||||
"price-provided-by": "This price is provided by",
|
"price-provided-by": "Oracle by",
|
||||||
"quote": "Quote",
|
"quote": "Quote",
|
||||||
"reduce-only": "Reduce Only",
|
"reduce-only": "Reduce Only",
|
||||||
"sells": "Sells",
|
"sells": "Sells",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"borrowing": "Borrowing",
|
"borrowing": "Borrowing",
|
||||||
"borrows": "Borrows",
|
"borrows": "Borrows",
|
||||||
"borrow-rates": "Borrow Rates",
|
"borrow-rates": "Borrow Rates",
|
||||||
"borrow-upkeep-fee": "Borrow Upkeep Fee",
|
"borrow-upkeep-rate": "Borrow Upkeep Rate",
|
||||||
"chart-unavailable": "Chart Unavailable",
|
"chart-unavailable": "Chart Unavailable",
|
||||||
"circulating-supply": "Circulating Supply",
|
"circulating-supply": "Circulating Supply",
|
||||||
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
"deposit-borrow-scaling-start": "Deposit/Borrow Scaling Start",
|
||||||
|
@ -20,26 +20,30 @@
|
||||||
"market-cap": "Market Cap",
|
"market-cap": "Market Cap",
|
||||||
"max-supply": "Max Supply",
|
"max-supply": "Max Supply",
|
||||||
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
||||||
|
"net-borrow-period": "Net Borrow Period",
|
||||||
"net-borrows-in-period": "Net Borrows in Period",
|
"net-borrows-in-period": "Net Borrows in Period",
|
||||||
"no-borrowers": "No Borrowers...",
|
"no-borrowers": "No Borrowers...",
|
||||||
"no-depositors": "No Depositors...",
|
"no-depositors": "No Depositors...",
|
||||||
"oracle": "Oracle",
|
"oracle": "Oracle",
|
||||||
"oracle-confidence": "Oracle Confidence",
|
"oracle-confidence": "Oracle Confidence",
|
||||||
"oracle-staleness": "Oracle Staleness",
|
"oracle-staleness": "Oracle Staleness",
|
||||||
|
"parameters": "Parameters",
|
||||||
"token-details": "Token Details",
|
"token-details": "Token Details",
|
||||||
"token-fees-collected": "Token Fees Collected (M2M)",
|
"token-fees-collected": "Token Fees Collected",
|
||||||
"token-not-found": "Token Not Found",
|
"token-not-found": "Token Not Found",
|
||||||
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
"token-not-found-desc": "'{{token}}' is either not listed or we're having issues loading the data.",
|
||||||
"tooltip-borrow-upkeep-fee": "",
|
"tooltip-borrow-upkeep-rate": "The yearly rate paid to the DAO on open borrows. This is included in the displayed borrow interest rate.",
|
||||||
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for opening new positions is scaled down. For borrows, the liability weight for opening new positions is scaled up.",
|
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for deposits is scaled down. For borrows, the liability weight for borrows is scaled up.",
|
||||||
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight increases health and liability weight reduces it. Initial health affects your ability to withdraw and open new positions and is reflected by the amount of free collateral in your account.",
|
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Initial health controls your ability to withdraw and open new positions and is shown as an account's free collateral.",
|
||||||
"tooltip-insurance-rate-curve": "",
|
"tooltip-insurance-rate-curve": "Interest rates are dependent on token utilization. The more tokens that are lent out the higher the rate. The curve scales up and down with long term trends in utilization.",
|
||||||
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
||||||
"tooltip-maint-asset-liability-weight": "The contribution a token has to your account health. Asset weight increases health and liability weight reduces it. Maintance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
"tooltip-maint-asset-liability-weight": "The contribution a token has to your maintenance account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Maintenance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
||||||
"tooltip-net-borrow-limit-in-period": "",
|
"tooltip-net-borrow-period": "As a safety feature, the amount of new borrows is limited. The limit resets at regular periods. This is the amount of time between resets.",
|
||||||
"tooltip-net-borrows-in-period": "",
|
"tooltip-net-borrow-limit-in-period": "Value of allowed net borrows. Once this value is reached, new borrows will be forbidden until the end of the period.",
|
||||||
"tooltip-oracle-confidence": "How much variation from the true price is tolerated.",
|
"tooltip-net-borrows-in-period": "Current value of net borrows in this period.",
|
||||||
"tooltip-oracle-staleness": "Price is considered valid when it is last udpated within {{slots}} slots.",
|
"tooltip-oracle-confidence": "Oracles work by aggregating multiple price sources. If these sources disagree too much, confidence will be low. If it's below this threshold, the price is considered invalid.",
|
||||||
|
"tooltip-oracle-staleness": "Price is considered valid when it is last updated within {{slots}} slots.",
|
||||||
|
"tooltip-token-fees-collected": "These fees accrue in every native token listed on Mango. The values in this chart are derived from the current market value.",
|
||||||
"top-borrowers": "Top {{symbol}} Borrowers",
|
"top-borrowers": "Top {{symbol}} Borrowers",
|
||||||
"top-depositors": "Top {{symbol}} Depositors",
|
"top-depositors": "Top {{symbol}} Depositors",
|
||||||
"total-supply": "Total Supply",
|
"total-supply": "Total Supply",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"notional": "Notional",
|
"notional": "Notional",
|
||||||
"notional-volume": "Notional Volume ($)",
|
"notional-volume": "Notional Volume ($)",
|
||||||
"open-interest": "Open Interest",
|
"open-interest": "Open Interest",
|
||||||
|
"oracle": "Oracle",
|
||||||
"oracle-not-updated": "This oracle has not updated recently.",
|
"oracle-not-updated": "This oracle has not updated recently.",
|
||||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||||
"oracle-price": "Oracle Price",
|
"oracle-price": "Oracle Price",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"post": "Post",
|
"post": "Post",
|
||||||
"preview-sound": "Preview Sound",
|
"preview-sound": "Preview Sound",
|
||||||
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
"price-expect": "The price you receive may be worse than you expect and full execution is not guaranteed. Max slippage is 2.5% for your safety. The part of your position with slippage beyond 2.5% will not be closed.",
|
||||||
"price-provided-by": "This price is provided by",
|
"price-provided-by": "Oracle by",
|
||||||
"quote": "Quote",
|
"quote": "Quote",
|
||||||
"reduce-only": "Reduce Only",
|
"reduce-only": "Reduce Only",
|
||||||
"sells": "Sells",
|
"sells": "Sells",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"all-time-high": "歷史高價",
|
"all-time-high": "歷史高價",
|
||||||
"all-time-low": "歷史低價",
|
"all-time-low": "歷史低價",
|
||||||
"borrow-rates": "借貸利率",
|
"borrow-rates": "借貸利率",
|
||||||
"borrow-upkeep-fee": "Borrow Upkeep Fee",
|
"borrow-upkeep-rate": "Borrow Upkeep Fee",
|
||||||
"borrowing": "借入",
|
"borrowing": "借入",
|
||||||
"borrows": "借貸",
|
"borrows": "借貸",
|
||||||
"chart-unavailable": "無法顯示圖表",
|
"chart-unavailable": "無法顯示圖表",
|
||||||
|
@ -20,26 +20,30 @@
|
||||||
"market-cap": "總市值",
|
"market-cap": "總市值",
|
||||||
"max-supply": "最大供應量",
|
"max-supply": "最大供應量",
|
||||||
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
"net-borrow-limit-in-period": "Net Borrow Limit in Period",
|
||||||
|
"net-borrow-period": "Net Borrow Period",
|
||||||
"net-borrows-in-period": "Net Borrows in Period",
|
"net-borrows-in-period": "Net Borrows in Period",
|
||||||
"no-borrowers": "無借貸者...",
|
"no-borrowers": "無借貸者...",
|
||||||
"no-depositors": "無存款者...",
|
"no-depositors": "無存款者...",
|
||||||
"oracle": "Oracle",
|
"oracle": "Oracle",
|
||||||
"oracle-confidence": "Oracle Confidence",
|
"oracle-confidence": "Oracle Confidence",
|
||||||
"oracle-staleness": "Oracle Staleness",
|
"oracle-staleness": "Oracle Staleness",
|
||||||
|
"parameters": "Parameters",
|
||||||
"token-details": "幣種細節",
|
"token-details": "幣種細節",
|
||||||
"token-fees-collected": "Token Fees Collected (M2M)",
|
"token-fees-collected": "Token Fees Collected",
|
||||||
"token-not-found": "查不到幣種",
|
"token-not-found": "查不到幣種",
|
||||||
"token-not-found-desc": "'{{token}}'未列入或我們在加載數據時出錯。",
|
"token-not-found-desc": "'{{token}}'未列入或我們在加載數據時出錯。",
|
||||||
"tooltip-borrow-upkeep-fee": "",
|
"tooltip-borrow-upkeep-rate": "The yearly rate paid to the DAO on open borrows. This is included in the displayed borrow interest rate.",
|
||||||
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for opening new positions is scaled down. For borrows, the liability weight for opening new positions is scaled up.",
|
"tooltip-deposit-borrow-scaling-start": "This acts as a soft limit for deposits and borrows. For deposits, if this value is exceeded the asset weight for deposits is scaled down. For borrows, the liability weight for borrows is scaled up.",
|
||||||
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight increases health and liability weight reduces it. Initial health affects your ability to withdraw and open new positions and is reflected by the amount of free collateral in your account.",
|
"tooltip-init-asset-liability-weight": "The contribution a token has to your initial account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Initial health controls your ability to withdraw and open new positions and is shown as an account's free collateral.",
|
||||||
"tooltip-insurance-rate-curve": "",
|
"tooltip-insurance-rate-curve": "Interest rates are dependent on token utilization. The more tokens that are lent out the higher the rate. The curve scales up and down with long term trends in utilization.",
|
||||||
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
"tooltip-liquidation-fee": "The fee paid to liqudators when {{symbol}} is liquidated.",
|
||||||
"tooltip-maint-asset-liability-weight": "The contribution a token has to your account health. Asset weight increases health and liability weight reduces it. Maintance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
"tooltip-maint-asset-liability-weight": "The contribution a token has to your maintenance account health. Asset weight is applied to deposits that increase health and liability weight is applied to borrows that reduce it. Maintenance health is what's displayed on your account page. If this value reaches zero your account will be liquidated.",
|
||||||
"tooltip-net-borrow-limit-in-period": "",
|
"tooltip-net-borrow-period": "As a safety feature, the amount of new borrows is limited. The limit resets at regular periods. This is the amount of time between resets.",
|
||||||
"tooltip-net-borrows-in-period": "",
|
"tooltip-net-borrow-limit-in-period": "Value of allowed net borrows. Once this value is reached, new borrows will be forbidden until the end of the period.",
|
||||||
"tooltip-oracle-confidence": "How much variation from the true price is tolerated.",
|
"tooltip-net-borrows-in-period": "Current value of net borrows in this period.",
|
||||||
"tooltip-oracle-staleness": "Price is considered valid when it is last udpated within {{slots}} slots.",
|
"tooltip-oracle-confidence": "Oracles work by aggregating multiple price sources. If these sources disagree too much, confidence will be low. If it's below this threshold, the price is considered invalid.",
|
||||||
|
"tooltip-oracle-staleness": "Price is considered valid when it is last updated within {{slots}} slots.",
|
||||||
|
"tooltip-token-fees-collected": "These fees accrue in every native token listed on Mango. The values in this chart are derived from the current market value.",
|
||||||
"top-borrowers": "頂級{{symbol}}借貸者",
|
"top-borrowers": "頂級{{symbol}}借貸者",
|
||||||
"top-depositors": "頂級{{symbol}}存款者",
|
"top-depositors": "頂級{{symbol}}存款者",
|
||||||
"total-supply": "總供應量",
|
"total-supply": "總供應量",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"notional": "合約面值",
|
"notional": "合約面值",
|
||||||
"notional-volume": "面值交易量($)",
|
"notional-volume": "面值交易量($)",
|
||||||
"open-interest": "持倉量",
|
"open-interest": "持倉量",
|
||||||
|
"oracle": "Oracle",
|
||||||
"oracle-not-updated": "This oracle has not updated recently.",
|
"oracle-not-updated": "This oracle has not updated recently.",
|
||||||
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
"oracle-not-updated-warning": "Actions will fail for accounts with a position in this token.",
|
||||||
"oracle-price": "預言機價格",
|
"oracle-price": "預言機價格",
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
"post": "Post",
|
"post": "Post",
|
||||||
"preview-sound": "聲音預覽",
|
"preview-sound": "聲音預覽",
|
||||||
"price-expect": "您收到的價格可能與您預期有差異,並且無法保證完全執行。為了您的安全,最大滑點保持為 2.5%。超過 2.5%滑點的部分不會被平倉。",
|
"price-expect": "您收到的價格可能與您預期有差異,並且無法保證完全執行。為了您的安全,最大滑點保持為 2.5%。超過 2.5%滑點的部分不會被平倉。",
|
||||||
"price-provided-by": "This price is provided by",
|
"price-provided-by": "Oracle by",
|
||||||
"quote": "計價",
|
"quote": "計價",
|
||||||
"reduce-only": "限減少",
|
"reduce-only": "限減少",
|
||||||
"sells": "賣單",
|
"sells": "賣單",
|
||||||
|
|
|
@ -142,8 +142,8 @@ export async function getNFTsByOwner(owner: PublicKey, connection: Connection) {
|
||||||
|
|
||||||
export const formatTokenSymbol = (symbol: string) => {
|
export const formatTokenSymbol = (symbol: string) => {
|
||||||
if (symbol.toLowerCase().includes('portal')) {
|
if (symbol.toLowerCase().includes('portal')) {
|
||||||
const truncSymbol = symbol.split(' ')[0]
|
const truncSymbol = symbol.split(' ')[0].toUpperCase()
|
||||||
return truncSymbol === 'WBTC' ? 'wBTC' : truncSymbol
|
return truncSymbol === 'WBTC' ? 'BTC' : truncSymbol
|
||||||
}
|
}
|
||||||
return symbol === 'MSOL' ? 'mSOL' : symbol
|
return symbol === 'MSOL' ? 'mSOL' : symbol
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue