Skip to content

Commit

Permalink
Add compound vaults on Base
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptJS13 committed Aug 31, 2023
1 parent da78afd commit f553ba2
Show file tree
Hide file tree
Showing 8 changed files with 2,270 additions and 22 deletions.
1 change: 1 addition & 0 deletions data/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const ESTIMATED_APY_TYPES = {
CAMELOT_LP: 'CAMELOT_LP',
BASESWAP: 'BASESWAP',
BASESWAP_V2: 'BASESWAP_V2',
COMPOUND_V3: 'COMPOUND_V3',
}

const COLLATERAL_TYPE = {
Expand Down
15 changes: 15 additions & 0 deletions data/mainnet/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,7 @@
"BSX": "0xd5046B976188EB40f6DE40fB527F89c05b323385",
"axlUSDC": "0xEB466342C4d449BC9f53A865D5Cb90586f405215",
"GOLD": "0xbeFD5C25A59ef2C1316c5A4944931171F30Cd3E4",
"COMP": "0x9e1028F5F1D5eDE59748FFceE5532509976840E0",
"V2": {
"balancer_BALD_WETH": {
"Underlying": "0x868F0Efc81A6c1DF16298Dcc82f7926B9099946B",
Expand Down Expand Up @@ -2552,6 +2553,20 @@
"NewStrategy": "0x1c2045ede183BD64bf67475b33d2a544a8de1a2d",
"NewPool": "0xe3C8B0Fc0936Fee797873011ddd0D3a70E6Fc7AC",
"NFTPool": "0x7C04bF2bb7D27982810E432B188FA0C7729e651d"
},
"USDC": {
"Underlying": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"NewVault": "0xcf58a2fEc96fFDF11B0dFA1ed15433b488485cf3",
"NewStrategy": "0x8EAbe374666441d6373D8bE0478aB2F4E04DDAa5",
"NewPool": "0x4B0A8DFd3bBEEab835E8B5Dc453822490A93c32e",
"Market": "0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"
},
"WETH": {
"Underlying": "0x4200000000000000000000000000000000000006",
"NewVault": "0xc7548d8D7560f6679e369d0556C44Fe1EDdea3E9",
"NewStrategy": "0x69A3b1F2e133715282009be67d98BEb9247d0Bd5",
"NewPool": "0xE155314952b3190E37e89e472e62112D2661551b",
"Market": "0x46e6b214b524310239732D51387075E0e70970bf"
}
}
}
Expand Down
42 changes: 42 additions & 0 deletions data/mainnet/pools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@ const addresses = require('./addresses.json')
const strat15PercentFactor = '0.85'

