Skip to content

Commit

Permalink
Add Alien Base (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
kexleyBeefy authored Aug 12, 2023
1 parent b2157e3 commit b522fcb
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 2 deletions.
12 changes: 12 additions & 0 deletions packages/address-book/address-book/base/tokens/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ const _tokens = {
ETH,
WETH: ETH,
WNATIVE: ETH,
ALB: {
name: 'Alien Base',
symbol: 'ALB',
address: '0x1dd2d631c92b1aCdFCDd51A0F7145A50130050C4',
chainId: 8453,
decimals: 18,
logoURI: '',
website: 'https://app.alienbase.xyz/swap',
description: 'Reward token for the Alien Base DEX on the base chain. Farm and stake tokens.',
documentation: 'https://docs.alienbase.xyz/',
bridge: 'native',
},
'USD+': {
name: 'USD+',
symbol: 'USD+',
Expand Down
19 changes: 19 additions & 0 deletions src/api/stats/base/getAlienBaseApys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { BASE_CHAIN_ID as chainId } from '../../../constants';
import { getMultiRewardMasterChefApys } from '../common/getMultiRewardMasterChefApys';

const pools = require('../../../data/base/alienBaseLpPools.json');

const getAlienBaseApys = async () =>
await getMultiRewardMasterChefApys({
chainId: chainId,
masterchef: '0x52eaeCAC2402633d98b95213d0b473E069D86590',
secondsPerBlock: 1,
pools,
oracleId: 'ALB',
oracle: 'tokens',
decimals: '1e18',
liquidityProviderFee: 0.0016,
// log: true,
});

module.exports = getAlienBaseApys;
11 changes: 9 additions & 2 deletions src/api/stats/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ const getBalancerBaseApys = require('./getBalancerApys');
const getBaseSwapApys = require('./getBaseSwapApys');
const getStargateBaseApys = require('./getStargateBaseApys');
const getBvmApys = require('./getBvmApys');

const getApys = [getBalancerBaseApys, getBaseSwapApys, getStargateBaseApys, getBvmApys];
const getAlienBaseApys = require('./getAlienBaseApys');

const getApys = [
getBalancerBaseApys,
getBaseSwapApys,
getStargateBaseApys,
getBvmApys,
getAlienBaseApys,
];

const getBaseApys = async () => {
const start = Date.now();
Expand Down
2 changes: 2 additions & 0 deletions src/api/stats/getAmmPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ import cvmPools from '../../data/canto/cvmLpPools.json';
import baseSwapPools from '../../data/base/baseSwapLpPools.json';
import ooeV2Pools from '../../data/bsc/ooeV2LpPools.json';
import draculaPools from '../../data/zksync/draculaLpPools.json';
import alienBasePools from '../../data/base/alienBaseLpPools.json';
import { fetchVaultPrices } from '../../utils/fetchVaultPrices';
import { addressBookByChainId } from '../../../packages/address-book/address-book';
import { sleep } from '../../utils/time';
Expand All @@ -293,6 +294,7 @@ const REFRESH_INTERVAL = 5 * 60 * 1000;
// FIXME: if this list grows too big we might hit the ratelimit on initialization everytime
// Implement in case of emergency -> https:/beefyfinance/beefy-api/issues/103
const pools = normalizePoolOracleIds([
...alienBasePools,
...draculaPools,
...ooeV2Pools,
...baseSwapPools,
Expand Down
102 changes: 102 additions & 0 deletions src/data/base/alienBaseLpPools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[
{
"name": "alienbase-cbeth-weth",
"address": "0x9BB646BF0F4Da44bfaF3d899e774DE065731EDFe",
"decimals": "1e18",
"beefyFee": 0.095,
"poolId": 6,
"chainId": 8453,
"lp0": {
"address": "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
"oracle": "tokens",
"oracleId": "cbETH",
"decimals": "1e18"
},
"lp1": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
}
},
{
"name": "alienbase-usdbc-axlusdc",
"address": "0xAcBFF2Edbcf8089AdeC9706FF3cB6DF2502A30E1",
"decimals": "1e18",
"beefyFee": 0.095,
"poolId": 5,
"chainId": 8453,
"lp0": {
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"oracle": "tokens",
"oracleId": "USDbC",
"decimals": "1e6"
},
"lp1": {
"address": "0xEB466342C4d449BC9f53A865D5Cb90586f405215",
"oracle": "tokens",
"oracleId": "axlUSDC",
"decimals": "1e6"
}
},
{
"name": "alienbase-weth-usdbc",
"address": "0xeF24722d5daE32Dc155d961561cFFbc5f347EeE7",
"decimals": "1e18",
"beefyFee": 0.095,
"poolId": 3,
"chainId": 8453,
"lp0": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
},
"lp1": {
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"oracle": "tokens",
"oracleId": "USDbC",
"decimals": "1e6"
}
},
{
"name": "alienbase-alb-usdbc",
"address": "0xe9B0A6bc01B9b4eE44C7B012EC7d5A5EEAcc40df",
"decimals": "1e18",
"beefyFee": 0.095,
"poolId": 2,
"chainId": 8453,
"lp0": {
"address": "0x1dd2d631c92b1aCdFCDd51A0F7145A50130050C4",
"oracle": "tokens",
"oracleId": "ALB",
"decimals": "1e18"
},
"lp1": {
"address": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA",
"oracle": "tokens",
"oracleId": "USDbC",
"decimals": "1e6"
}
},
{
"name": "alienbase-alb-weth",
"address": "0xd79Ef386f26E40B5e60e4aeB324F2678F6eBbF49",
"decimals": "1e18",
"beefyFee": 0.095,
"poolId": 1,
"chainId": 8453,
"lp0": {
"address": "0x1dd2d631c92b1aCdFCDd51A0F7145A50130050C4",
"oracle": "tokens",
"oracleId": "ALB",
"decimals": "1e18"
},
"lp1": {
"address": "0x4200000000000000000000000000000000000006",
"oracle": "tokens",
"oracleId": "WETH",
"decimals": "1e18"
}
}
]

0 comments on commit b522fcb

Please sign in to comment.