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

Add Velocimeter BVM & CVM #1202

Merged
merged 2 commits into from
Aug 9, 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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
"mainnet:sushi:add": "ts-node scripts/add-farm.ts --network ethereum --project sushi --newFee true --pool",
"mainnet:verse:add": "ts-node scripts/add-quick.ts --network ethereum --project verse --pool",
"arbitrum:solidlizard:add": "ts-node scripts/add-solidly.ts --network arbitrum --project solidlizard --newFee true --lp",
"base:bvm:add": "ts-node scripts/add-solidly.ts --network base --project bvm --newFee true --lp",
"bsc:pancake:add": "ts-node scripts/add-sushi.ts --network bsc --project pancake --newFee true",
"bsc:ape:add": "ts-node scripts/add-farm.ts --network bsc --project ape",
"bsc:biswap:add": "ts-node scripts/add-farm.ts --network bsc --project biswap",
"bsc:swapfish:add": "ts-node scripts/add-farm.ts --network bsc --project swapfishBsc --newFee true",
"bsc:thena:add": "ts-node scripts/add-solidly.ts --network bsc --project thena --newFee true --lp",
"bsc:thena:gamma:add": "ts-node scripts/add-gamma.ts --network bsc --project thena --lp",
"canto:velocimeter:add": "ts-node scripts/add-solidly.ts --network canto --project velocimeter --newFee true --lp",
"canto:cvm:add": "ts-node scripts/add-solidly.ts --network canto --project cvm --newFee true --lp",
"fantom:spooky:add": "ts-node scripts/add-farm.ts --network fantom --project spooky",
"fantom:spiritv:add": "ts-node scripts/add-solidly.ts --network fantom --project spiritVolatile --newFee true",
"fantom:spirits:add": "ts-node scripts/add-solidly.ts --network fantom --project spiritStable --newFee true",
Expand Down
2 changes: 2 additions & 0 deletions packages/address-book/address-book/base/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { beefyfinance } from './platforms/beefyfinance';
import { balancer } from './platforms/balancer';
import { baseSwap } from './platforms/baseSwap';
import { bvm } from './platforms/bvm';
import { tokens } from './tokens/tokens';
import { convertSymbolTokenMapToAddressTokenMap } from '../../util/convertSymbolTokenMapToAddressTokenMap';
import Chain from '../../types/chain';
Expand All @@ -11,6 +12,7 @@ const _base = {
beefyfinance,
balancer,
baseSwap,
bvm,
},
tokens,
tokenAddressMap: convertSymbolTokenMapToAddressTokenMap(tokens),
Expand Down
4 changes: 4 additions & 0 deletions packages/address-book/address-book/base/platforms/bvm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const bvm = {
router: '0xE11b93B61f6291d35c5a2beA0A9fF169080160cF',
voter: '0xab9B68c9e53c94D7c0949FB909E80e4a29F9134A',
} as const;
24 changes: 24 additions & 0 deletions packages/address-book/address-book/base/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,30 @@ const _tokens = {
description:
'Balancer composable pool that consist of USDbC and DAI. bbTokens are boosted linear pools.',
},
BVM: {
name: 'Base Velocimeter',
symbol: 'BVM',
address: '0xd386a121991E51Eab5e3433Bf5B1cF4C8884b47a',
chainId: 8453,
decimals: 18,
logoURI: '',
website: 'https://base.velocimeter.xyz',
description:
'BVM is the native token for Velocimeter on Base (BVM), a project providing liquidity on the chain where it is needed most. The BVM token can be staked as or locked to earn rewards on the BVM platform.',
documentation: 'https://docs.velocimeter.xyz/FVMtokenomics',
},
oBVM: {
name: 'Option to buy BVM',
symbol: 'oBVM',
address: '0x762eb51D2e779EeEc9B239FFB0B2eC8262848f3E',
chainId: 8453,
decimals: 18,
logoURI: '',
website: 'https://base.velocimeter.xyz',
description:
'oBVM is an options token that helps to reduce sell pressure on the native BVM token. It is earned by liquidity providers (LPs) who provide liquidity to the BVM pools. oBVM can be redeemed for BVM at a discount, or it can be locked up for a period of time as veBVM. veBVM is a governance token that allows holders to vote on the distribution of emissions, as well as receive weekly bribes and fees.',
documentation: 'https://docs.velocimeter.xyz/oFVMmech',
},
} as const;

