Solarc: AI-Powered Solana Transaction Optimization & Security

Inspiration and Problem

Solana's blazing speed comes with a dark side. 25-40% of all transactions on Solana fail due to network congestion according to Dune Analytics. Meanwhile, security vulnerabilities continue to plague the ecosystem, with research showing approximately 25% of smart contracts contain critical security flaws that could lead to catastrophic fund loss.

We built Solarc because we were sick of wasting SOL on failed transactions and watching projects get rekt by preventable exploits.

What it does

Solarc offers three powerful features that work together to enhance the Solana user experience:

  1. Network Congestion Monitoring - Uses real-time data and machine learning to predict network conditions, helping users save on gas fees by identifying optimal transaction windows. Our XGBoost model analyzes historical patterns to forecast congestion levels with high accuracy.

  2. Transaction Scheduler - Automatically schedules transactions based on network conditions to minimize failure rates. Users can set parameters like maximum acceptable failure rates, and Solarc will execute transactions when conditions are optimal.

  3. SecureScan - Provides comprehensive security analysis for Solana smart contracts. By scanning GitHub repositories, SecureScan identifies potential vulnerabilities, validates program IDs, and presents findings in an intuitive visual interface that helps developers understand and address security issues before deployment.

How we built it

Solarc combines a robust backend with an intuitive frontend to deliver a seamless user experience:

Backend:

  • Built with FastAPI in Python for high-performance API endpoints
  • Implemented XGBoost models with custom regularization for time-series forecasting of network congestion
  • Developed a comprehensive security analysis pipeline for Solana smart contracts
  • Integrated with GitHub's API for code retrieval and analysis
  • Created a multi-agent system for analyzing transaction patterns and security vulnerabilities

Frontend:

  • Developed with React for a responsive and interactive user interface
  • Implemented real-time data visualization with Chart.js
  • Used Privy for seamless authentication across multiple methods
  • Created interactive code visualization tools using React-D3-Tree
  • Built a custom Solana wallet interface with transaction scheduling capabilities

Blockchain Integration:

  • Leveraged Solana web3.js for blockchain interaction
  • Implemented SPL token standards for comprehensive token support
  • Created custom algorithms for transaction failure prediction

Challenges we ran into

Building Solarc presented several significant challenges:

  1. Data Reliability and Collation - Obtaining consistent, real-time network data for Solana proved challenging. We had to build redundant data pipelines and implement fallback mechanisms to ensure our predictions remained accurate even when primary data sources experienced issues.

  2. Security Analysis Complexity - Developing a comprehensive security scanner for Solana smart contracts required deep understanding of common vulnerabilities and attack vectors. We spent considerable time researching and implementing detection algorithms for various security issues.

  3. Transaction Timing Precision - Achieving the right balance between transaction cost optimization and success rate was difficult. Our initial models were either too conservative (missing optimal windows) or too aggressive (resulting in failed transactions). Fine-tuning this balance required extensive testing and model refinement.

  4. Integration Complexity - Connecting all three major features into a cohesive platform while maintaining performance was challenging. We had to carefully architect our system to ensure that data flowed efficiently between components without creating bottlenecks.

Accomplishments that we're proud of

  1. Predictive Accuracy - Our network congestion prediction model achieves over 85% accuracy in forecasting high-congestion periods, allowing users to save significantly on transaction fees. This is done through applying L2 regularization to prevent overfitting and conducting crossfold validation for hyperparameter tuning.

  2. Transaction Success Rate and Scheduling - The transaction scheduler drastically reduces failure rates compared to immediate execution during congested periods.

  3. Security Vulnerability Detection - SecureScan successfully identifies common security issues in Solana smart contracts, including reentrancy vulnerabilities, improper validation, and unauthorized access patterns saving developers hours of debugging and exposing valuable vulnerabilities.

  4. Accessible Wallets - We integrated the Privy service provider to provide the option to onboard using traditional Web2 login methods such as social media and emails to allow for more accessible entrance to our platform.

  5. Intuitive Visualization - We created an elegant, user-friendly interface that makes complex blockchain data and security analysis accessible to users of all technical levels.

  6. End-to-End Solution - Successfully integrating network analysis, transaction optimization, and security scanning into a single platform provides a comprehensive solution for Solana users and developers.

What we learned

This project deepened our understanding of:

  1. Blockchain Data Analysis - Working with real-time and historical Solana data taught us valuable lessons about data processing, normalization, and prediction in high-throughput blockchain environments.

  2. Machine Learning for Time Series - Implementing and fine-tuning XGBoost models for network congestion prediction improved our skills in feature engineering and model optimization for time-series data.

  3. Smart Contract Security - Developing SecureScan required extensive research into Solana-specific security vulnerabilities, significantly expanding our knowledge of blockchain security principles.

  4. Full-Stack Integration - Building a cohesive platform that connects backend ML models with frontend visualization challenged us to create efficient data pipelines and optimize performance across the stack.

What's next for Solarc

We have ambitious plans to expand Solarc's capabilities:

  1. Multi-Chain Support - Extend our platform to support additional blockchains beyond Solana, starting with Ethereum and Polygon.

  2. Advanced Security Analysis - Enhance SecureScan with more sophisticated vulnerability detection algorithms and automated fix suggestions.

  3. Mobile Application - Develop a mobile version of Solarc to provide on-the-go transaction optimization and security alerts.

  4. Developer API - Create a comprehensive API that allows developers to integrate Solarc's capabilities directly into their applications and development workflows.

  5. Community Security Database - Build a community-driven database of known vulnerabilities and best practices for Solana development.

By continuing to innovate at the intersection of AI, blockchain, and security, Solarc aims to become the essential toolkit for anyone building or transacting on Solana.

Built With

+ 1 more
Share this project:

Updates