gitmyhub

smart-transaction-stack

TypeScript ★ 0 updated 1mo ago

A hackathon project that makes Solana stablecoin payments more reliable by tracking their full lifecycle and using an AI agent to decide how to recover from failures.

TypeScriptNode.jsSolana web3.jsNext.jsSQLiteAnthropic SDKsetup: hardcomplexity 5/5

Solana Pay Dispatcher is a system built for a hackathon challenge that tries to make stablecoin payments on the Solana blockchain more reliable. The README explains that Nigeria moves over 22 billion dollars a year in stablecoin transactions, but Solana transactions can fail at rates above 40 percent during busy periods, and existing tools simply submit a transaction and give you no way to know what happened to it afterward.

This project wraps every payment in what is called a Jito bundle, which helps the transaction land safely and protects it from being manipulated by other actors on the network. It watches the network in real time using a Geyser data stream, calculates transaction tips dynamically based on live market conditions, and uses a Claude AI agent to decide how to respond when a payment fails, rather than relying on a fixed retry rule. Every payment moves through a tracked set of stages: queued, submitted, processed, confirmed, and finalized, with each step logged and checkable against a public block explorer.

When something goes wrong, such as an expired blockhash or an insufficient tip, the AI agent reads the type of failure along with current network health and tip statistics, then decides whether to retry, wait, or adjust the tip before resubmitting. At the end of a successful payment, the system produces a receipt containing the block slot number, total time taken, and a record of any retry decisions the AI made.

The project is built with TypeScript on Node.js, using the official Solana web3 and token libraries, the Jito block engine for bundle submission, a Yellowstone gRPC client for the Geyser stream, the Anthropic SDK for the Claude AI agent, and a SQLite database for storage. The dashboard is a Next.js and Tailwind CSS frontend with Recharts for charts. Setup requires cloning the repository, installing dependencies with npm, and filling in an environment file with API keys and endpoints for an RPC provider, the Geyser stream, and the Anthropic API before running the dispatcher and dashboard servers separately.

Where it fits