export const tokens: ConstRecord<typeof _tokens, Token> = _tokens;
2 changes: 2 additions & 0 deletions packages/address-book/address-book/canto/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { beefyfinance } from './platforms/beefyfinance';
import { velocimeter } from './platforms/velocimeter';
import { cvm } from './platforms/cvm';
import { tokens } from './tokens/tokens';
import { convertSymbolTokenMapToAddressTokenMap } from '../../util/convertSymbolTokenMapToAddressTokenMap';
import Chain from '../../types/chain';
Expand All @@ -9,6 +10,7 @@ const _canto = {
platforms: {
beefyfinance,
velocimeter,
cvm,
},
tokens,
tokenAddressMap: convertSymbolTokenMapToAddressTokenMap(tokens),
Expand Down
4 changes: 4 additions & 0 deletions packages/address-book/address-book/canto/platforms/cvm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const cvm = {
router: '0x2c8F86334552d062A0d7465C7f524eff15AB046c',
voter: '0xd5FA5bfd83ea4A088a3A28E12AD6494750aC7B8c',
} as const;
24 changes: 24 additions & 0 deletions packages/address-book/address-book/canto/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,30 @@ const _tokens = {
bridge: 'native',
documentation: 'https://docs.scanto.io/governance-token',
},
CVM: {
name: 'Canto Velocimeter',
symbol: 'CVM',
address: '0xbAD86785eB08fe9d0948B7D9d24523000A177cD0',
chainId: 7700,
decimals: 18,
logoURI: '',
website: 'https://cantov3.velocimeter.xyz',
description:
'CVM is the native token for Velocimeter on Canto (CVM), a project providing liquidity on the chain where it is needed most. The CVM token can be staked as or locked to earn rewards on the CVM platform.',
documentation: 'https://docs.velocimeter.xyz/FVMtokenomics',
},
oCVM: {
name: 'Option to buy CVM',
symbol: 'oCVM',
address: '0x5C2a258A169Fd683e784686E606E33f6D8c31b9a',
chainId: 7700,
decimals: 18,
logoURI: '',
website: 'https://cantov3.velocimeter.xyz',
description:
'oCVM is an options token that helps to reduce sell pressure on the native CVM token. It is earned by liquidity providers (LPs) who provide liquidity to the CVM pools. oCVM can be redeemed for CVM at a discount, or it can be locked up for a period of time as veCVM. veCVM is a governance token that allows holders to vote on the distribution of emissions, as well as receive weekly bribes and fees.',
documentation: 'https://docs.velocimeter.xyz/oFVMmech',
},
} as const;

