diff --git a/src/api/stats/getNonAmmPrices.ts b/src/api/stats/getNonAmmPrices.ts index 058484293..05aee5078 100644 --- a/src/api/stats/getNonAmmPrices.ts +++ b/src/api/stats/getNonAmmPrices.ts @@ -10,6 +10,7 @@ import getBalancerArbPrices from './arbitrum/getBalancerArbPrices'; import getBalancerAvaxPrices from './avax/getBalancerPrices'; import getBalancerBasePrices from './base/getBalancerPrices'; import getBalancerPolyPrices from './matic/getBalancerPolyPrices'; +import getBeetsSonicPrices from './sonic/getBeetsSonicPrices'; import getBalancerZkevmPrices from './zkevm/getBalancerPrices'; import getVelodromeStablePrices from './optimism/getVelodromeStablePrices'; import getEquilibreStablePrices from './kava/getEquilibreStablePrices'; @@ -197,6 +198,7 @@ export async function getNonAmmPrices(tokenPrices: Record): Prom getBalancerArbPrices(tokenPrices), getBalancerGnosisPrices(tokenPrices), getBeethovenxPrices(tokenPrices), + getBeetsSonicPrices(tokenPrices), getBeetsOPPrices(tokenPrices), getEllipsisPrices(tokenPrices), getCurveEthereumPrices(tokenPrices), diff --git a/src/api/stats/sonic/getBeetsSonicApys.js b/src/api/stats/sonic/getBeetsSonicApys.js new file mode 100644 index 000000000..fd59e5308 --- /dev/null +++ b/src/api/stats/sonic/getBeetsSonicApys.js @@ -0,0 +1,16 @@ +import { SONIC_CHAIN_ID as chainId } from '../../../constants'; +const { getBalancerApys } = require('../common/balancer/getBalancerApys'); +import { addressBook } from '../../../../packages/address-book/src/address-book'; + +const pools = require('../../../data/sonic/beetsPools.json'); + +const getBeetsSonicApys = async () => { + return getBalancerApys({ + chainId: chainId, + pools: pools, + balancerVault: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', + // log: true, + }); +}; + +module.exports = getBeetsSonicApys; diff --git a/src/api/stats/sonic/getBeetsSonicPrices.js b/src/api/stats/sonic/getBeetsSonicPrices.js new file mode 100644 index 000000000..29c1b0fde --- /dev/null +++ b/src/api/stats/sonic/getBeetsSonicPrices.js @@ -0,0 +1,11 @@ +import getBalancerPrices from '../common/balancer/getBalancerPrices'; +import { SONIC_CHAIN_ID as chainId } from '../../../constants'; +import beetsPools from '../../../data/sonic/beetsPools.json'; + +const pools = [...beetsPools]; + +const getBeetsSonicPrices = async tokenPrices => { + return await getBalancerPrices(chainId, pools, tokenPrices); +}; + +export default getBeetsSonicPrices; diff --git a/src/api/stats/sonic/index.js b/src/api/stats/sonic/index.js index 173e6b8e6..21aa54f89 100644 --- a/src/api/stats/sonic/index.js +++ b/src/api/stats/sonic/index.js @@ -1,9 +1,11 @@ //const { getBeefyCowSonicApys } = require('./getBeefyCowSonicApys'); const getEqualizerApys = require('./getEqualizerApys'); +const getBeetsSonicApys = require('./getBeetsSonicApys'); const getApys = [ // getBeefyCowSonicApys, getEqualizerApys, + getBeetsSonicApys, ]; const getSonicApys = async () => { diff --git a/src/data/sonic/beetsPools.json b/src/data/sonic/beetsPools.json new file mode 100644 index 000000000..b0e8e7e73 --- /dev/null +++ b/src/data/sonic/beetsPools.json @@ -0,0 +1,39 @@ +[ + { + "name": "beets-sonic-staked-sonic-symphony", + "address": "0x374641076B68371e69D03C417DAc3E5F236c32FA", + "vault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8", + "gauge": "0x8476F3A8DA52092e7835167AFe27835dC171C133", + "vaultPoolId": "0x374641076b68371e69d03c417dac3e5f236c32fa000000000000000000000006", + "composable": true, + "bptIndex": 1, + "decimals": "1e18", + "rewards": [ + { + "newGauge": true, + "stream": "0x8476F3A8DA52092e7835167AFe27835dC171C133", + "oracleId": "BAL" + }, + { + "stream": "0x8476F3A8DA52092e7835167AFe27835dC171C133", + "rewardToken": "0x2D0E0814E62D80056181F5cd932274405966e4f0", + "oracleId": "BEETS" + } + ], + "tokens": [ + { + "oracle": "tokens", + "oracleId": "wS", + "decimals": "1e18" + }, + { + "oracleId": "BPTToken" + }, + { + "oracle": "tokens", + "oracleId": "stS", + "decimals": "1e18" + } + ] + } +]