forked from RageTrade/utilities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-env.ts
61 lines (53 loc) · 1.85 KB
/
config-env.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const SECRET = JSON.parse(process.env.SECRET as string)
export const BOT_WATCHER_ROLE = '<@&987030632704118835>'
export const RUNS_TO_LOG_AFTER = 30
export const CRON_REBALANCE = '0 0 * * *'
export const CRON_CLOSE_TOKEN_POSITION = '*/30 * * * *'
export const ARB_GAS_UPPER_BOUND = 1_500_000
export const PRE_FLIGHT_CHECK = {
FTX_BALANCE_THRESHOLD: 100,
ARB_ETH_BAL_THRESHOLD: 0.1,
RAGETRADE_BAL_THRESHOLD: 100 * 10 ** 6,
BLOCK_TIMESTAMP_FRESHNESS_THRESHOLD: 4 * 60,
}
export const NETWORK_INF0 = {
CHAIN_ID: 42161,
BLOCK_EXPLORER_URL: 'https://arbiscan.io/',
BLOCK_EXPLORER_API: SECRET.BLOCK_EXPLORER_API as string,
PK_VAULT_REBALANCE: SECRET.PK_VAULT_REBALANCE as string,
PK_LIQUIDATION: SECRET.PK_LIQUIDATION as string,
PK_PRICE_ARB_BOT: SECRET.PK_PRICE_ARB_BOT as string,
PK_FUNDING_ARB_BOT: SECRET.PK_FUNDING_ARB_BOT as string,
WSS_RPC_URL: SECRET.WSS_RPC_URL as string,
HTTP_RPC_URL: SECRET.HTTP_RPC_URL as string,
ARB_BOT_WEBHOOK_URL: SECRET.ARB_BOT_WEBHOOK_URL as string,
REBALANCE_WEBHOOK_URL: SECRET.REBALANCE_WEBHOOK_URL as string,
LIQUIDATION_WEBHOOK_URL: SECRET.LIQUIDATION_WEBHOOK_URL as string,
}
export const AMM_CONFIG = {
FEE: 0.0015,
POOL_ID: 2721558366,
PRICE_ARB_ACCOUNT_ID: Number(SECRET.PRICE_ARB_ACCOUNT_ID as string),
FUNDING_ARB_ACCOUNT_ID: Number(SECRET.FUNDING_ARB_ACCOUNT_ID as string) || 0,
}
export const FTX_CONFIG = {
FEE: 0.000665,
SCALING_FACTOR: 1,
MARKET_ID: 'ETH-PERP',
PRICE_ARB_ACCOUNT: {
SUB_ACCOUNT_ID: SECRET.SUB_ACCOUNT_ID as string,
ACCESS_KEY: SECRET.ACCESS_KEY as string,
ACCESS_SECRET: SECRET.ACCESS_SECRET as string,
},
FUNDING_ARB_ACCOUNT: {
SUB_ACCOUNT_ID: '',
ACCESS_KEY: '',
ACCESS_SECRET: '',
},
}
export const STRATERGY_CONFIG = {
FREQUENCY: 30,
MIN_NOTIONAL_PROFIT: 1,
SOFT_MARGIN_RATIO_THRESHOLD: 0.5,
HARD_MARGIN_RATIO_THRESHOLD: 0.25,
}