Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/lemon-pianos-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@venusprotocol/evm": minor
---

add hub info to Liquidity Hub page
104 changes: 72 additions & 32 deletions apps/evm/src/__mocks__/models/liquidityHubSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,135 +7,175 @@ import { busd, lisUsd, usdc, usdt, xvs } from './tokens';
export const xvsCoreSource: LiquidityHubSource = {
name: 'Core Pool',
address: '0x4000000000000000000000000000000000000001',
type: 'core',
allocationTokens: new BigNumber(8000),
allocationCents: new BigNumber(800000),
allocationCapPercentage: new BigNumber(55),
allocationCapTokens: new BigNumber(16000),
allocationCapCents: new BigNumber(1600000),
liquidityTokens: new BigNumber(6200),
liquidityCents: new BigNumber(620000),
supplyApyPercentage: new BigNumber(5.7),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.85),
dailyDistributedTokens: new BigNumber(0.03),
isActive: true,
},
],
collateralTokens: [xvs, usdc],
lockEndDate: new Date('2026-08-01T00:00:00.000Z'),
};

export const xvsFluxSource: LiquidityHubSource = {
name: 'Flux Vault',
address: '0x4000000000000000000000000000000000000002',
type: 'venusFlux',
allocationTokens: new BigNumber(7250),
allocationCents: new BigNumber(725000),
allocationCapPercentage: new BigNumber(45),
allocationCapTokens: new BigNumber(14500),
allocationCapCents: new BigNumber(1450000),
liquidityTokens: new BigNumber(5800),
liquidityCents: new BigNumber(580000),
supplyApyPercentage: new BigNumber(6.8),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(1.1),
dailyDistributedTokens: new BigNumber(0.03),
isActive: true,
},
],
collateralTokens: [xvs, usdt],
lockEndDate: new Date('2026-09-15T00:00:00.000Z'),
};

export const usdcCoreSource: LiquidityHubSource = {
name: 'Stable Core',
address: '0x4000000000000000000000000000000000000003',
type: 'core',
allocationTokens: new BigNumber(175000),
allocationCents: new BigNumber(17500000),
allocationCapPercentage: new BigNumber(60),
allocationCapTokens: new BigNumber(350000),
allocationCapCents: new BigNumber(35000000),
liquidityTokens: new BigNumber(140000),
liquidityCents: new BigNumber(14000000),
supplyApyPercentage: new BigNumber(3.9),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.45),
dailyDistributedTokens: new BigNumber(0.3),
isActive: true,
},
],
collateralTokens: [usdc, usdt, busd],
lockEndDate: new Date('2026-07-22T00:00:00.000Z'),
};

export const usdcFluxSource: LiquidityHubSource = {
name: 'Stable Flux',
address: '0x4000000000000000000000000000000000000004',
type: 'venusFlux',
allocationTokens: new BigNumber(175000),
allocationCents: new BigNumber(17500000),
allocationCapPercentage: new BigNumber(40),
allocationCapTokens: new BigNumber(350000),
allocationCapCents: new BigNumber(35000000),
liquidityTokens: new BigNumber(150000),
liquidityCents: new BigNumber(15000000),
supplyApyPercentage: new BigNumber(4.4),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.7),
dailyDistributedTokens: new BigNumber(0.47),
isActive: true,
},
],
collateralTokens: [usdc, lisUsd],
lockEndDate: new Date('2026-10-10T00:00:00.000Z'),
};

export const usdtCoreSource: LiquidityHubSource = {
name: 'USDT Core',
address: '0x4000000000000000000000000000000000000005',
type: 'core',
allocationTokens: new BigNumber(90000),
allocationCents: new BigNumber(9000000),
allocationCapPercentage: new BigNumber(50),
allocationCapTokens: new BigNumber(180000),
allocationCapCents: new BigNumber(18000000),
liquidityTokens: new BigNumber(76000),
liquidityCents: new BigNumber(7600000),
supplyApyPercentage: new BigNumber(4.3),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.55),
dailyDistributedTokens: new BigNumber(0.19),
isActive: true,
},
],
collateralTokens: [usdt, usdc],
lockEndDate: new Date('2026-08-20T00:00:00.000Z'),
};

