fix: Correct ETH-PERP minimum order size to 0.001 ETH

**Problem:**
Config had minOrderSize: 0.01 ETH for ETH-PERP, but user successfully opens positions as small as $4-8 (0.001-0.002 ETH at ~$4000/ETH).

Database shows successful ETH trades:
- $8 positions = 0.002 ETH at $4000/ETH
- $4 positions = 0.001 ETH at $4000/ETH

**Actual Drift Minimum:**
0.001 ETH (~$4 at $4000/ETH), NOT 0.01 ETH

**Fix:**
Updated config/trading.ts:
- minOrderSize: 0.01 → 0.001 ETH
- Updated comment to reflect actual minimum

**Impact:**
-  Accurate minimum validation
-  Small runner positions (0.0005-0.001 ETH) won't be falsely flagged
-  Prevents incorrect "forcing 100% close" on valid sizes
-  Allows proper data collection at $4 position size

**Note:**
The previous fix for checking minOrderSize before close is still valid and needed - it just now uses the correct minimum (0.001 instead of 0.01).
This commit is contained in:
mindesbunister
2025-11-03 16:33:31 +01:00
parent cfc15cd3b0
commit d5b3dbbbee

View File

@@ -165,10 +165,10 @@ export const SUPPORTED_MARKETS: Record<string, MarketConfig> = {
symbol: 'ETH-PERP',
driftMarketIndex: 2,
pythPriceFeedId: '0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace',
minOrderSize: 0.01, // 0.01 ETH minimum
minOrderSize: 0.001, // 0.001 ETH minimum (actual Drift minimum ~$4 at $4000/ETH)
tickSize: 0.01,
// DATA COLLECTION MODE: Minimal risk (Drift minimum 0.01 ETH = ~$38)
positionSize: 40, // $40 base capital (meets exchange minimum)
// DATA COLLECTION MODE: Minimal risk
positionSize: 40, // $40 base capital
leverage: 1, // 1x leverage = $40 total exposure
},
}