T09 · Insecure Skill Coding Practices
- Location
scripts/src/trading/drift-client.ts:101- Finding
Live Trading Can Use Fabricated Fallback Market Data
- Content
View full analysis
({ marketIndex: m.index, symbol: m.symbol, oraclePrice: m.price, markPrice: m.price, fundingRate: m.rate, fundingRateApy: m.rate * 24 * 365 * 100, openInterest: 10000000, volume24h: 50000000 })); } ``` ```ts // scripts/src/trading/flash-client.ts:89-143 try { const response = await axios.get( `${COINGECKO_API}/derivatives/exchanges/flash_trade`, { timeout: 10000 } ); if (!response.data?.tickers) { throw new Error('No ticker data'); } // Live response processing omitted } catch (error: any) { logger.warn(`Flash API error: ${error.message}`); return this.getBackupMarketData(); } private getBackupMarketData(): FlashMarketInfo[] { return [ { symbol: 'SOL-PERP', oraclePrice: 185, fundingRate: 0.0008, fundingRateApy: 700, openInterest: 5000000, volume24h: 20000000 }, { symbol: 'BTC-PERP', oraclePrice: 98000, fundingRate: 0.0003, fundingRateApy: 262, openInterest: 10000000, volume24h: 50000000 }, { symbol: 'ET ...[truncated 2712 chars]- Remediation
View remediation
