Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Airdrop #11

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/assets/data/contracts/telos.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"ManagedPoolAddRemoveTokenLib": "0x4fE18fde71267c46d6DDeecc412cd498e88b39Cb",
"ManagedPoolAmmLib": "0x611b8E5c7ec8ee0c7bD5f2B6E9DfD44fbED8A427",
"ManagedPoolFactory": "0x4eD870363d69F0f2c565332342eFC68ca82b544b",
"MerkleOrchard": "0x4C8Aa9ce762412dB5a2e874Ab4e40d312f19fa52",
"MockComposableStablePool": "0x8Fb9AE94AC6869Bb10C0eb46Fb2500Ffe2706dBe",
"MockLiquidityBootstrappingPool": "0xF6EC5e013f9bA2FcA745eab980F24e298D78fce4",
"MockManagedPool": "0xC07951543C0b961e64CF96225151a51BFC380246",
Expand All @@ -20,6 +21,7 @@
"ProtocolFeePercentagesProvider": "0x4e4131dC27ed9501ac5fEb76F94572fDAe9f0fD0",
"ProtocolFeesCollector": "0x61497C44c7Cb9C3eab99Ef20f58863414A5665d2",
"RecoveryModeHelper": "0x45a2992e1bFdCF9b9AcE0a84A238f2E56F481816",
"SmartWalletChecker": "0x434a833edbe4A88AD48ddf99e72ed4b148960B6E",
"SymmToken": "0xd5f2a24199C3DFc44C1Bf8B1C01aB147809434Ca",
"TestBalancerToken": "0xFEF39453770fF2C6b2F453D1b6D075623a79e3Eb",
"Vault": "0xbccc4b4c6530F82FE309c5E845E50b5E9C89f2AD",
Expand Down
56 changes: 45 additions & 11 deletions src/components/contextual/pages/claim/HeroClaim.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

type Props = {
title: string;
description: string;
};

defineProps<Props>();

function navigateToGetVeBAL() {
router.push({
name: 'get-vtsymm',
query: {
returnRoute: 'vtsymm',
},
});
}
</script>

<template>
Expand All @@ -18,6 +31,27 @@ defineProps<Props>();
<p class="max-w-3xl body-text text-shadow">
{{ description }}
</p>
<div class="flex mt-6">
<BalBtn class="mr-3 hero-btn btn-gold" @click="navigateToGetVeBAL">
{{ $t('veBAL.hero.buttons.getVeBAL') }}
</BalBtn>
<BalBtn
tag="a"
href="https://medium.com/@Symmetric.Finance/introducing-tsymm-and-vtsymm-120bfe2d60c0"
target="_blank"
rel="noreferrer"
color="white"
class="hero-btn"
outline
>
{{ $t('veBAL.hero.buttons.learnMore') }}
<BalIcon
name="arrow-up-right"
size="sm"
class="ml-px group-hover:text-pink-500 transition-colors"
/>
</BalBtn>
</div>
</div>
</div>
<div class="hero-graphic-container">
Expand All @@ -32,16 +66,16 @@ defineProps<Props>();
src="@/assets/images/icons/claims-header/add-liquidity.svg"
/>
<p class="font-semibold tip-label text-shadow">
{{ $t('claimHero.tipLabel.addLiquidity') }}
<BalTooltip
{{ $t('claimHero.airdropTipLabel.addLiquidity') }}
<!-- <BalTooltip
iconSize="xs"
textAlign="left"
class="relative top-px"
iconClass="text-white"
width="60"
>
{{ $t('claimHero.tips.addLiquidity') }}
</BalTooltip>
</BalTooltip> -->
</p>
</div>
<div class="group tip">
Expand All @@ -52,19 +86,19 @@ defineProps<Props>();
src="@/assets/images/icons/claims-header/stake.svg"
/>
<p class="font-semibold tip-label text-shadow">
{{ $t('claimHero.tipLabel.stake') }}
<BalTooltip
{{ $t('claimHero.airdropTipLabel.stake') }}
<!-- <BalTooltip
iconSize="xs"
textAlign="left"
class="relative top-px"
iconClass="text-white"
width="60"
>
{{ $t('claimHero.tips.stake') }}
</BalTooltip>
</BalTooltip> -->
</p>
</div>
<div class="group tip">
<!-- <div class="group tip">
<img
width="144"
height="144"
Expand All @@ -83,7 +117,7 @@ defineProps<Props>();
{{ $t('claimHero.tips.boost') }}
</BalTooltip>
</p>
</div>
</div> -->
<div class="group tip">
<img
width="144"
Expand All @@ -92,16 +126,16 @@ defineProps<Props>();
src="@/assets/images/icons/claims-header/claim.svg"
/>
<p class="font-semibold tip-label text-shadow">
{{ $t('claimHero.tipLabel.claim') }}
<BalTooltip
{{ $t('claimHero.airdropTipLabel.claim') }}
<!-- <BalTooltip
iconSize="xs"
textAlign="left"
class="relative top-px"
iconClass="text-white"
width="60"
>
{{ $t('claimHero.tips.claim') }}
</BalTooltip>
</BalTooltip> -->
</p>
</div>
</div>
Expand Down
9 changes: 8 additions & 1 deletion src/components/contextual/pages/claim/LegacyClaims.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ const BALTokenPlaceholder = computed<ClaimableToken>(() => ({
fiatValue: '0',
}));

const TLOSTokenPlaceholder = computed<ClaimableToken>(() => ({
token: '0xD102cE6A4dB07D247fcc28F366A623Df0938CA9E',
symbol: 'WTLOS',
amount: '0',
fiatValue: '0',
}));

const isLoading = computed((): boolean => isQueryLoading(userClaimsQuery));

const userClaims = computed(() =>
Expand All @@ -89,7 +96,7 @@ const claimableTokens = computed<ClaimableToken[]>(() => {
})
);
}
return [BALTokenPlaceholder.value];
return [BALTokenPlaceholder.value, TLOSTokenPlaceholder.value];
});

const totalClaimableTokensFiatValue = computed(() =>
Expand Down
10 changes: 8 additions & 2 deletions src/components/navs/AppNav/AppSidebar/SidebarContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import DiscordIcon from '@/components/_global/icons/brands/DiscordIcon.vue';
import MediumIcon from '@/components/_global/icons/brands/MediumIcon.vue';
// import YoutubeIcon from '@/components/_global/icons/brands/YoutubeIcon.vue';
import GithubIcon from '@/components/_global/icons/brands/GithubIcon.vue';
import { isVeBalSupported, isGaugesSupported } from '@/composables/useVeBAL';
import { isVeBalSupported } from '@/composables/useVeBAL';

/**
* PROPS & EMITS
Expand Down Expand Up @@ -45,7 +45,7 @@ const navLinks = [
label: t('claim'),
path: `/${networkSlug}/claim`,
goal: Goals.ClickNavClaim,
hide: !isGaugesSupported,
hide: true,
},
{
label: t('portfolio'),
Expand All @@ -58,6 +58,12 @@ const navLinks = [
goal: Goals.ClickNavVebal,
hide: !isVeBalSupported,
},
{
label: 'Airdrop',
path: `/${networkSlug}/airdrop`,
goal: Goals.ClickNavVebal,
hide: !isVeBalSupported,
},
];

// const ecosystemLinks = [
Expand Down
9 changes: 9 additions & 0 deletions src/components/navs/AppNav/DesktopLinks/DesktopLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ function isActive(page: string): boolean {
>
vTSYMM
</DesktopLinkItem>
<DesktopLinkItem
v-if="isVeBalSupported"
:to="{ name: 'airdrop', params: { networkSlug } }"
:active="isActive('airdrop')"
prefetch
@click="trackGoal(Goals.ClickNavVebal)"
>
Airdrop
</DesktopLinkItem>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions src/lib/config/telos/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as telos from '@/assets/data/contracts/telos.json';
const contracts: Contracts = {
merkleRedeem: '',
merkleOrchard: '',
merkleOrchardV2: '',
merkleOrchardV2: telos.MerkleOrchard,
multicall: '0xca11bde05977b3631167028862be2a173976ca11',
authorizer: telos.Authorizer,
vault: telos.Vault,
Expand All @@ -14,7 +14,7 @@ const contracts: Contracts = {
balancerHelpers: telos.BalancerHelpers,
balancerQueries: telos.BalancerQueries,
batchRelayer: telos.BalancerRelayer,
veBAL: '',
veBAL: telos.VotingEscrow,
gaugeController: '',
gaugeFactory: '',
balancerMinter: '',
Expand Down
1 change: 1 addition & 0 deletions src/lib/config/telos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const config: Config = {
explorerName: 'Teloscan',
subgraph:
'https://thegraph.telos.net/subgraphs/name/symmetric-telos/symmetric-telos-graph',

balancerApi: '',
poolsUrlV2:
'https://storageapi.fleek.co/johngrantuk-team-bucket/poolsV2.json',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/telos/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Pools } from '@/types/pools';

const pools: Pools = {
IdsMap: {
veBAL: '',
veBAL: '0xbf0fa44e5611c31429188b7dcc59ffe794d1980e000200000000000000000009',
},
Pagination: {
PerPage: 10,
Expand Down
18 changes: 18 additions & 0 deletions src/lib/scripts/addresses-temp.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@
],
"status": "ACTIVE"
},
"20220420-smart-wallet-checker": {
"contracts": [
{
"name": "SmartWalletChecker",
"address": "0x434a833edbe4A88AD48ddf99e72ed4b148960B6E"
}
],
"status": "ACTIVE"
},
"20220721-balancer-queries": {
"contracts": [
{
Expand All @@ -87,6 +96,15 @@
],
"status": "ACTIVE"
},
"20230222-merkle-orchard-v2": {
"contracts": [
{
"name": "MerkleOrchard",
"address": "0x4C8Aa9ce762412dB5a2e874Ab4e40d312f19fa52"
}
],
"status": "ACTIVE"
},
"20230314-batch-relayer-v5": {
"contracts": [
{
Expand Down
12 changes: 9 additions & 3 deletions src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,21 @@
"claim": "Claim",
"claimHero": {
"title": "Claim liquidity incentives",
"legacyTitle": "Claim legacy incentives",
"legacyTitle": "Initial Liquidity Airdrop",
"description": "Symmetric Protocol liquidity incentives are directed to pools by vTSYMM voters. Stake in these pools to earn incentives. Boost with vTSYMM for up to 2.5x extra.",
"legacyDescription": "Liquidity mining incentive systems before the launch of ve8020-tokenomics have been deprecated. If you provided liquidity before this change and have outstanding incentives you can claim them here.",
"legacyDescription": "From November 27th to December 1st, Symmetric is conducting an exciting Airdrop event, offering a chance to share in a pool of $3,000 in tSYMM tokens and $3,000 in TLOS. This opportunity is open to users who lock their tSYMM/WTLOS 80/20 LP tokens in exchange for vtSYMM. The total amount available for distribution will be determined by the overall liquidity locked, ensuring a fair and proportional reward for vtSYMM holders. This distribution will be calculated based on the amount and duration of LP tokens locked, with the final snapshot scheduled for December 1, 2024, at 4:00 PM UTC. It's a fantastic opportunity to increase your holdings with minimal effort. Join in and make the most of this offer!",
"tipLabel": {
"addLiquidity": "Add liquidity",
"stake": "Stake your LP",
"boost": "Get a boost",
"claim": "Claim anytime"
},
"airdropTipLabel": {
"addLiquidity": "Add liquidity to the tSYMM/WTLOS pool",
"stake": "Lock your LP tokens to get vtSYMM",
"boost": "Get a boost",
"claim": "Receive tSYMM and TLOS rewards"
},
"tips": {
"addLiquidity": "To earn liquidity mining incentives, add liquidity to eligible pools across Telos. Note: You'll earn swap fees with or without staking but you don't need to claim these as they are automatically added to your position.",
"stake": "If you've provided liquidity in an eligible pool, you'll have an option to stake your Liquidity Provider (LP) tokens from that pool. Stake them to receive liquidity mining incentives in addition to any swap fees.",
Expand Down Expand Up @@ -761,7 +767,7 @@
"description": "Incentives to attract liquidity are set by the Symmetric protocol and partners. Stakers in eligible pools can claim incentives every block. People with vTSYMM get a boosted rate—up to 2.5x extra.",
"titles": {
"incentivesOnOtherNetworks": "Incentives on other networks",
"legacyIncentives": "Legacy incentives"
"legacyIncentives": "Claim your Airdrop"
},
"btns": {
"claimOn": "Claim on"
Expand Down
41 changes: 4 additions & 37 deletions src/pages/claim/legacy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,15 @@ import HeroClaim from '@/components/contextual/pages/claim/HeroClaim.vue';
import LegacyClaims from '@/components/contextual/pages/claim/LegacyClaims.vue';
import { MerkleOrchardVersion } from '@/services/claim/claim.service';
import useWeb3 from '@/services/web3/useWeb3';
import {
isArbitrum,
isMainnet,
isGoerli,
isPolygon,
} from '@/composables/useNetwork';

/**
* COMPOSABLES
*/
const { isWalletReady, account } = useWeb3();
const { isWalletReady } = useWeb3();

/**
* COMPUTED
*/
const legacyClaimUI = computed(() => {
if (isMainnet.value) {
return [
{ token: '$BAL', subdomain: 'claim' },
{ token: '$VITA', subdomain: 'claim-vita' },
{ token: '$LDO', subdomain: 'claim-lido' },
];
} else if (isArbitrum.value) {
return [
{ token: '$BAL', subdomain: 'claim-arbitrum' },
{ token: '$MCDEX', subdomain: 'claim-mcdex' },
{ token: '$PICKLE', subdomain: 'claim-pickle' },
];
}

return [];
});
</script>

<template>
Expand All @@ -50,23 +27,13 @@ const legacyClaimUI = computed(() => {
{{ $t('pages.claim.titles.legacyIncentives') }}
</h2>

<h3 class="mt-8 font-body text-lg font-semibold">
Merkle Orchard V1
</h3>
<LegacyClaims
:merkleOrchardVersion="MerkleOrchardVersion.V1"
class="mt-2"
/>

<h3 class="mt-8 font-body text-lg font-semibold">
Merkle Orchard V2
</h3>
<h3 class="mt-8 font-body text-lg font-semibold">Rewards</h3>
<LegacyClaims
:merkleOrchardVersion="MerkleOrchardVersion.V2"
class="mt-2"
/>

<div class="mb-4">
<!-- <div class="mb-4">
<div class="mb-2 font-semibold">
Looking for other claimable tokens?
</div>
Expand Down Expand Up @@ -134,7 +101,7 @@ const legacyClaimUI = computed(() => {
</template>
</li>
</ul>
</div>
</div> -->
</div>
</template>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ const routes: RouteRecordRaw[] = [
component: ClaimPage,
},
{
path: '/:networkSlug/claim/legacy',
name: 'legacy-claim',
path: '/:networkSlug/airdrop',
name: 'airdrop',
component: LegacyClaimPage,
},
{
Expand Down
Loading