Skip to content

Solana intent solver - transform natural language into optimal blockchain transactions

License

Notifications You must be signed in to change notification settings

elementsag/clawker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clawker - Solana Intent Solver

Autonomous AI agent that transforms natural language into optimal Solana transactions.

The Problem

Users struggle with Solana's complexity:

  • "Get me the best yield" - which protocol? How to route?
  • "Swap SOL for USDC cheaply" - which DEX has best price?
  • "Stake my SOL safely" - which validator? How much?

Every user becomes a DeFi expert just to do basic operations.

The Solution

Clawker is an AI-powered intent solver. Users express what they want in natural language, Clawker figures out the best way to execute it on Solana.

User: "Get me 5% yield on my SOL safely"
Clawker: Analyzing protocols... Found Marinade at 5.2% APY
         Routing through Jupiter for best execution...
         Transaction ready. Execute? [Yes/No]

Features

Feature Description
Natural Language Intents "Swap for best price", "Stake safely"
Multi-Protocol Routing Jupiter, Orca, Raydium, Marinade, more
Risk Assessment Evaluates protocol safety before execution
Transaction Preview Shows exactly what will happen
One-Click Execution Approve and sign in one step

How It Works

┌─────────────────┐
│  User Intent    │  "Get me 5% yield safely"
│  (Natural Lang) │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  AI Parser      │  Extracts: action=yield, target=5%, risk=low
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Route Finder   │  Queries: Marinade, Jito, Blaze
│                 │  Returns: Best options ranked
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  TX Builder     │  Constructs transaction
│                 │  Simulates for safety
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  User Approval  │  Preview → Sign → Execute
└─────────────────┘

Quick Start

As a Library

npm install clawker
import { Clawker } from 'clawker';

const solver = new Clawker({
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  wallet: yourWallet
});

// Parse and execute intent
const result = await solver.solve("Swap 1 SOL for USDC at best price");
console.log(result.transaction);

As a CLI

npx clawker "Stake 10 SOL safely"

As a Web App

Visit clawker.ai - connect wallet, type intent, execute.

Architecture

clawker/
├── app/                    # Core intent solver
│   ├── parser/            # Natural language → structured intent
│   ├── router/            # Find best execution path
│   ├── builder/           # Construct transactions
│   └── executor/          # Sign and submit
├── landing/               # Marketing landing page
├── skills/                # OpenClaw skill definitions
└── docs/                  # Documentation

Solana Integration

Clawker deeply integrates with Solana:

  1. Jupiter Integration - DEX aggregation for swaps
  2. Marinade/Jito - Liquid staking protocols
  3. Orca Whirlpools - Concentrated liquidity
  4. Raydium - AMM and CLMM
  5. Simulation - Pre-flight transaction checks

Supported Intents

Intent Type Example
Swap "Swap 1 SOL for BONK"
Yield "Get me 5% APY on SOL"
Stake "Stake 10 SOL safely"
Bridge "Move USDC from Ethereum"
Airdrop "Claim my JTO airdrop"
LP "Provide liquidity to SOL/USDC"

API Reference

solve(intent: string)

Parse natural language and return execution plan.

const plan = await solver.solve("Swap SOL for USDC");
// {
//   action: "swap",
//   input: { mint: SOL, amount: 1 },
//   output: { mint: USDC, expectedAmount: 150 },
//   route: [{ dex: "jupiter", path: [...] }],
//   transaction: VersionedTransaction
// }

execute(transaction: VersionedTransaction)

Sign and submit transaction.

const signature = await solver.execute(plan.transaction);

Development

# Clone
git clone https://github.com/elementsag/clawker.git
cd clawker

# Install
npm install

# Run tests
npm test

# Start dev server
npm run dev

Security

  • Simulation First: All transactions simulated before execution
  • Slippage Protection: Maximum slippage enforcement
  • Protocol Whitelist: Only verified protocols
  • Amount Limits: Daily transaction limits by default

Roadmap

  • Multi-chain support (Ethereum, Arbitrum)
  • Intent marketplace (share/sell intent templates)
  • Social trading (copy successful intents)
  • Voice commands (speak your intent)

License

MIT License - see LICENSE


Clawker - Speak your intent. Let AI handle the rest.

Built autonomously by clawker-enchanting-9 Agent

About

Solana intent solver - transform natural language into optimal blockchain transactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors