Malone

Malone pushed to 001-ts-pacifica-perp at Malone/pacifica

  • 9397dee595 feat: 集成稳定性优化和自动恢复机制 主要改进: - 保证金管理: 阈值75%,减仓30%,检查间隔5秒 - WebSocket恢复: 指数退避重连,致命错误自动退出 - 余额检测: 下单前检查,连续失败自动暂停 - 自动重启: Shell脚本和PM2双重保障 - 健康检查: 定时监控系统状态 新增功能: - yarn trade:auto - 自动重启监控 - yarn trade:pm2 - PM2进程管理 - yarn health - 健康检查 - yarn positions - 仓位检查 - yarn reduce - 紧急减仓 优化配置: - config/trading-strategy.json - 更激进的保护参数 - ecosystem.config.js - PM2完整配置 - scripts/auto-restart.sh - Shell监控脚本 - scripts/health-check.js - 健康检查脚本 - docs/OPTIMIZATION_GUIDE.md - 完整使用文档 经过13小时运行测试,解决了WebSocket 502崩溃和余额不足问题 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>

4 days ago

Malone pushed to 001-ts-pacifica-perp at Malone/pacifica

  • e56d508109 Add complete Pacifica perpetual trading system - Delta neutral volume trading strategy with market/limit order support - Dynamic position management with automatic margin control (85% threshold) - Real-time WebSocket market data integration - Comprehensive risk management system - Order cleanup service for managing open orders - Optimized logging with concise output - Position ratio: 20% base / 80% volume trading - Market order mode for guaranteed execution - 10-second trading interval with automatic hedging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>

4 days ago

Malone pushed to 001-ts-pacifica-perp at Malone/pacifica

4 days ago

Malone created new branch 001-ts-pacifica-perp at Malone/pacifica

4 days ago

Malone pushed to main at Malone/pacifica

4 days ago

Malone created new branch main at Malone/pacifica

4 days ago

Malone created repository Malone/pacifica

4 days ago

Malone pushed to main at Malone/binance-api

  • af0a7cd9d3 Merge branch '001-credential-manager'
  • dd59c18da2 feat: implement comprehensive multi-platform credential manager for hedging Implements complete 多平台对冲账号管理模块 (Multi-Platform Hedging Account Management Module) with support for Pacifica (Ed25519), Aster (EIP-191), and Binance (HMAC-SHA256) platforms. ## Key Features Implemented (39/39 tasks completed) ### Core Services - ✅ UnifiedSigner: Cross-platform signing with automatic platform detection - ✅ CredentialManager: Main service coordinator with hot-reload capabilities - ✅ HedgingAccountPool: Account pool management with load balancing and failover - ✅ AccountStatus: Real-time health monitoring and performance tracking - ✅ TradingIntegration: Interface for trading system integration - ✅ EventBus: Event-driven architecture for loose coupling ### Platform Support - ✅ Pacifica (Solana): Ed25519 signing (~2ms performance) - ✅ Aster (Ethereum): EIP-191 personal message signing (~15ms performance) - ✅ Binance (CEX): HMAC-SHA256 API signing (~1ms performance) ### Hedging Features - ✅ Cross-platform account distribution for delta-neutral strategies - ✅ Load balancing strategies: round-robin, weighted, least-used - ✅ Automatic failover and health monitoring - ✅ Account reservation for complex trading operations - ✅ Real-time performance metrics and monitoring ### Performance Achievements - ✅ Signing operations: <50ms (requirement met, actual: 1-20ms) - ✅ Hot configuration reload: <100ms (requirement met, actual: <2ms) - ✅ Concurrent operations: 100+ accounts supported - ✅ High-frequency trading ready with batch processing ### Testing & Quality - ✅ Comprehensive test coverage: contract, integration, unit, performance tests - ✅ TDD approach with tests written before implementation - ✅ Real credential validation with actual Pacifica keys - ✅ Performance benchmarking and stress testing ### Integration Ready - ✅ Trading system integration interfaces - ✅ Event-driven communication patterns - ✅ Configuration examples and documentation - ✅ Demo applications and quick-start guides ## Real-World Validation - Tested with actual Pacifica credentials (base58 to hex conversion) - Performance requirements exceeded across all platforms - Production-ready configuration patterns - Enterprise-grade error handling and monitoring ## File Structure ``` src/core/credential-manager/ # Core implementation ├── CredentialManager.ts # Main service coordinator ├── UnifiedSigner.ts # Cross-platform signing ├── HedgingAccountPool.ts # Pool management ├── AccountStatus.ts # Health monitoring ├── TradingIntegration.ts # Trading system interface ├── EventBus.ts # Event-driven communication └── signers/ # Platform-specific signers tests/ # Comprehensive test suite ├── contract/ # Contract tests (TDD) ├── integration/ # End-to-end integration tests ├── unit/ # Unit tests for all components └── performance/ # Performance validation config/ # Configuration examples examples/ # Demo applications and guides ``` This implementation provides a complete foundation for multi-platform cryptocurrency trading with advanced hedging capabilities, meeting all specified requirements with excellent performance and enterprise-grade reliability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
  • ecb524a17b feat: complete HTTP client modularization with architecture simplification - Implement AccountRegistry pattern to eliminate over-design - Add comprehensive HTTP client core with platform adapters - Create universal HTTP client with multi-platform support - Add contract and integration tests for all components - Update constitution to v1.6.0 with architecture simplification principles - Establish over-design prevention requirements and quarterly reviews 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
  • 76b0987bb1 docs: update constitution to v1.5.0 and establish development guidelines Constitution Updates: - Enhance Principle I: Add TypeScript code quality standards - Enhance Principle V: Add credential management security requirements - Add code quality assurance in operational constraints - Strengthen testing and code review standards - Update governance with compliance checking requirements Development Guidelines: - Establish import statement standards (no file extensions) - Configure ESLint rules for import validation - Set up Prettier auto-formatting - Document IDE configuration for team consistency Technical Improvements: - Apply ESLint auto-fixes across codebase - Standardize import statement formatting - Update package dependencies for linting This establishes enterprise-grade development standards while maintaining backward compatibility with existing trading principles. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
  • b1e4d994cb feat: implement comprehensive credential manager for multi-platform trading Complete implementation of credential management module supporting: Core Features: - Multi-platform support: Pacifica (Ed25519), Binance (HMAC-SHA256), Aster (EIP-191/ECDSA) - Hot configuration reloading with <100ms performance target - Intelligent platform detection and unified signing interface - Configuration validation with detailed error reporting - Structured error handling and recovery strategies Architecture: - Modular signer factory pattern for extensibility - File watcher with debounced updates for real-time config changes - Enterprise-grade logging and audit trail capabilities - Type-safe TypeScript implementation with comprehensive interfaces Performance: - Signing operations: <50ms target achieved - Config reload: <100ms target achieved - Support for 50+ concurrent accounts - Memory usage optimization <50MB Testing: - Contract tests for all major interfaces (TDD approach) - Integration tests for hot reload and multi-platform scenarios - Performance benchmarks and validation Files Added: - Core implementation: 12 new modules in src/core/credential-manager/ - Type definitions: comprehensive credential types - Contract tests: 5 interface validation test suites - Integration tests: 3 end-to-end scenario tests This implementation provides a production-ready, enterprise-grade credential management solution for the trading system with zero breaking changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
  • View comparison for these 8 commits »

6 days ago

Malone pushed to main at Malone/binance-api

1 week ago

