From c44169e6e4287e2892f0cb06cc2cd2da5c5ee4a1 Mon Sep 17 00:00:00 2001 From: William Liu Date: Tue, 3 Oct 2023 17:59:02 +0000 Subject: [PATCH] feat: add moonwell usdc and pearl star/usdr --- data/icons/star.svg | 22 +++++++++++ data/mainnet/addresses.json | 17 +++++++- data/mainnet/pools.js | 57 +++++++++++++++++++++++--- data/mainnet/tokens.js | 79 ++++++++++++++++++++++++++++++++++--- 4 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 data/icons/star.svg diff --git a/data/icons/star.svg b/data/icons/star.svg new file mode 100644 index 0000000..dabf2ef --- /dev/null +++ b/data/icons/star.svg @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/data/mainnet/addresses.json b/data/mainnet/addresses.json index 0a84468..4091bc4 100644 --- a/data/mainnet/addresses.json +++ b/data/mainnet/addresses.json @@ -1219,6 +1219,7 @@ "wamMATIC": "0x0D6135b2cFBAE3b1c58368a93b855fa54FA5aae1", "amMATIC": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97", "wUSDR": "0x00e8c0E92eB3Ad88189E7125Ec8825eDc03Ab265", + "STAR": "0xC19669A405067927865B40Ea045a2baabbbe57f5", "bbamETH": "0x43894DE14462B421372bCFe445fA51b1b4A0Ff3D", "wamETH": "0xa5bBf0f46B9dc8a43147862ba35c8134eB45f1F5", "amETH": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8", @@ -1662,6 +1663,13 @@ "NewPool": "0x708b8E2956826e3855c31176FBfB979dCFC1E412", "Gauge": "0x03Fa7A2628D63985bDFe07B95d4026663ED96065" }, + "pearl_STAR_USDR": { + "Underlying": "0x366dc82D3BFFd482cc405E58bAb3288F2dd32C94", + "NewVault": "0x8C8309dEfbd5Ef8bBFB5B2F9815A886b872ea019", + "NewStrategy": "0xD34942E665256B5eC1770E42d9B6299f9b858155", + "NewPool": "0xBaDd61396f49885a468aC0a9B7E44C2fC91f8167", + "Gauge": "0xD466c643BF2df284E4E3eF08103bE9DFe3112dfE" + }, "CVR": { "Underlying": "0x6AE96Cc93331c19148541D4D2f31363684917092", "NewVault": "0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d", @@ -2346,13 +2354,20 @@ "NewPool": "0xbecA2C0888a8c79698aCFd4D76977F16C426CdF4", "mToken": "0x73b06D8d18De422E269645eaCe15400DE7462417" }, - "moonwell_USDC": { + "moonwell_USDbC": { "Underlying": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", "NewVault": "0xc4F28CAE78550b4d85d6F928805483cEE3bcB3E5", "NewStrategy": "0xEf1c16bd57418382b33aEa88E713Dc1390ecC457", "NewPool": "0xeD05b21b403543255d262eADD928f4bF1710c6a1", "mToken": "0x703843C3379b52F9FF486c9f5892218d2a065cC8" }, + "moonwell_USDC": { + "Underlying": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "NewVault": "0x90613e167D42CA420942082157B42AF6fc6a8087", + "NewStrategy": "0xe860CC946338769bC60D68eC9576A3A258c7D156", + "NewPool": "0x3169Cbd868851570D246CCbEF8209B64d07E5268", + "mToken": "0xEdc817A28E8B93B03976FBd4a3dDBc9f7D176c22" + }, "moonwell_WETH": { "Underlying": "0x4200000000000000000000000000000000000006", "NewVault": "0x0B0193fAD49DE45F5E2B0A9f5D6Bc3BB7D281688", diff --git a/data/mainnet/pools.js b/data/mainnet/pools.js index da0e2c4..58fc38a 100644 --- a/data/mainnet/pools.js +++ b/data/mainnet/pools.js @@ -4,6 +4,53 @@ const addresses = require('./addresses.json') const strat15PercentFactor = '0.85' module.exports = [ + { + chain: CHAIN_IDS.POLYGON_MAINNET, + id: 'pearl_STAR_USDR', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.MATIC.V2.pearl_STAR_USDR.NewPool, + collateralAddress: addresses.MATIC.V2.pearl_STAR_USDR.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.MATIC.miFARM], + rewardTokenSymbols: ['iFARM', 'fCVR'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + Pearl LP tokens in to a Pearl farm, earning + PEARL. + The earned PEARL is converted into + CVR and deposited in to + fCVR where it is earning auto-compounding CVR rewards. The fCVR rewards can be claimed with the "Claim All" button. +

+

Get the + Pearl LP tokens by supply liquidity on + Pearl. +

+
+ `, + }, + { + chain: CHAIN_IDS.BASE, + id: 'moonwell_USDC', + type: POOL_TYPES.INCENTIVE, + contractAddress: addresses.BASE.V2.moonwell_USDC.NewPool, + collateralAddress: addresses.BASE.V2.moonwell_USDC.NewVault, + rewardAPY: [], + rewardAPR: null, + rewardTokens: [addresses.BASE.iFARM], + rewardTokenSymbols: ['iFARM'], + stakeAndDepositHelpMessage: ` +
+

The vault supplies + USDC to Moonwell, earning + WELL. + At every harvest, the earned rewards are reinvested into more + USDC. +

+
+ `, + }, { chain: CHAIN_IDS.BASE, id: 'baseswap_axlUSDC_ETH', @@ -278,10 +325,10 @@ module.exports = [ }, { chain: CHAIN_IDS.BASE, - id: 'moonwell_USDC', + id: 'moonwell_USDbC', type: POOL_TYPES.INCENTIVE, - contractAddress: addresses.BASE.V2.moonwell_USDC.NewPool, - collateralAddress: addresses.BASE.V2.moonwell_USDC.NewVault, + contractAddress: addresses.BASE.V2.moonwell_USDbC.NewPool, + collateralAddress: addresses.BASE.V2.moonwell_USDbC.NewVault, rewardAPY: [], rewardAPR: null, rewardTokens: [addresses.BASE.iFARM], @@ -289,10 +336,10 @@ module.exports = [ stakeAndDepositHelpMessage: `

The vault supplies - USDC to Moonwell, earning + USDbC to Moonwell, earning WELL. At every harvest, the earned rewards are reinvested into more - USDC. + USDbC.

`, diff --git a/data/mainnet/tokens.js b/data/mainnet/tokens.js index 7e63cf0..4f098d9 100644 --- a/data/mainnet/tokens.js +++ b/data/mainnet/tokens.js @@ -63,6 +63,64 @@ module.exports = { params: ['axlwbtc'], }, }, + pearl_STAR_USDR: { + chain: CHAIN_IDS.POLYGON_MAINNET, + apyIconUrls: ['./icons/pearl.svg'], + apyTokenSymbols: ['PEARL'], + logoUrl: ['./icons/star.svg', './icons/usdr.svg'], + tokenNames: ['STAR', 'USDR'], + platform: ['Pearl'], + tags: ['Advanced', 'Stable'], + subLabel: 'HODL in fCVR', + tokenAddress: addresses.MATIC.V2.pearl_STAR_USDR.Underlying, + decimals: '18', + vaultAddress: addresses.MATIC.V2.pearl_STAR_USDR.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.LP_TOKEN, + params: [addresses.MATIC.V2.pearl_STAR_USDR.Underlying, 'STAR_polygon', 'USDR_polygon'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.PEARL_HODL, + params: [ + addresses.MATIC.V2.pearl_STAR_USDR.Underlying, + addresses.MATIC.V2.pearl_STAR_USDR.Gauge, + 'CVR', + profitSharingCut8Percent, + ], + extraDailyCompound: false, + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'PEARL'], + }, + moonwell_USDC: { + chain: CHAIN_IDS.BASE, + apyIconUrls: ['./icons/well.svg'], + apyTokenSymbols: ['WELL'], + logoUrl: ['./icons/usdc.svg'], + tokenNames: ['USDC'], + platform: ['Moonwell'], + tags: ['Beginners', 'Stable'], + tokenAddress: addresses.BASE.V2.moonwell_USDC.Underlying, + decimals: '6', + vaultAddress: addresses.BASE.V2.moonwell_USDC.NewVault, + priceFunction: { + type: GET_PRICE_TYPES.COINGECKO_ID, + params: ['usd-coin'], + }, + estimateApyFunctions: [ + { + type: ESTIMATED_APY_TYPES.MOONWELL_FOLD, + params: [ + addresses.BASE.V2.moonwell_USDC.Underlying, + addresses.BASE.V2.moonwell_USDC.mToken, + 78, + profitSharingCut10Percent, + ], + }, + ], + cmcRewardTokenSymbols: ['iFARM', 'WELL'], + }, baseswap_axlUSDC_ETH: { chain: CHAIN_IDS.BASE, apyIconUrls: ['./icons/bsx.svg', './icons/xbsx.svg', './icons/bswap.svg'], @@ -332,7 +390,7 @@ module.exports = { ], cmcRewardTokenSymbols: ['iFARM', 'WELL'], }, - moonwell_USDC: { + moonwell_USDbC: { chain: CHAIN_IDS.BASE, apyIconUrls: ['./icons/well.svg'], apyTokenSymbols: ['WELL'], @@ -340,9 +398,9 @@ module.exports = { tokenNames: ['USDbC'], platform: ['Moonwell'], tags: ['Beginners', 'Stable'], - tokenAddress: addresses.BASE.V2.moonwell_USDC.Underlying, + tokenAddress: addresses.BASE.V2.moonwell_USDbC.Underlying, decimals: '6', - vaultAddress: addresses.BASE.V2.moonwell_USDC.NewVault, + vaultAddress: addresses.BASE.V2.moonwell_USDbC.NewVault, priceFunction: { type: GET_PRICE_TYPES.COINGECKO_ID, params: ['usd-coin'], @@ -351,8 +409,8 @@ module.exports = { { type: ESTIMATED_APY_TYPES.MOONWELL_FOLD, params: [ - addresses.BASE.V2.moonwell_USDC.Underlying, - addresses.BASE.V2.moonwell_USDC.mToken, + addresses.BASE.V2.moonwell_USDbC.Underlying, + addresses.BASE.V2.moonwell_USDbC.mToken, 78, profitSharingCut10Percent, ], @@ -3562,6 +3620,17 @@ module.exports = { params: ['wrapped-usdr'], }, }, + STAR_polygon: { + chain: CHAIN_IDS.POLYGON_MAINNET, + logoUrl: [''], + tokenAddress: addresses.MATIC.STAR, + decimals: '18', + vaultAddress: null, + priceFunction: { + type: GET_PRICE_TYPES.COINGECKO_ID, + params: ['preon-star'], + }, + }, lvUSD: { chain: CHAIN_IDS.ETH_MAINNET, logoUrl: ['./icons/lvusd.svg'],