export const tokens: ConstRecord<typeof _tokens, Token> = _tokens;
2 changes: 1 addition & 1 deletion packages/address-book/address-book/fantom/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ const _tokens = {
website: 'https://www.fvm.exchange',
bridge: 'native',
description:
'oFVM is a new options token that helps to reduce sell pressure on the native FVM token. It is earned by liquidity providers (LPs) who provide liquidity to the FVM-FTM pool. oFVM can be redeemed for FVM at a discount, or it can be locked up for a period of time as veFVM. veFVM is a governance token that allows holders to vote on the distribution of emissions, as well as receive weekly bribes and fees.',
'oFVM is an options token that helps to reduce sell pressure on the native FVM token. It is earned by liquidity providers (LPs) who provide liquidity to the FVM pools. oFVM can be redeemed for FVM at a discount, or it can be locked up for a period of time as veFVM. veFVM is a governance token that allows holders to vote on the distribution of emissions, as well as receive weekly bribes and fees.',
documentation: 'https://docs.velocimeter.xyz/oFVMmech',
},
} as const;
Expand Down
21 changes: 15 additions & 6 deletions scripts/add-solidly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {
platforms: { solidlizard },
},
canto: {
platforms: { velocimeter },
platforms: { cvm },
},
kava: {
platforms: { equilibre },
Expand All @@ -45,6 +45,9 @@ const {
arbitrum: {
platforms: { ramses, chronos },
},
base: {
platforms: { bvm },
},
} = addressBook;

const projects = {
Expand Down Expand Up @@ -112,11 +115,11 @@ const projects = {
volatileFile: '../src/data/arbitrum/solidlizardLpPools.json',
voter: solidlizard.voter,
},
velocimeter: {
prefix: 'velocimeterv2',
stableFile: '../src/data/canto/velocimeterV2StableLpPools.json',
volatileFile: '../src/data/canto/velocimeterV2LpPools.json',
voter: velocimeter.voter,
cvm: {
prefix: 'cvm',
stableFile: '../src/data/canto/cvmStableLpPools.json',
volatileFile: '../src/data/canto/cvmLpPools.json',
voter: cvm.voter,
},
velocore: {
prefix: 'velocore',
Expand Down Expand Up @@ -148,6 +151,12 @@ const projects = {
volatileFile: '../src/data/arbitrum/chronosLpPools.json',
voter: chronos.voter,
},
bvm: {
prefix: 'bvm',
stableFile: '../src/data/base/bvmStableLpPools.json',
volatileFile: '../src/data/base/bvmLpPools.json',
voter: bvm.voter,
},
};

const args = yargs.options({
Expand Down
25 changes: 25 additions & 0 deletions src/api/stats/base/getBvmApys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { BASE_CHAIN_ID: chainId } = require('../../../constants');
const { getSolidlyGaugeApys } = require('../common/getSolidlyGaugeApys');

const volatilePools = require('../../../data/base/bvmLpPools.json');
import { addressBook } from '../../../../packages/address-book/address-book';
const {
base: {
tokens: { BVM },
},
} = addressBook;

const pools = [...volatilePools];
const getBvmApys = async () =>
getSolidlyGaugeApys({
chainId: chainId,
pools: pools,
oracleId: 'oBVM',
oracle: 'tokens',
decimals: '1e18',
reward: BVM.address,
boosted: false,
// log: true,
});

module.exports = getBvmApys;
3 changes: 2 additions & 1 deletion src/api/stats/base/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const getBalancerBaseApys = require('./getBalancerApys');
const getBaseSwapApys = require('./getBaseSwapApys');
const getStargateBaseApys = require('./getStargateBaseApys');
const getBvmApys = require('./getBvmApys');

const getApys = [getBalancerBaseApys, getBaseSwapApys, getStargateBaseApys];
const getApys = [getBalancerBaseApys, getBaseSwapApys, getStargateBaseApys, getBvmApys];

const getBaseApys = async () => {
const start = Date.now();
Expand Down
25 changes: 25 additions & 0 deletions src/api/stats/canto/getCvmApys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { CANTO_CHAIN_ID: chainId } = require('../../../constants');
const { getSolidlyGaugeApys } = require('../common/getSolidlyGaugeApys');

const volatilePools = require('../../../data/canto/cvmLpPools.json');
import { addressBook } from '../../../../packages/address-book/address-book';
const {
canto: {
tokens: { CVM },
},
} = addressBook;

const pools = [...volatilePools];
const getCvmApys = async () =>
getSolidlyGaugeApys({
chainId: chainId,
pools: pools,
oracleId: 'oCVM',
oracle: 'tokens',
decimals: '1e18',
reward: CVM.address,
boosted: false,
// log: true,
});

module.exports = getCvmApys;
9 changes: 8 additions & 1 deletion src/api/stats/canto/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
const getCantoLpApys = require('./getCantoLpApys');
const getVelocimeterApys = require('./getVelocimeterApys');
const getCvmApys = require('./getCvmApys');
const getCantoBifiGovApy = require('./getCantoBifiGovApy');
const { getCantoBifiMaxiApy } = require('./getCantoBifiMaxiApy');

const getApys = [getCantoLpApys, getVelocimeterApys, getCantoBifiGovApy, getCantoBifiMaxiApy];
const getApys = [
getCantoLpApys,
getVelocimeterApys,
getCvmApys,
getCantoBifiGovApy,
getCantoBifiMaxiApy,
];

const getCantoApys = async () => {
const start = Date.now();
Expand Down
4 changes: 4 additions & 0 deletions src/api/stats/getAmmPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ import velocorePools from '../../data/zksync/velocoreLpPools.json';
import soliSnekPools from '../../data/avax/soliSnekLpPools.json';
import veSyncPools from '../../data/zksync/veSyncLpPools.json';
import fvmPools from '../../data/fantom/fvmLpPools.json';
import bvmPools from '../../data/base/bvmLpPools.json';
import cvmPools from '../../data/canto/cvmLpPools.json';
import baseSwapPools from '../../data/base/baseSwapLpPools.json';
import ooeV2Pools from '../../data/bsc/ooeV2LpPools.json';
import { fetchVaultPrices } from '../../utils/fetchVaultPrices';
Expand All @@ -293,6 +295,8 @@ const pools = normalizePoolOracleIds([
...ooeV2Pools,
...baseSwapPools,
...fvmPools,
...bvmPools,
...cvmPools,
...veSyncPools,
...soliSnekPools,
...velocorePools,
Expand Down
62 changes: 62 additions & 0 deletions src/data/base/bvmLpPools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
"name": "bvm-weth-axlusdc",
"address": "0x1c2f16EB9E2C18a87037194c5EA00F569953A1cc",
"gauge": "0x5B21fBab44dDbcd2B73d5Ec34c37250e6A73fE94",
"decimals": "1e18",
"chainId": 8453,
"beefyFee": 0.095,
"lp0": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
},
"lp1": {
"address": "0xEB466342C4d449BC9f53A865D5Cb90586f405215",
"oracle": "tokens",
"oracleId": "axlUSDC",
"decimals": "1e6"
}
},
{
"name": "bvm-weth-usdbc",
"address": "0x6546ecac3F80E041006eDc3Da891adcE567B40B8",
"gauge": "0xf5f51a14587B02FDD1a7b4B538Ea8e8d6c618FA5",
"decimals": "1e18",
"chainId": 8453,
"beefyFee": 0.095,
"lp0": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
},
"lp1": {
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"oracle": "tokens",
"oracleId": "USDbC",
"decimals": "1e6"
}
},
{
"name": "bvm-weth-bvm",
"address": "0x53713F956A4DA3F08B55A390B20657eDF9E0897B",
"gauge": "0x3f5129112754D4fBE7ab228C2D5E312b2Bc79A06",
"decimals": "1e18",
"chainId": 8453,
"beefyFee": 0.095,
"lp0": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
},
"lp1": {
"address": "0xd386a121991E51Eab5e3433Bf5B1cF4C8884b47a",
"oracle": "tokens",
"oracleId": "BVM",
"decimals": "1e18"
}
}
]
42 changes: 42 additions & 0 deletions src/data/canto/cvmLpPools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"name": "cvm-scanto-cvm",
"address": "0xf976E39201bD847D38B92A6b19b5106809C09391",
"gauge": "0x59314fE93468141b143B549dAad76Ec959B269D6",
"decimals": "1e18",
"chainId": 7700,
"beefyFee": 0.095,
"lp0": {
"address": "0x9F823D534954Fc119E31257b3dDBa0Db9E2Ff4ed",
"oracle": "tokens",
"oracleId": "sCANTO",
"decimals": "1e18"
},
"lp1": {
"address": "0xbAD86785eB08fe9d0948B7D9d24523000A177cD0",
"oracle": "tokens",
"oracleId": "CVM",
"decimals": "1e18"
}
},
{
"name": "cvm-wcanto-scanto",
"address": "0xa934F9F89b085332181267C0EcE69E9b2Ce745C8",
"gauge": "0x319aCC5A29E13e45f77b5320eC8f2d2c735259dB",
"decimals": "1e18",
"chainId": 7700,
"beefyFee": 0.095,
"lp0": {
"address": "0x826551890Dc65655a0Aceca109aB11AbDbD7a07B",
"oracle": "tokens",
"oracleId": "WCANTO",
"decimals": "1e18"
},
"lp1": {
"address": "0x9F823D534954Fc119E31257b3dDBa0Db9E2Ff4ed",
"oracle": "tokens",
"oracleId": "sCANTO",
"decimals": "1e18"
}
}
]
Loading
Loading