Files
defi-arbitrage/config.ts
DBIS Core Team 73e8d30190 chore: sync state and push to Gitea
Made-with: Cursor
2026-03-02 13:17:20 -08:00

86 lines
2.3 KiB
TypeScript

// Deal Orchestration Tool - Configuration
// ChainID 138 token addresses and protocol settings
/**
* ChainID 138 Token Addresses
* Source: docs/11-references/CHAIN138_TOKEN_ADDRESSES.md
*/
export const CHAIN138_TOKENS = {
WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
WETH10: '0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f',
LINK: '0xb7721dD53A8c629d9f1Ba31a5819AFe250002b03',
cUSDT: '0x93E66202A11B1772E55407B32B44e5Cd8eda7f22',
cUSDC: '0xf22258f57794CC8E06237084b353Ab30fFfa640b',
} as const;
/**
* RPC Configuration
*/
export const RPC_CONFIG = {
chainId: 138,
rpcUrl: process.env.CHAIN138_RPC_URL || 'http://192.168.11.211:8545',
explorerUrl: 'https://explorer.d-bis.org',
} as const;
/**
* Default Risk Parameters
*/
export const DEFAULT_RISK_PARAMS = {
MAX_LTV: 0.30, // 30% maximum loan-to-value
MAX_USDTZ_EXPOSURE_PCT: 0.25, // 25% of total NAV
DEFAULT_USDTZ_DISCOUNT: 0.40, // 40% discount
DEFAULT_MONETIZATION_SPLIT: {
redemptionPortion: 0.35, // 35% for redemption
coldStoragePortion: 0.65, // 65% for cold storage
},
} as const;
/**
* Redemption Test Amounts (in USD)
* Progressive testing: $50k → $250k → $1M+
*/
export const REDEMPTION_TEST_AMOUNTS = [
50_000, // $50k
250_000, // $250k
1_000_000, // $1M
] as const;
/**
* Capital Split Defaults
* Example: $10M total → $5M core, $3M working, $2M opportunistic
*/
export const DEFAULT_CAPITAL_SPLIT = {
coreEthPct: 0.50, // 50% core ETH (never touched)
workingLiquidityPct: 0.30, // 30% working liquidity
opportunisticUsdtzPct: 0.20, // 20% opportunistic USDTz
} as const;
/**
* Protocol Addresses (to be configured based on actual deployment)
*/
export const PROTOCOL_ADDRESSES = {
// Lending protocol on ChainID 138
lendingProtocol: process.env.CHAIN138_LENDING_PROTOCOL || '',
vault: process.env.CHAIN138_VAULT_ADDRESS || '',
ledger: process.env.CHAIN138_LEDGER_ADDRESS || '',
// USDTz swap/redemption contract
usdtzSwap: process.env.CHAIN138_USDTZ_SWAP_ADDRESS || '',
usdtzRedeem: process.env.CHAIN138_USDTZ_REDEEM_ADDRESS || '',
} as const;
/**
* Asset Type Mappings
*/
/** Tezos mainnet chain ID for USDtz routing */
export const TEZOS_CHAIN_ID = 1729;
export const ASSET_TYPES = {
ETH: 'ETH',
WETH: 'WETH',
WETH10: 'WETH10',
USDT: 'USDT',
cUSDT: 'cUSDT',
cUSDC: 'cUSDC',
USDTz: 'USDTz',
} as const;