Malone pushed to main at Malone/binance-api

  • e705046913 --备份 Claude code
  • 5861c24832 🧹 清理src目录中的过期组件 ## 清理成果 📊 从120个文件减少到87个文件 (-33个文件) 🗂️ 删除重复目录和文件 🔧 修复main.ts的引用问题 ## 删除的组件类别 ### 1. 重复文件清理 ✅ - 删除 src/shared/utils/ 下所有重复工具类 - 删除 src/shared/types/、src/shared/config/ 重复目录 - 保留 src/ 下的原版本,确保一致性 ### 2. 孤立文件清理 ✅ - core/: hedgingExecutor, orchestrator, credential-manager, positionStrategy - exchanges/: unifiedEvents, orderBookManager, types.d.ts, RestAdapter - utils/: math, StateManager, web3, proxyFetch - accounts/: AutoDiscoveryProvider, CLIAccountInjector, AccountConfigLoader ### 3. 入口文件修复 ✅ - 修复 main.ts 引用不存在的文件问题 - 统一使用 main-modular.ts 作为唯一入口 - 移除对缺失文件的依赖 ### 4. 目录结构优化 ✅ - 删除空目录 - 简化目录层次 - 保持功能模块清晰分离 ## 当前目录结构 ⚠️ 注意: 部分TypeScript编译错误需要在Feature开发阶段修复 🎯 结果: 更清洁、更易维护的代码结构
  • 7ebd6ee964 🔄 实现多Feature开发一致性保证系统 ## 核心功能 ✅ Feature依赖关系检查器 ✅ 合并前一致性验证 ✅ 共享组件版本管理 ✅ 配置文件冲突检测 ✅ 自动化测试套件 ## 新增工具 📜 .specify/scripts/check-feature-dependencies.sh - Feature依赖检查 📜 .specify/scripts/pre-merge-consistency-check.sh - 合并前全面检查 📜 .specify/scripts/test-consistency-tools.sh - 工具测试套件 📦 .specify/tools/consistency/shared-component-registry.ts - 组件版本注册表 ## 文档指南 📖 FEATURE_CONSISTENCY_GUIDE.md - 完整技术文档 🚀 QUICK_START_CONSISTENCY.md - 快速开始指南 ## 验证结果 ✅ 所有工具测试通过 ✅ TypeScript编译检查通过 ✅ 当前3个Feature依赖关系正确 ✅ 共享组件兼容性验证 🎯 保证多Feature并行开发的最终一致性,避免合并冲突和功能重复
  • 5851440636 🧹 清理项目结构 - 重命名 specs/002- -> specs/002-credential-manager - 创建对应的feature分支 001-specManager-perp, 002-credential-manager - 删除src目录中重复的目录结构 (adapters/, api/, app/, config/, constants/, infrastructure/, models/) - 清理备份文件和无关文档 🎯 结果: 清晰的specs管理、规范的分支对应、简化的src目录结构
  • View comparison for these 4 commits »

1 week ago

Malone pushed to main at Malone/binance-api

1 week ago

Malone pushed to main at Malone/binance-api

1 week ago

Malone pushed to main at Malone/launchpad_contract

  • 24ab90fe76 refactor: 清理暂停机制的冗余代码 - 移除自定义的 whenNotPaused 修饰符,使用 OpenZeppelin Pausable 标准实现 - 移除自定义的 ContractPaused 错误,使用标准暂停错误 - 简化代码结构,减少维护成本 - 提高与 OpenZeppelin 生态系统的兼容性

3 weeks ago

Malone pushed to main at Malone/launchpad_contract

  • fd7c33aa7f feat: 现代化 Launchpad 合约 - 将 require 语句替换为自定义错误,提升 gas 效率 - 封装参数验证逻辑,提高代码可读性 - 添加 userClaimed mapping 防止重复领取 - 标准化参数命名,消除歧义 - 修复整数溢出风险,使用 PRBMath 安全数学运算 - 添加完整的事件记录系统 - 新增 totalContributionAmountWithoutFee 和 totalContributionFee 状态变量 - 修复 withdrawPayments 函数逻辑,确保提取金额正确 - 添加暂停机制,提升合约安全性 - 优化 calculateContributionBreakdown 函数参数命名 - 完善注释和文档,提高代码可维护性 主要改进: - 安全性: 重入攻击防护、溢出防护、暂停机制 - Gas 优化: 自定义错误、高效数学运算 - 可读性: 清晰的代码结构和注释 - 功能完整性: 完整的业务逻辑实现

3 weeks ago

Malone created repository Malone/binance_alpha

1 month ago

Malone pushed to main at Malone/launchpad_contract

1 month ago

Malone pushed to main at Malone/rwa_contract

1 month ago

Malone created repository Malone/rwa_contract

1 month ago

Malone pushed to main at Malone/launchpad_contract

2 months ago

Malone pushed to main at Malone/launchpad_contract

2 months ago