From 69a373e7d95ea15b5b05e118f52520503c5133b9 Mon Sep 17 00:00:00 2001 From: MirthFutures Date: Mon, 27 Nov 2023 18:49:24 -0500 Subject: [PATCH] Add Pancake ARB-ETH Gamma --- src/api/stats/arbitrum/getGammaPrices.js | 3 +- src/api/stats/arbitrum/getUniswapGammaApys.js | 22 ++++++++++-- src/data/arbitrum/pancakeGammaPools.json | 35 +++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 src/data/arbitrum/pancakeGammaPools.json diff --git a/src/api/stats/arbitrum/getGammaPrices.js b/src/api/stats/arbitrum/getGammaPrices.js index 7af03659c..46bb67acd 100644 --- a/src/api/stats/arbitrum/getGammaPrices.js +++ b/src/api/stats/arbitrum/getGammaPrices.js @@ -2,9 +2,10 @@ const getGammaPrices = require('../common/getGammaPrices'); const uniPools = require('../../../data/arbitrum/uniswapGammaPools.json'); const uniChefPools = require('../../../data/arbitrum/uniswapGammaChefPools.json'); const sushiPools = require('../../../data/arbitrum/sushiGammaPools.json'); +const pancakePools = require('../../../data/arbitrum/pancakeGammaPools.json'); const { ARBITRUM_CHAIN_ID: chainId } = require('../../../constants'); -const pools = [...uniPools, ...uniChefPools, ...sushiPools]; +const pools = [...uniPools, ...uniChefPools, ...sushiPools, ...pancakePools]; const getGammaArbPrices = async tokenPrices => { return await getGammaPrices(chainId, pools, tokenPrices); }; diff --git a/src/api/stats/arbitrum/getUniswapGammaApys.js b/src/api/stats/arbitrum/getUniswapGammaApys.js index d0f9e367b..3a8d602d8 100644 --- a/src/api/stats/arbitrum/getUniswapGammaApys.js +++ b/src/api/stats/arbitrum/getUniswapGammaApys.js @@ -1,11 +1,12 @@ import { ARBITRUM_CHAIN_ID as chainId } from '../../../constants'; import { getMiniChefApys } from '../common/getMiniChefApys'; import pools from '../../../data/arbitrum/uniswapGammaChefPools.json'; +import pancakePools from '../../../data/arbitrum/pancakeGammaPools.json'; import SushiMiniChefV2 from '../../../abis/matic/SushiMiniChefV2'; const minichef = '0x8A8fDe5D57725f070bFc55cd022B924e1c36C8a0'; -export const getUniswapGammaApys = () => { - return getMiniChefApys({ +export const getUniswapGammaApys = async () => { + const uniswap = await getMiniChefApys({ minichefConfig: { minichef, minichefAbi: SushiMiniChefV2, @@ -21,6 +22,23 @@ export const getUniswapGammaApys = () => { chainId: chainId, //log: true, }); + + const pancake = await getMiniChefApys({ + minichefConfig: { + minichef: '0xC23b44e766435AaA712AaEBc299686385c428B9F', + minichefAbi: SushiMiniChefV2, + outputOracleId: 'ARB', + tokenPerSecondContractMethodName: 'sushiPerSecond', + }, + pools: pancakePools, + quickGamma: 'https://wire2.gamma.xyz/pancakeswap/arbitrum/hypervisors/allData', + chainId: chainId, + // log: true, + }); + + const apys = { ...uniswap, ...pancake }; + + return apys; }; module.exports = getUniswapGammaApys; diff --git a/src/data/arbitrum/pancakeGammaPools.json b/src/data/arbitrum/pancakeGammaPools.json new file mode 100644 index 000000000..1a9600b57 --- /dev/null +++ b/src/data/arbitrum/pancakeGammaPools.json @@ -0,0 +1,35 @@ +[ + { + "name": "pancake-gamma-arb-weth", + "address": "0xdaB1dA56965B1aaaBE38774E8B74C3Ade8fc439E", + "pool": "0x0d7c4b40018969f81750d0a164c3839a77353EFB", + "decimals": "1e18", + "chainId": 42161, + "beefyFee": 0.095, + "poolId": 0, + "extraRewards": [ + { + "rewarder": "0xF611824E7C42286F055dbE44A1a21017fDA603D2", + "oracleId": "Cake", + "decimals": "1e18" + }, + { + "rewarder": "0xd928814eF5E907699C5edA871AdB3394dcEB40c7", + "oracleId": "ARB", + "decimals": "1e18" + } + ], + "lp0": { + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "oracle": "tokens", + "oracleId": "WETH", + "decimals": "1e18" + }, + "lp1": { + "address": "0x912CE59144191C1204E64559FE8253a0e49E6548", + "oracle": "tokens", + "oracleId": "ARB", + "decimals": "1e18" + } + } +]