export const usdtFluxSource: LiquidityHubSource = {
name: 'USDT Flux',
address: '0x4000000000000000000000000000000000000006',
type: 'venusFlux',
allocationTokens: new BigNumber(120000),
allocationCents: new BigNumber(12000000),
allocationCapPercentage: new BigNumber(50),
allocationCapTokens: new BigNumber(240000),
allocationCapCents: new BigNumber(24000000),
liquidityTokens: new BigNumber(90000),
liquidityCents: new BigNumber(9000000),
supplyApyPercentage: new BigNumber(5.1),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.9),
dailyDistributedTokens: new BigNumber(0.41),
isActive: true,
},
],
collateralTokens: [usdt, xvs],
lockEndDate: new Date('2026-11-01T00:00:00.000Z'),
};

export const busdCoreSource: LiquidityHubSource = {
name: 'Reserve Core',
address: '0x4000000000000000000000000000000000000007',
type: 'core',
allocationTokens: new BigNumber(100000),
allocationCents: new BigNumber(10000000),
allocationCapPercentage: new BigNumber(65),
allocationCapTokens: new BigNumber(200000),
allocationCapCents: new BigNumber(20000000),
liquidityTokens: new BigNumber(78000),
liquidityCents: new BigNumber(7800000),
supplyApyPercentage: new BigNumber(3.6),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.35),
dailyDistributedTokens: new BigNumber(0.14),
isActive: true,
},
],
collateralTokens: [busd, usdc],
lockEndDate: new Date('2026-07-30T00:00:00.000Z'),
};

export const busdFluxSource: LiquidityHubSource = {
name: 'Reserve Flux',
address: '0x4000000000000000000000000000000000000008',
type: 'venusFlux',
allocationTokens: new BigNumber(80000),
allocationCents: new BigNumber(8000000),
allocationCapPercentage: new BigNumber(35),
allocationCapTokens: new BigNumber(160000),
allocationCapCents: new BigNumber(16000000),
liquidityTokens: new BigNumber(63000),
liquidityCents: new BigNumber(6300000),
supplyApyPercentage: new BigNumber(4.2),
paused: false,
supplyTokenDistributions: [
{
type: 'venus',
token: xvs,
apyPercentage: new BigNumber(0.6),
dailyDistributedTokens: new BigNumber(0.18),
isActive: true,
},
],
collateralTokens: [busd, lisUsd],
lockEndDate: new Date('2026-09-05T00:00:00.000Z'),
};
Expand Down
161 changes: 161 additions & 0 deletions apps/evm/src/__mocks__/models/liquidityHubYieldGroups.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
import BigNumber from 'bignumber.js';

import type { LiquidityHubYieldGroup } from 'types';

import {
busdCoreSource,
busdFluxSource,
usdcCoreSource,
usdcFluxSource,
usdtCoreSource,
usdtFluxSource,
xvsCoreSource,
xvsFluxSource,
} from './liquidityHubSources';

export const xvsCoreYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000001',
type: 'venusCore',
name: 'Venus Core',
bgClassName: 'bg-blue',
allocationTokens: xvsCoreSource.allocationTokens,
allocationCents: xvsCoreSource.allocationCents,
allocationCapPercentage: new BigNumber(55),
allocationCapTokens: new BigNumber(16000),
allocationCapCents: xvsCoreSource.allocationCapCents,
liquidityTokens: xvsCoreSource.liquidityTokens,
liquidityCents: xvsCoreSource.liquidityCents,
averageSupplyApyPercentage: xvsCoreSource.supplyApyPercentage,
paused: false,
sources: [xvsCoreSource, busdCoreSource],
Comment thread
therealemjy marked this conversation as resolved.
};

export const xvsFluxYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000002',
type: 'venusFlux',
name: 'Venus Flux',
bgClassName: 'bg-yellow',
allocationTokens: xvsFluxSource.allocationTokens,
allocationCents: xvsFluxSource.allocationCents,
allocationCapPercentage: new BigNumber(45),
allocationCapTokens: new BigNumber(14500),
allocationCapCents: xvsFluxSource.allocationCapCents,
liquidityTokens: xvsFluxSource.liquidityTokens,
liquidityCents: xvsFluxSource.liquidityCents,
averageSupplyApyPercentage: xvsFluxSource.supplyApyPercentage,
paused: false,
sources: [xvsFluxSource],
};

