What if you could understand what a Solana transaction is doing before deciding whether to approve it?
That question inspired me to build SolanaGuard AI, an AI-powered Solana transaction security assistant.
I built this project as an individual developer while participating in a Solana hackathon. My goal was to explore how blockchain data and AI could work together to make transaction information easier to understand, especially for people who may not be comfortable reading raw blockchain transaction details.
🔗 Explore SolanaGuard AI
- 🚀 Live Demo: Try SolanaGuard AI
- 💻 GitHub Repository: View the source code
Understand Before You Sign.
The problem
Interacting with blockchain applications often involves approving transactions without fully understanding what is happening behind the scenes.
A transaction may contain multiple instructions, interact with different programs, or involve changes to token permissions and account authorities.
For experienced developers, inspecting these details may be manageable. For beginners and everyday users, however, understanding what they mean can be difficult.
I wanted to explore a solution that could help users inspect transaction details and understand potential warning signs before making a decision.
What I built
SolanaGuard AI allows users to submit a Solana transaction signature for analysis.
The application retrieves transaction information from the Solana Devnet, examines available transaction details, applies deterministic risk checks, and uses AI to explain the findings in plain language.
The main idea is simple:
Understand Before You Sign.
Some of the features include:
- Solana Devnet transaction retrieval.
- Transaction status and instruction analysis.
- Examination of available account and token-related information.
- Rule-based risk scoring.
- Evidence-based security findings.
- AI-powered explanations to make technical findings easier to understand.
One important design decision was separating the risk engine from the AI explanation layer.
The risk score is calculated using deterministic rules. AI helps explain the findings; it does not determine or secretly modify the risk score.
This distinction matters because an AI-generated explanation should not be treated as verified blockchain evidence.
Technology stack
Here are the technologies I used:
| Component | Technology |
|---|---|
| Frontend | React, Vite, TypeScript |
| Styling | Tailwind CSS |
| Backend | Python, FastAPI |
| Blockchain data | Solana Devnet JSON-RPC |
| AI integration | Backboard API |
| HTTP requests | Python HTTPX |
| Frontend deployment | Vercel |
| Backend deployment | Render |
I chose Python and FastAPI for the backend because I wanted a straightforward way to retrieve and process transaction data while keeping the application modular.
Some technical challenges I encountered
Building this project was not just about writing code. I also had to understand how the different components communicate.
1. Working with Solana transaction data
Retrieving a transaction is only the beginning. Understanding its instructions, accounts, metadata, and token-related information requires careful parsing.
I also had to account for missing metadata, unsupported transaction versions, failed transactions, and RPC errors.
2. Designing the risk engine
I wanted the application to provide useful warnings without automatically treating unfamiliar programs as malicious.
This meant designing transparent rules and attaching evidence to findings rather than making unsupported security claims.
3. Separating AI explanations from verified facts
AI can make technical information easier to understand, but it can also produce inaccurate explanations.
I designed the system so that deterministic analysis provides the findings and AI helps communicate them. Unknown information should remain unknown rather than being presented as fact.
4. Deployment and CORS
Getting the application running locally was one milestone. Deploying the backend to Render and preparing the frontend for Vercel introduced another set of challenges.
I encountered a CORS issue while connecting the frontend and backend. Debugging it helped me understand how browser origins, API URLs, and environment variables work together.
These challenges reminded me that building a working application involves much more than getting the code to compile.
What I learned
This project has helped me understand several important concepts:
- How to interact with Solana through JSON-RPC.
- How transaction instructions and metadata can be inspected.
- How to design a rule-based risk analysis system.
- How to integrate an AI API into a backend application.
- How to structure a React and FastAPI application.
- How to debug CORS and environment variable issues.
- How to deploy a full-stack application using Render and Vercel.
I also learned that AI should support security analysis, not replace evidence or create a false sense of security.
What SolanaGuard AI does NOT do
I think it is important to be transparent about the limitations.
SolanaGuard AI does not:
- Sign or execute transactions.
- Approve or block wallet transactions.
- Guarantee that a transaction is safe.
- Detect every possible scam or malicious program.
- Replace a professional security audit.
It is an analysis assistant intended to help users understand available transaction information and identify potential warning signs.
What's next?
There is still room to improve the project.
Some areas I would like to explore include:
- Better decoding of supported Solana instructions.
- More comprehensive token authority and delegation analysis.
- Additional transaction security heuristics.
- Improved handling of unknown or unavailable transaction data.
- More testing with real-world transaction examples.
- Further improvements to the user experience.
Final thoughts
Building SolanaGuard AI has been a valuable learning experience.
As someone exploring the intersection of AI and blockchain development, this project gave me an opportunity to move beyond tutorials and work on a practical problem.
It also reminded me that good AI engineering is not simply about adding an AI API to an application. It is about deciding where AI is useful, where deterministic logic is more appropriate, and how to communicate uncertainty honestly.
I'm looking forward to improving the project and learning from feedback from the Solana and developer communities.
Understand Before You Sign.
If you're building in the Solana ecosystem or exploring AI-powered security tools, I'd love to hear your thoughts.