Skip to content

Commit

Permalink
Add Pancake ARB-ETH Gamma
Browse files Browse the repository at this point in the history
  • Loading branch information
MirthFutures committed Nov 27, 2023
1 parent 7a23d42 commit 69a373e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/api/stats/arbitrum/getGammaPrices.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
22 changes: 20 additions & 2 deletions src/api/stats/arbitrum/getUniswapGammaApys.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
35 changes: 35 additions & 0 deletions src/data/arbitrum/pancakeGammaPools.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]

0 comments on commit 69a373e

Please sign in to comment.