export const usdcCoreYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000003',
type: 'venusCore',
name: 'Venus Core',
bgClassName: 'bg-blue',
allocationTokens: usdcCoreSource.allocationTokens,
allocationCents: usdcCoreSource.allocationCents,
allocationCapPercentage: new BigNumber(60),
allocationCapTokens: new BigNumber(350000),
allocationCapCents: usdcCoreSource.allocationCapCents,
liquidityTokens: usdcCoreSource.liquidityTokens,
liquidityCents: usdcCoreSource.liquidityCents,
averageSupplyApyPercentage: usdcCoreSource.supplyApyPercentage,
paused: false,
sources: [usdcCoreSource],
};

export const usdcFluxYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000004',
type: 'venusFlux',
name: 'Venus Flux',
bgClassName: 'bg-yellow',
allocationTokens: usdcFluxSource.allocationTokens,
allocationCents: usdcFluxSource.allocationCents,
allocationCapPercentage: new BigNumber(40),
allocationCapTokens: new BigNumber(350000),
allocationCapCents: usdcFluxSource.allocationCapCents,
liquidityTokens: usdcFluxSource.liquidityTokens,
liquidityCents: usdcFluxSource.liquidityCents,
averageSupplyApyPercentage: usdcFluxSource.supplyApyPercentage,
paused: false,
sources: [usdcFluxSource],
};

export const usdtCoreYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000005',
type: 'venusCore',
name: 'Venus Core',
bgClassName: 'bg-blue',
allocationTokens: usdtCoreSource.allocationTokens,
allocationCents: usdtCoreSource.allocationCents,
allocationCapPercentage: new BigNumber(50),
allocationCapTokens: new BigNumber(180000),
allocationCapCents: usdtCoreSource.allocationCapCents,
liquidityTokens: usdtCoreSource.liquidityTokens,
liquidityCents: usdtCoreSource.liquidityCents,
averageSupplyApyPercentage: usdtCoreSource.supplyApyPercentage,
paused: false,
sources: [usdtCoreSource],
};

export const usdtFluxYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000006',
type: 'venusFlux',
name: 'Venus Flux',
bgClassName: 'bg-yellow',
allocationTokens: usdtFluxSource.allocationTokens,
allocationCents: usdtFluxSource.allocationCents,
allocationCapPercentage: new BigNumber(50),
allocationCapTokens: new BigNumber(240000),
allocationCapCents: usdtFluxSource.allocationCapCents,
liquidityTokens: usdtFluxSource.liquidityTokens,
liquidityCents: usdtFluxSource.liquidityCents,
averageSupplyApyPercentage: usdtFluxSource.supplyApyPercentage,
paused: false,
sources: [usdtFluxSource],
};

export const busdCoreYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000007',
type: 'venusCore',
name: 'Venus Core',
bgClassName: 'bg-blue',
allocationTokens: busdCoreSource.allocationTokens,
allocationCents: busdCoreSource.allocationCents,
allocationCapPercentage: new BigNumber(65),
allocationCapTokens: new BigNumber(200000),
allocationCapCents: busdCoreSource.allocationCapCents,
liquidityTokens: busdCoreSource.liquidityTokens,
liquidityCents: busdCoreSource.liquidityCents,
averageSupplyApyPercentage: busdCoreSource.supplyApyPercentage,
paused: false,
sources: [busdCoreSource],
};

export const busdFluxYieldGroup: LiquidityHubYieldGroup = {
address: '0x5000000000000000000000000000000000000008',
type: 'venusFlux',
name: 'Venus Flux',
bgClassName: 'bg-yellow',
allocationTokens: busdFluxSource.allocationTokens,
allocationCents: busdFluxSource.allocationCents,
allocationCapPercentage: new BigNumber(35),
allocationCapTokens: new BigNumber(160000),
allocationCapCents: busdFluxSource.allocationCapCents,
liquidityTokens: busdFluxSource.liquidityTokens,
liquidityCents: busdFluxSource.liquidityCents,
averageSupplyApyPercentage: busdFluxSource.supplyApyPercentage,
paused: false,
sources: [busdFluxSource],
};

export const liquidityHubYieldGroups = [
xvsCoreYieldGroup,
xvsFluxYieldGroup,
usdcCoreYieldGroup,
usdcFluxYieldGroup,
usdtCoreYieldGroup,
usdtFluxYieldGroup,
busdCoreYieldGroup,
busdFluxYieldGroup,
];
Loading
Loading