-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcampaigns.tsx
More file actions
136 lines (134 loc) · 4.39 KB
/
campaigns.tsx
File metadata and controls
136 lines (134 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import { Droplet, Lido, MilkyWay, Neutron, Stride } from 'components/common/Icons'
export const CAMPAIGNS: AssetCampaign[] = [
{
id: 'stride',
name: 'Stride Staking',
type: 'apy',
apyApi: {
url: 'https://cache.marsprotocol.io/api/stride',
isApr: true,
isPercent: false,
apyStructure: ['strideData', 'stats', 'strideYield'],
denomStructure: ['stats', 'denom'],
},
incentiveCopy: '+##APY##% APY',
classNames: 'stride',
bgClassNames: 'gradient-stride',
detailedIncentiveCopy: 'Deposits earn ##APY##% APY via Stride',
tooltip: 'Your deposit will still earn the underlying Stride staking APY.',
enabledOnV1: true,
},
{
id: 'drop',
name: 'Droplets',
type: 'points_with_multiplier',
pointsApi: {
url: 'https://droplets.drop.money/api/droplet?address=##ADDRESS##',
pointsStructure: ['result', 'data', 'points'],
pointsDecimals: 6,
queryVariable: 'address',
},
pointBase: 'value',
incentiveCopy: 'Earn ##MULTIPLIER##x Droplets',
classNames: 'droplets',
bgClassNames: 'gradient-droplets',
detailedIncentiveCopy: '##POINTS## Droplets daily (##MULTIPLIER##x)',
tooltip:
'Droplets earned are based on the value of your position. Some positions may have a multiplier range (e.g.: 1-5x). The higher multiplier will be unlocked as soon as you borrow against the position.',
totalPointsTooltip:
'Total Droplets earned are updated every 24 hours and are counted for the entire wallet.',
enabledOnV1: false,
v1Tooltip: 'Note: Only deposits on Mars v2 are eligible for the Droplets campaign.',
},
{
id: 'drop_apy',
name: 'Drop Staking',
type: 'apy',
apyApi: {
url: 'https://cache.marsprotocol.io/api/drop',
isApr: false,
isPercent: false,
apyStructure: ['dropData', 'apy'],
denomStructure: ['denom'],
},
incentiveCopy: '+##APY##% APY',
classNames: 'droplets',
bgClassNames: 'gradient-droplets',
detailedIncentiveCopy: 'Deposits earn ##APY##% APY via Drop',
tooltip: 'Your deposit will still earn the underlying Drop staking APY.',
enabledOnV1: true,
},
{
id: 'lido',
name: 'Lido Staking',
type: 'apy',
apyApi: {
url: 'https://cache.marsprotocol.io/api/lido',
isApr: true,
isPercent: true,
apyStructure: ['lidoData', 'data', 'smaApr'],
denomStructure: ['meta', 'symbol'],
},
incentiveCopy: '+##APY##% APY',
classNames: 'lido',
bgClassNames: 'gradient-lido',
detailedIncentiveCopy: 'Deposits earn ##APY##% APY via Lido',
tooltip:
'Your deposit will still earn the underlying Lido staking yield. This number is based on the moving average of APR for 7 days period.',
enabledOnV1: true,
},
{
id: 'milkyway',
name: 'Milkyway Staking',
type: 'apy',
apyApi: {
url: 'https://cache.marsprotocol.io/api/milkyway',
isApr: true,
isPercent: true,
apyStructure: ['milkywayData', 'apr'],
denomStructure: ['symbol'],
},
incentiveCopy: '+##APY##% APY',
classNames: 'milkyway',
bgClassNames: 'gradient-milkyway',
detailedIncentiveCopy: 'Deposits earn ##APY##% APY via Milkyway',
tooltip: 'Your deposit will still earn the underlying Milkyway staking APY.',
enabledOnV1: true,
},
{
id: 'ntrn-rewards',
name: 'Neutron Rewards',
type: 'apy',
apyApi: {
url: 'https://cache.marsprotocol.io/api/ntrn-rewards-mars',
isApr: false,
isPercent: true,
apyStructure: ['ntrnRewardsDataMars', 'apy'],
denomStructure: ['denom'],
},
incentiveCopy: '+##APY##% APY',
classNames: 'ntrn-rewards',
bgClassNames: 'gradient-ntrn-rewards',
detailedIncentiveCopy: 'Deposits earn additional ##APY##% APY via Neutron (NTRN) Rewards.',
tooltip:
"Your deposit will earn additional Neutron (NTRN) Rewards. ATTENTION: Don't reduce or withdraw your position after depositing, as this would forfeit your NTRN rewards. You can still add to your position safely.",
enabledOnV1: true,
},
]
export function CampaignLogo({ campaignId }: { campaignId: AssetCampaignId }) {
switch (campaignId) {
case 'stride':
return <Stride />
case 'drop':
case 'drop_apy':
return <Droplet />
case 'lido':
return <Lido />
case 'milkyway':
return <MilkyWay />
case 'ntrn-rewards':
return <Neutron />
default:
return null
}
}