module.exports = [
{
chain: CHAIN_IDS.BASE,
id: 'USDC_base',
type: POOL_TYPES.INCENTIVE,
contractAddress: addresses.BASE.V2.USDC.NewPool,
collateralAddress: addresses.BASE.V2.USDC.NewVault,
rewardAPY: [],
rewardAPR: null,
rewardTokens: [addresses.BASE.iFARM],
rewardTokenSymbols: ['iFARM'],
stakeAndDepositHelpMessage: `
<div class="help-message">
<p> The vault supplies
<a href="https://basescan.org/token/${addresses.BASE.V2.USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC </a>to Compound V3, earning
<a href="https://basescan.org/token/${addresses.BASE.COMP}" target="_blank" rel="noopener noreferrer">COMP</a>.
At every harvest, the earned rewards are reinvested into more
<a href="https://basescan.org/token/${addresses.BASE.V2.USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC</a>.
</p>
</div>
`,
},
{
chain: CHAIN_IDS.BASE,
id: 'WETH_base',
type: POOL_TYPES.INCENTIVE,
contractAddress: addresses.BASE.V2.WETH.NewPool,
collateralAddress: addresses.BASE.V2.WETH.NewVault,
rewardAPY: [],
rewardAPR: null,
rewardTokens: [addresses.BASE.iFARM],
rewardTokenSymbols: ['iFARM'],
stakeAndDepositHelpMessage: `
<div class="help-message">
<p> The vault supplies
<a href="https://basescan.org/token/${addresses.BASE.V2.WETH.Underlying}" target="_blank" rel="noopener noreferrer"> WETH </a>to Compound V3, earning
<a href="https://basescan.org/token/${addresses.BASE.COMP}" target="_blank" rel="noopener noreferrer">COMP</a>.
At every harvest, the earned rewards are reinvested into more
<a href="https://basescan.org/token/${addresses.BASE.V2.WETH.Underlying}" target="_blank" rel="noopener noreferrer"> WETH</a>.
</p>
</div>
`,
},
{
chain: CHAIN_IDS.BASE,
id: 'balancer_axlUSDC_USDC',
Expand Down
89 changes: 67 additions & 22 deletions data/mainnet/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,73 @@ module.exports = {
],
cmcRewardTokenSymbols: ['FARM', 'WETH'],
},
COMP: {
chain: CHAIN_IDS.ETH_MAINNET,
logoUrl: ['./icons/comp.svg'],
tokenAddress: addresses.COMP,
decimals: '18',
vaultAddress: null,
priceFunction: {
type: GET_PRICE_TYPES.COINGECKO_ID,
params: ['compound-governance-token'],
},
},
USDC_base: {
chain: CHAIN_IDS.BASE,
apyIconUrls: ['./icons/comp.svg'],
apyTokenSymbols: ['COMP'],
logoUrl: ['./icons/usdc.svg'],
tokenNames: ['USDC'],
platform: ['Compound'],
tags: ['Beginner', 'Stable'],
tokenAddress: addresses.BASE.V2.USDC.Underlying,
decimals: '6',
vaultAddress: addresses.BASE.V2.USDC.NewVault,
priceFunction: {
type: GET_PRICE_TYPES.COINGECKO_ID,
params: ['usd-coin'],
},
estimateApyFunctions: [
{
type: ESTIMATED_APY_TYPES.COMPOUND_V3,
params: [
addresses.BASE.V2.USDC.Underlying,
addresses.BASE.V2.USDC.Market,
profitSharingCut10Percent,
CHAIN_IDS.BASE,
],
},
],
cmcRewardTokenSymbols: ['iFARM', 'COMP'],
},
WETH_base: {
chain: CHAIN_IDS.BASE,
apyIconUrls: ['./icons/comp.svg'],
apyTokenSymbols: ['COMP'],
logoUrl: ['./icons/eth.svg'],
tokenNames: ['ETH'],
platform: ['Compound'],
tags: ['Beginner', 'Stable'],
tokenAddress: addresses.BASE.V2.WETH.Underlying,
decimals: '18',
vaultAddress: addresses.BASE.V2.WETH.NewVault,
priceFunction: {
type: GET_PRICE_TYPES.COINGECKO_ID,
params: ['weth'],
},
estimateApyFunctions: [
{
type: ESTIMATED_APY_TYPES.COMPOUND_V3,
params: [
addresses.BASE.V2.WETH.Underlying,
addresses.BASE.V2.WETH.Market,
profitSharingCut10Percent,
CHAIN_IDS.BASE,
],
},
],
cmcRewardTokenSymbols: ['iFARM', 'COMP'],
},
axlUSDC: {
chain: CHAIN_IDS.BASE,
logoUrl: ['./icons/axlusdc.svg'],
Expand Down Expand Up @@ -345,17 +412,6 @@ module.exports = {
params: ['bald'],
},
},
USDC_base: {
chain: CHAIN_IDS.BASE,
logoUrl: ['./icons/usdc.svg'],
tokenAddress: addresses.BASE.USDC,
decimals: '6',
vaultAddress: null,
priceFunction: {
type: GET_PRICE_TYPES.COINGECKO_ID,
params: ['usd-coin'],
},
},
DAI_base: {
chain: CHAIN_IDS.BASE,
logoUrl: ['./icons/dai.svg'],
Expand All @@ -367,17 +423,6 @@ module.exports = {
params: ['dai'],
},
},
WETH_base: {
chain: CHAIN_IDS.BASE,
logoUrl: ['./icons/eth.svg'],
tokenAddress: addresses.BASE.WETH,
decimals: '18',
vaultAddress: null,
priceFunction: {
type: GET_PRICE_TYPES.COINGECKO_ID,
params: ['weth'],
},
},
iFARM_base: {
chain: CHAIN_IDS.BASE,
decimals: '18',
Expand Down
Loading

0 comments on commit f553ba2

Please sign in to comment.