Skip to content

Commit

Permalink
feat: add moonwell usdc and pearl star/usdr
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypto-One-dev committed Oct 3, 2023
1 parent 99cbafa commit c44169e
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 11 deletions.
22 changes: 22 additions & 0 deletions data/icons/star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion data/mainnet/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@
"wamMATIC": "0x0D6135b2cFBAE3b1c58368a93b855fa54FA5aae1",
"amMATIC": "0x6d80113e533a2C0fe82EaBD35f1875DcEA89Ea97",
"wUSDR": "0x00e8c0E92eB3Ad88189E7125Ec8825eDc03Ab265",
"STAR": "0xC19669A405067927865B40Ea045a2baabbbe57f5",
"bbamETH": "0x43894DE14462B421372bCFe445fA51b1b4A0Ff3D",
"wamETH": "0xa5bBf0f46B9dc8a43147862ba35c8134eB45f1F5",
"amETH": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
57 changes: 52 additions & 5 deletions data/mainnet/pools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: `
<div class="help-message">
<p> The vault supplies
<a href="https://polygonscan.com/token/${addresses.MATIC.V2.pearl_STAR_USDR.Underlying}" target="_blank" rel="noopener noreferrer">Pearl LP tokens</a> in to a Pearl farm, earning
<a href="https://polygonscan.com/token/${addresses.MATIC.PEARL}" target="_blank" rel="noopener noreferrer">PEARL</a>.
The earned PEARL is converted into
<a href="https://polygonscan.com/token/${addresses.MATIC.V2.CVR.Underlying}" target="_blank" rel="noopener noreferrer">CVR</a> and deposited in to
<a href="https://app.harvest.finance/polygon/${addresses.MATIC.V2.CVR.NewVault}" target="_blank" rel="noopener noreferrer">fCVR</a> where it is earning auto-compounding CVR rewards. The fCVR rewards can be claimed with the "Claim All" button.
</p>
<p> Get the
<a href="https://polygonscan.com/token/${addresses.MATIC.V2.pearl_STAR_USDR.Underlying}" target="_blank" rel="noopener noreferrer">Pearl LP tokens</a> by supply liquidity on
<a href="https://www.pearl.exchange/liquidity/manage/${addresses.MATIC.V2.pearl_STAR_USDR.Underlying}" target="_blank" rel="noopener noreferrer">Pearl</a>.
</p>
</div>
`,
},
{
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: `
<div class="help-message">
<p> The vault supplies
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC </a>to Moonwell, earning
<a href="https://basescan.org/token/${addresses.BASE.WELL}" target="_blank" rel="noopener noreferrer">WELL</a>.
At every harvest, the earned rewards are reinvested into more
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC</a>.
</p>
</div>
`,
},
{
chain: CHAIN_IDS.BASE,
id: 'baseswap_axlUSDC_ETH',
Expand Down Expand Up @@ -278,21 +325,21 @@ 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],
rewardTokenSymbols: ['iFARM'],
stakeAndDepositHelpMessage: `
<div class="help-message">
<p> The vault supplies
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC </a>to Moonwell, earning
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDbC.Underlying}" target="_blank" rel="noopener noreferrer"> USDbC </a>to Moonwell, earning
<a href="https://basescan.org/token/${addresses.BASE.WELL}" target="_blank" rel="noopener noreferrer">WELL</a>.
At every harvest, the earned rewards are reinvested into more
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDC.Underlying}" target="_blank" rel="noopener noreferrer"> USDC</a>.
<a href="https://basescan.org/token/${addresses.BASE.V2.moonwell_USDbC.Underlying}" target="_blank" rel="noopener noreferrer"> USDbC</a>.
</p>
</div>
`,
Expand Down
79 changes: 74 additions & 5 deletions data/mainnet/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -332,17 +390,17 @@ module.exports = {
],
cmcRewardTokenSymbols: ['iFARM', 'WELL'],
},
moonwell_USDC: {
moonwell_USDbC: {
chain: CHAIN_IDS.BASE,
apyIconUrls: ['./icons/well.svg'],
apyTokenSymbols: ['WELL'],
logoUrl: ['./icons/usdc.svg'],
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'],
Expand All @@ -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,
],
Expand Down Expand Up @@ -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'],
Expand Down

0 comments on commit c44169e

Please sign in to comment.