Skip to content

Commit f7b4d54

Browse files
authored
update modals for TGE (#1122)
* update modals for TGE * update messaging * update modal language
1 parent 3e3c81c commit f7b4d54

File tree

7 files changed

+79
-83
lines changed

7 files changed

+79
-83
lines changed

src/components/pages/vaults/components/table/KatanaApyTooltip.tsx

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ type TKatanaTooltipProps = {
88
katanaNativeYield: number
99
fixedRateKatanRewardsAPR: number
1010
katanaAppRewardsAPR: number
11-
katanaBonusAPR: number
1211
steerPointsPerDollar?: number
1312
isEligibleForSpectraBoost?: boolean
1413
nativeYieldLabel?: string
@@ -32,16 +31,14 @@ type TKatanaApyRowProps = {
3231
iconSrc: string
3332
label: string
3433
value: number
35-
muted?: boolean
3634
}
3735

38-
function KatanaApyRow({ iconSrc, label, value, muted = false }: TKatanaApyRowProps): ReactElement {
36+
function KatanaApyRow({ iconSrc, label, value }: TKatanaApyRowProps): ReactElement {
3937
return (
4038
<div
41-
className={cl(
42-
'flex w-full flex-row items-start justify-between gap-3 whitespace-normal md:text-sm text-bold pb-2',
43-
muted ? 'text-text-secondary/35' : 'text-text-secondary'
44-
)}
39+
className={
40+
'flex w-full flex-row items-start justify-between gap-3 whitespace-normal pb-2 text-text-secondary md:text-sm text-bold'
41+
}
4542
>
4643
<div className={'flex flex-row items-center space-x-2'}>
4744
<ImageWithFallback src={iconSrc} alt={''} width={16} height={16} />
@@ -56,7 +53,6 @@ export function KatanaApyTooltipContent({
5653
katanaNativeYield,
5754
fixedRateKatanRewardsAPR,
5855
katanaAppRewardsAPR,
59-
katanaBonusAPR,
6056
steerPointsPerDollar,
6157
isEligibleForSpectraBoost,
6258
nativeYieldLabel,
@@ -70,6 +66,8 @@ export function KatanaApyTooltipContent({
7066
const tokenAddress = getVaultToken(currentVault).address.toLowerCase()
7167
const tokenLogoSrc = `${baseAssetsUrl}/tokens/${chainId}/${tokenAddress}/logo-32.png`
7268
const chainLogoSrc = `${baseAssetsUrl}/chains/${chainId}/logo-32.png`
69+
const hasFixedRateRewards = fixedRateKatanRewardsAPR > 0
70+
const hasAppRewards = katanaAppRewardsAPR > 0
7371
const hasSteerPoints = (steerPointsPerDollar || 0) > 0
7472

7573
return (
@@ -84,49 +82,50 @@ export function KatanaApyTooltipContent({
8482
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
8583
{'Yield Earned on Katana'}
8684
</p>
87-
<KatanaApyRow iconSrc={chainLogoSrc} label={'Base Rewards APR '} value={fixedRateKatanRewardsAPR} />
88-
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
89-
{'Limited time fixed KAT rewards'}
90-
</p>
91-
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words'}>
92-
{'* claimable after 28 days, subject to '}
85+
{hasFixedRateRewards ? (
86+
<>
87+
<KatanaApyRow iconSrc={chainLogoSrc} label={'Base Rewards APR '} value={fixedRateKatanRewardsAPR} />
88+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
89+
{'Limited time KAT rewards'}
90+
</p>
91+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words'}>
92+
{'* claimable after 28 days, subject to '}
93+
<a
94+
href={'https://x.com/katana/status/1961475531188126178'}
95+
target={'_blank'}
96+
rel={'noopener noreferrer'}
97+
className={KATANA_LINK_CLASS}
98+
>
99+
{'haircut schedule.'}
100+
</a>
101+
</p>
102+
</>
103+
) : null}
104+
{hasAppRewards ? (
105+
<>
106+
<KatanaApyRow iconSrc={chainLogoSrc} label={'App Rewards APR '} value={katanaAppRewardsAPR} />
107+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
108+
{'KAT rewards passed through from apps'}
109+
</p>
110+
</>
111+
) : null}
112+
{/* keeping the section below as we will probably need it soon */}
113+
{/* <p className={'mt-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
114+
{
115+
'In order to claim all KAT rewards earned before TGE, users must remain in the vault for 30 days, until April 18th, 2026.'
116+
}
117+
</p> */}
118+
<p className={'mt-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
119+
{'Read more about KAT tokenomics '}
93120
<a
94-
href={'https://x.com/katana/status/1961475531188126178'}
121+
href={'https://katana.network/blog/the-network-is-katana-the-token-is-kat'}
95122
target={'_blank'}
96123
rel={'noopener noreferrer'}
97124
className={KATANA_LINK_CLASS}
98125
>
99-
{'haircut schedule.'}
126+
{'here.'}
100127
</a>
101128
</p>
102-
<KatanaApyRow iconSrc={chainLogoSrc} label={'App Rewards APR '} value={katanaAppRewardsAPR} />
103-
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary wrap-break-word'}>
104-
{'Kat Rewards passed through from Apps'}
105-
</p>
106-
<KatanaApyRow iconSrc={chainLogoSrc} label={'Deposit Bonus APR '} value={katanaBonusAPR} muted />
107-
<p className={'-mt-1 mb-0 w-full text-left text-xs text-text-secondary/35 wrap-break-word'}>
108-
{'Applied if you deposited before Sept. 1st and hold for 90 days'}
109-
</p>
110-
111-
<div className={'mt-2 p-3 pb-0 text-text-secondary md:text-xs text-bold'}>
112-
<li className={'-mt-1 mb-2 w-full text-left wrap-break-word'}>
113-
{'KAT tokens are locked until TGE, which is now targeted to occur on or before the end of March 2026.'}
114-
</li>
115-
<li className={'-mt-1 mb-2 w-full text-left wrap-break-word'}>
116-
{'KAT APR is calculated using an assumed $1B Fully Diluted Valuation.'}
117-
</li>
118-
<li className={'-mt-1 mb-2 w-full text-left wrap-break-word'}>
119-
{'Read more about KAT tokenomics '}
120-
<a
121-
href={'https://katana.network/blog/the-network-is-katana-the-token-is-kat'}
122-
target={'_blank'}
123-
rel={'noopener noreferrer'}
124-
className={KATANA_LINK_CLASS}
125-
>
126-
{'here.'}
127-
</a>
128-
</li>
129-
</div>
130129
{isEligibleForSpectraBoost && (
131130
<>
132131
<div className={'my-2 h-px w-full bg-surface-tertiary/60'} />

src/components/pages/vaults/components/table/VaultForwardAPY.tsx

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -185,28 +185,25 @@ export function VaultForwardAPYInlineDetails({
185185
if (hasKatanaDetails && katanaExtras) {
186186
const steerPointsPerDollar = katanaExtras.steerPointsPerDollar ?? 0
187187
const hasSteerPoints = steerPointsPerDollar > 0
188+
const fixedRateKatanaRewards = katanaExtras.fixedRateKatanaRewards ?? 0
189+
const hasFixedRateRewards = fixedRateKatanaRewards > 0
188190
const katanaAppRewardsAPR = katanaExtras.katanaAppRewardsAPR ?? 0
191+
const hasAppRewards = katanaAppRewardsAPR > 0
189192
return (
190193
<div className={INLINE_DETAILS_CONTAINER_CLASS}>
191194
<div className={INLINE_DETAILS_STACK_CLASS}>
192195
<InlineDetailRow label={'Est. Native APY'} value={formatApyDisplay(data.baseForwardApr)} />
193-
<InlineDetailRow
194-
label={'Base Rewards APR'}
195-
value={formatApyDisplay(katanaExtras.fixedRateKatanaRewards ?? 0)}
196-
/>
197-
<InlineDetailRow label={'App Rewards APR'} value={formatApyDisplay(katanaAppRewardsAPR)} />
198-
<InlineDetailRow label={'Deposit Bonus APR'} value={formatApyDisplay(katanaExtras.katanaBonusAPY ?? 0)} />
196+
{hasFixedRateRewards ? (
197+
<InlineDetailRow label={'Base Rewards APR'} value={formatApyDisplay(fixedRateKatanaRewards)} />
198+
) : null}
199+
{hasAppRewards ? (
200+
<InlineDetailRow label={'App Rewards APR'} value={formatApyDisplay(katanaAppRewardsAPR)} />
201+
) : null}
199202
{hasSteerPoints ? (
200203
<InlineDetailRow label={'Steer Points / $'} value={steerPointsPerDollar.toFixed(2)} />
201204
) : null}
202205
<div className={'mt-2 p-3 pb-0 text-text-secondary md:text-xs text-bold'}>
203-
<li className={'-mt-1 mb-2 w-full text-left text-xs break-words'}>
204-
{'KAT tokens are locked until TGE, which is now targeted to occur on or before the end of March 2026.'}
205-
</li>
206-
<li className={'-mt-1 mb-2 w-full text-left text-xs break-words'}>
207-
{'KAT APR is calculated using an assumed $1B Fully Diluted Valuation.'}
208-
</li>
209-
<li className={'-mt-1 mb-2 w-full text-left text-xs break-words'}>
206+
<p className={'-mt-1 mb-2 w-full text-left text-xs break-words'}>
210207
{'Read more about KAT tokenomics '}
211208
<a
212209
href={'https://katana.network/blog/the-network-is-katana-the-token-is-kat'}
@@ -216,9 +213,23 @@ export function VaultForwardAPYInlineDetails({
216213
>
217214
{'here.'}
218215
</a>
219-
</li>
216+
</p>
217+
{hasFixedRateRewards ? (
218+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words'}>
219+
{'* claimable after 28 days, subject to the Katana '}
220+
<a
221+
href={'https://x.com/katana/status/1961475531188126178'}
222+
target={'_blank'}
223+
rel={'noopener noreferrer'}
224+
className={INLINE_DETAILS_LINK_CLASS}
225+
>
226+
{'haircut schedule'}
227+
</a>
228+
{'.'}
229+
</p>
230+
) : null}
220231
{isEligibleForSpectraBoost && (
221-
<li className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words whitespace-normal'}>
232+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words whitespace-normal'}>
222233
{'Earn boosted yield on Spectra if you '}
223234
<a
224235
href={'https://app.spectra.finance/pools?networks=katana'}
@@ -229,10 +240,10 @@ export function VaultForwardAPYInlineDetails({
229240
{'deposit to their protocol'}
230241
</a>
231242
{'.'}
232-
</li>
243+
</p>
233244
)}
234245
{hasSteerPoints ? (
235-
<li className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words whitespace-normal'}>
246+
<p className={'-mt-1 mb-2 w-full text-left text-xs text-text-secondary break-words whitespace-normal'}>
236247
{'This vault earns Steer Points, but you must '}
237248
<a
238249
href={'https://app.steer.finance/points'}
@@ -242,7 +253,7 @@ export function VaultForwardAPYInlineDetails({
242253
>
243254
{'register here to earn them.'}
244255
</a>
245-
</li>
256+
</p>
246257
) : null}
247258
</div>
248259
</div>

src/components/pages/vaults/components/table/apyDisplayConfig.test.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ const KATANA_APY_DATA = {
3333
katanaExtras: {
3434
fixedRateKatanaRewards: 4,
3535
katanaAppRewardsAPR: 3,
36-
katanaBonusAPY: 2,
3736
steerPointsPerDollar: 0
3837
},
39-
katanaThirtyDayApr: 12,
40-
katanaEstApr: 12
38+
katanaThirtyDayApr: 7.1,
39+
katanaEstApr: 7
4140
} as TVaultApyData
4241

4342
describe('resolveHistoricalApyDisplayConfig', () => {

src/components/pages/vaults/components/table/apyDisplayConfig.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ export function resolveForwardApyDisplayConfig({
282282
katanaNativeYield={katanaBreakdownBaseApr}
283283
fixedRateKatanRewardsAPR={katanaExtras?.fixedRateKatanaRewards ?? 0}
284284
katanaAppRewardsAPR={katanaExtras?.katanaAppRewardsAPR ?? 0}
285-
katanaBonusAPR={katanaExtras?.katanaBonusAPY ?? 0}
286285
steerPointsPerDollar={katanaExtras?.steerPointsPerDollar}
287286
isEligibleForSpectraBoost={isEligibleForSpectraBoost}
288287
currentVault={currentVault}
@@ -631,7 +630,6 @@ export function resolveHistoricalApyDisplayConfig({
631630
katanaNativeYield={standardThirtyDayApr}
632631
fixedRateKatanRewardsAPR={katanaExtras.fixedRateKatanaRewards ?? 0}
633632
katanaAppRewardsAPR={katanaExtras.katanaAppRewardsAPR ?? 0}
634-
katanaBonusAPR={katanaExtras.katanaBonusAPY ?? 0}
635633
steerPointsPerDollar={katanaExtras.steerPointsPerDollar}
636634
isEligibleForSpectraBoost={isEligibleForSpectraBoost}
637635
currentVault={currentVault}

src/components/pages/vaults/hooks/useVaultApyData.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const DETAIL_VAULT_WITH_COMPONENTS = {
1212
extra: {
1313
stakingRewardsAPR: 0,
1414
gammaRewardAPR: 0,
15-
katanaBonusAPY: 0.068,
1615
katanaAppRewardsAPR: 0.0916,
1716
steerPointsPerDollar: 0.1883,
1817
fixedRateKatanaRewards: 0.35
@@ -76,7 +75,6 @@ describe('useVaultApyData helpers', () => {
7675
expect(katanaExtras).toEqual({
7776
katanaAppRewardsAPR: 0.0916,
7877
fixedRateKatanaRewards: 0.35,
79-
katanaBonusAPY: 0.068,
8078
steerPointsPerDollar: 0.1883
8179
})
8280
})

src/components/shared/utils/vaultApy.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ const withComponents = (vault: TKongVault): TKongVault => ({
6868
apr: vault.performance?.estimated?.apr ?? 0,
6969
type: vault.performance?.estimated?.type ?? 'katana-estimated-apr',
7070
components: {
71-
katanaBonusAPY: 0.068,
7271
katanaAppRewardsAPR: 0.0916,
7372
steerPointsPerDollar: 0.1883,
7473
fixedRateKatanaRewards: 0.35
@@ -87,7 +86,6 @@ const DETAIL_VAULT_WITH_COMPONENTS = {
8786
extra: {
8887
stakingRewardsAPR: 0,
8988
gammaRewardAPR: 0,
90-
katanaBonusAPY: 0.068,
9189
katanaAppRewardsAPR: 0.0916,
9290
steerPointsPerDollar: 0.1883,
9391
fixedRateKatanaRewards: 0.35
@@ -124,12 +122,11 @@ describe('vaultApy Katana calculations', () => {
124122
expect(katanaData).toEqual({
125123
katanaAppRewardsAPR: 0.0916,
126124
fixedRateKatanaRewards: 0.35,
127-
katanaBonusAPY: 0.068,
128125
steerPointsPerDollar: 0.1883
129126
})
130127
})
131128

132-
it('calculates Katana estimated APY from list data using available Kong components', () => {
129+
it('calculates Katana estimated APY from list data using native plus fixed and app rewards', () => {
133130
const apy = calculateVaultEstimatedAPY(withComponents(BASE_VAULT))
134131
expect(apy).toBeCloseTo(0.4816, 6)
135132
})

src/components/shared/utils/vaultApy.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const KATANA_CHAIN_ID = 747474
66
export type TKatanaAprData = {
77
katanaAppRewardsAPR?: number
88
fixedRateKatanaRewards?: number
9-
katanaBonusAPY?: number
109
steerPointsPerDollar?: number
1110
}
1211

@@ -45,17 +44,13 @@ export function getKatanaAprData(vault: TKongVaultInput): TKatanaAprData | undef
4544
}
4645

4746
const apr = getVaultAPR(vault)
48-
const fixedRateKatanaRewards = normalizeFiniteNumber(apr.extra.fixedRateKatanaRewards)
4947
const katanaAppRewardsAPR = normalizeFiniteNumber(apr.extra.katanaAppRewardsAPR)
50-
const katanaBonusAPY = normalizeFiniteNumber(apr.extra.katanaBonusAPY)
48+
const fixedRateKatanaRewards = normalizeFiniteNumber(apr.extra.fixedRateKatanaRewards)
5149
const steerPointsPerDollar = normalizeFiniteNumber(apr.extra.steerPointsPerDollar)
5250

53-
const hasKatanaComponentData = [
54-
fixedRateKatanaRewards,
55-
katanaAppRewardsAPR,
56-
katanaBonusAPY,
57-
steerPointsPerDollar
58-
].some((value) => value !== undefined)
51+
const hasKatanaComponentData = [katanaAppRewardsAPR, fixedRateKatanaRewards, steerPointsPerDollar].some(
52+
(value) => value !== undefined
53+
)
5954

6055
if (!hasKatanaComponentData) {
6156
return undefined
@@ -64,7 +59,6 @@ export function getKatanaAprData(vault: TKongVaultInput): TKatanaAprData | undef
6459
return {
6560
katanaAppRewardsAPR,
6661
fixedRateKatanaRewards,
67-
katanaBonusAPY,
6862
steerPointsPerDollar
6963
}
7064
}

0 commit comments

Comments
 (0)