-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35b7f65
commit 28982af
Showing
14 changed files
with
206 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/address-book/src/address-book/sonic/platforms/equalizer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const equalizer = { | ||
router: '0x571b196a894BaCd9C922C6b5Fefe2c955CC0d431', | ||
voter: '0x17fa9dA6e01aD59513707F92033a6eb03CcB10B4', | ||
}; |
2 changes: 1 addition & 1 deletion
2
packages/address-book/src/address-book/sonic/platforms/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
export * from './equalizer.js'; | ||
export * from './beefyfinance.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const { SONIC_CHAIN_ID: chainId } = require('../../../constants'); | ||
const { getSolidlyGaugeApys } = require('../common/getSolidlyGaugeApys'); | ||
|
||
const stablePools = require('../../../data/sonic/equalizerStableLpPools.json'); | ||
const volatilePools = require('../../../data/sonic/equalizerLpPools.json'); | ||
|
||
const pools = [...stablePools, ...volatilePools]; | ||
const getEqualizerApys = async () => { | ||
const gaugeApys = getSolidlyGaugeApys({ | ||
chainId: chainId, | ||
pools: pools, | ||
oracleId: 'EQUAL', | ||
oracle: 'tokens', | ||
decimals: '1e18', | ||
reward: '0xddF26B42C1d903De8962d3F79a74a501420d5F19', | ||
boosted: false, | ||
// log: true, | ||
}); | ||
|
||
let apys = {}; | ||
let apyBreakdowns = {}; | ||
|
||
const results = await Promise.allSettled([gaugeApys]); | ||
for (const result of results) { | ||
if (result.status !== 'fulfilled') { | ||
console.warn('getEqualizerSonicApys error', result.reason); | ||
} else { | ||
apys = { ...apys, ...result.value.apys }; | ||
apyBreakdowns = { ...apyBreakdowns, ...result.value.apyBreakdowns }; | ||
} | ||
} | ||
|
||
return { | ||
apys, | ||
apyBreakdowns, | ||
}; | ||
}; | ||
|
||
module.exports = getEqualizerApys; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const getSolidlyStablePrices = require('../common/getSolidlyStablePrices'); | ||
const pools = require('../../../data/sonic/equalizerStableLpPools.json'); | ||
const { SONIC_CHAIN_ID } = require('../../../constants'); | ||
|
||
const stablePools = [...pools]; | ||
|
||
const getEqualizerStableSonicPrices = async tokenPrices => { | ||
return await getSolidlyStablePrices(SONIC_CHAIN_ID, stablePools, tokenPrices); | ||
}; | ||
|
||
module.exports = getEqualizerStableSonicPrices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
[ | ||
{ | ||
"name": "equalizer-sonic-ws-weth", | ||
"address": "0xcD7D89FF7bB263a5C45aD81ddE4Eed5892Ad540C", | ||
"gauge": "0x09548deFD1016cFFd6f74417bE3503b1e6aA6c51", | ||
"decimals": "1e18", | ||
"chainId": 146, | ||
"beefyFee": 0.095, | ||
"lp0": { | ||
"address": "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38", | ||
"oracle": "tokens", | ||
"oracleId": "wS", | ||
"decimals": "1e18" | ||
}, | ||
"lp1": { | ||
"address": "0x50c42dEAcD8Fc9773493ED674b675bE577f2634b", | ||
"oracle": "tokens", | ||
"oracleId": "WETH", | ||
"decimals": "1e18" | ||
} | ||
}, | ||
{ | ||
"name": "equalizer-sonic-ws-usdc.e", | ||
"address": "0xdc85F86d5E3189e0d4a776e6Ae3B3911eC7B0133", | ||
"gauge": "0x9b55Fbd8Cd27B81aCc6adfd42D441858FeDe4326", | ||
"decimals": "1e18", | ||
"chainId": 146, | ||
"beefyFee": 0.095, | ||
"lp0": { | ||
"address": "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38", | ||
"oracle": "tokens", | ||
"oracleId": "wS", | ||
"decimals": "1e18" | ||
}, | ||
"lp1": { | ||
"address": "0x29219dd400f2Bf60E5a23d13Be72B486D4038894", | ||
"oracle": "tokens", | ||
"oracleId": "sUSDC.e", | ||
"decimals": "1e6" | ||
} | ||
}, | ||
{ | ||
"name": "equalizer-sonic-ws-equal", | ||
"address": "0x139f8eCC5fC8Ef11226a83911FEBecC08476cfB1", | ||
"gauge": "0xe73267246Aa678A28D8e7B957135faEc1Db48aEF", | ||
"decimals": "1e18", | ||
"chainId": 146, | ||
"beefyFee": 0.095, | ||
"lp0": { | ||
"address": "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38", | ||
"oracle": "tokens", | ||
"oracleId": "wS", | ||
"decimals": "1e18" | ||
}, | ||
"lp1": { | ||
"address": "0xddF26B42C1d903De8962d3F79a74a501420d5F19", | ||
"oracle": "tokens", | ||
"oracleId": "EQUAL", | ||
"decimals": "1e18" | ||
} | ||
}, | ||
{ | ||
"name": "equalizer-sonic-usdc.e-weth", | ||
"address": "0xbCbC5777537c0D0462fb82BA48Eeb6cb361E853f", | ||
"gauge": "0xf8F2462A8Fa08Df933C0d6bbaf34108Fd7af526E", | ||
"decimals": "1e18", | ||
"chainId": 146, | ||
"beefyFee": 0.095, | ||
"lp0": { | ||
"address": "0x29219dd400f2Bf60E5a23d13Be72B486D4038894", | ||
"oracle": "tokens", | ||
"oracleId": "sUSDC.e", | ||
"decimals": "1e6" | ||
}, | ||
"lp1": { | ||
"address": "0x50c42dEAcD8Fc9773493ED674b675bE577f2634b", | ||
"oracle": "tokens", | ||
"oracleId": "WETH", | ||
"decimals": "1e18" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters