Skip to content

Commit

Permalink
Merge pull request #156 from balancer/v3-canary
Browse files Browse the repository at this point in the history
V3 canary
  • Loading branch information
franzns authored Feb 21, 2024
2 parents fd63cf4 + a048b36 commit 7aa3fd5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
8 changes: 8 additions & 0 deletions app/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ export const schema = {
optional: true,
type: String,
},
GROVE_CITY: {
optional: true,
type: String,
},
INFURA_API_KEY: {
optional: true,
type: String,
},
GATEWAYFM_API_KEY: {
optional: true,
type: String,
},
ALCHEMY_API_KEY: {
optional: true,
type: String,
Expand Down
6 changes: 4 additions & 2 deletions env.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ PORT=4000
NODE_ENV=local
DEPLOYMENT_ENV=canary

# RPCs
GROVE_CITY=
INFURA_API_KEY=

# Database
DATABASE_URL=postgresql://backend:let-me-in@localhost:5431/database?schema=public

Expand Down Expand Up @@ -36,8 +40,6 @@ SENTRY_AUTH_TOKEN=<insert-me>
APOLLO_GRAPH_REF=<not-required-if-reporting-false>
APOLLO_API_KEY=<not-required-if-reporting-false>

INFURA_API_KEY=

# Admin routes
ADMIN_API_KEY=<chose-a-value>

Expand Down
6 changes: 3 additions & 3 deletions modules/network/avalanche.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ const avalancheNetworkData: NetworkData = {
},
ggAVAX: {
tokenAddress: '0xa25eaf2906fa1a3a13edac9b9657108af7b703e3',
sourceUrl: 'https://ceres.gogopool.com',
path: 'ggAVAXMonthlyInterestMonth.value',
sourceUrl: 'https://api.gogopool.com/metrics',
path: 'ggavax_apy',
// Updated from https://ceres.gogopool.com/ which used below calculation and scale -8.3333
// According to solarcurve, the AVAX Monthly Interest must be multiplied by -12 to represent the APR in normal scale, for example, if the monthly interest is -0,15, the APR would be -0,15 * -12 = 1,8%.
// @solarcurve: We estimate by multiplying that value by -12 since its the exchange rate of AVAX -> ggAVAX, which will always return less ggAVAX than AVAX
// How this -12 became -8,333? It's because the scale parameter is used to divide the number, and the final apr percentage is in decimal format (1,8% = 0,018), so if:
// M * -12 = A (M is monthly rate and A is APR) => (M/x) = (A/100) => (A / -12x) = (A / 100) [replacing M by A/-12] => x = 100/-12 = -8,33333
scale: -8.3333,
},
ankrAVAX: {
tokenAddress: '0xc3344870d52688874b06d844e0c36cc39fc727f6',
Expand Down
4 changes: 2 additions & 2 deletions modules/network/gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const gnosisNetworkData: NetworkData = {
excludedTokenAddresses: [],
},
rpcUrl:
(env.DEPLOYMENT_ENV as DeploymentEnv) === 'main'
? `https://rpc.eu-central-2.gateway.fm/v4/gnosis/non-archival/mainnet`
env.GATEWAYFM_API_KEY && (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main'
? `https://rpc.eu-central-2.gateway.fm/v4/gnosis/archival/mainnet?apiKey=${env.GATEWAYFM_API_KEY}`
: 'https://gnosis.drpc.org',
rpcMaxBlockRange: 2000,
protocolToken: 'bal',
Expand Down
8 changes: 5 additions & 3 deletions modules/network/zkevm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ const zkevmNetworkData: NetworkData = {
excludedTokenAddresses: [],
},
rpcUrl:
env.ALCHEMY_API_KEY && (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main'
env.GROVE_CITY
? `https://polygon-zkevm-mainnet.rpc.grove.city/v1/${env.GROVE_CITY}`
: env.ALCHEMY_API_KEY && (env.DEPLOYMENT_ENV as DeploymentEnv) === 'main'
? `https://polygonzkevm-mainnet.g.alchemy.com/v2/${env.ALCHEMY_API_KEY}`
: 'https://zkevm-rpc.com',
rpcMaxBlockRange: 2000,
Expand Down Expand Up @@ -198,10 +200,10 @@ export const zkevmNetworkConfig: NetworkConfig = {
),
},
/*
For sub-minute jobs we set the alarmEvaluationPeriod and alarmDatapointsToAlarm to 1 instead of the default 3.
For sub-minute jobs we set the alarmEvaluationPeriod and alarmDatapointsToAlarm to 1 instead of the default 3.
This is needed because the minimum alarm period is 1 minute and we want the alarm to trigger already after 1 minute instead of 3.
For every 1 days jobs we set the alarmEvaluationPeriod and alarmDatapointsToAlarm to 1 instead of the default 3.
For every 1 days jobs we set the alarmEvaluationPeriod and alarmDatapointsToAlarm to 1 instead of the default 3.
This is needed because the maximum alarm evaluation period is 1 day (period * evaluationPeriod).
*/
workerJobs: [
Expand Down

0 comments on commit 7aa3fd5

Please sign in to comment.