Skip to content

Commit

Permalink
Add Beets stS-wS
Browse files Browse the repository at this point in the history
  • Loading branch information
MirthFutures committed Dec 30, 2024
1 parent 66604e5 commit 21e4eb2
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/stats/getNonAmmPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -197,6 +198,7 @@ export async function getNonAmmPrices(tokenPrices: Record<string, number>): Prom
getBalancerArbPrices(tokenPrices),
getBalancerGnosisPrices(tokenPrices),
getBeethovenxPrices(tokenPrices),
getBeetsSonicPrices(tokenPrices),
getBeetsOPPrices(tokenPrices),
getEllipsisPrices(tokenPrices),
getCurveEthereumPrices(tokenPrices),
Expand Down
16 changes: 16 additions & 0 deletions src/api/stats/sonic/getBeetsSonicApys.js
Original file line number Diff line number Diff line change
@@ -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;
11 changes: 11 additions & 0 deletions src/api/stats/sonic/getBeetsSonicPrices.js
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 2 additions & 0 deletions src/api/stats/sonic/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
//const { getBeefyCowSonicApys } = require('./getBeefyCowSonicApys');
const getEqualizerApys = require('./getEqualizerApys');
const getBeetsSonicApys = require('./getBeetsSonicApys');

const getApys = [
// getBeefyCowSonicApys,
getEqualizerApys,
getBeetsSonicApys,
];

const getSonicApys = async () => {
Expand Down
39 changes: 39 additions & 0 deletions src/data/sonic/beetsPools.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]

0 comments on commit 21e4eb2

Please sign in to comment.