Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 SolYield Pro - Autonomous DeFi Yield Optimizer on Solana

An AI-powered skill built on OKX Onchain OS that autonomously scans, compares, and optimizes DeFi yield opportunities across Solana protocols β€” maximizing returns while managing risk.

OKX Onchain OS Chain Competition License


πŸ“Œ Overview

SolYield Pro is an autonomous AI agent skill that continuously monitors top Solana DeFi protocols to identify and execute the highest-yielding opportunities. Powered by OKX Onchain OS, it automatically rebalances positions based on real-time APY changes, liquidity depth, and configurable risk parameters.

Key Features

  • πŸ” Multi-protocol APY scanning β€” Raydium, Orca, Marinade, Jupiter
  • βš–οΈ Auto-rebalancing β€” triggers when APY delta exceeds 2%
  • πŸ›‘οΈ Risk-first design β€” stop-loss, allocation caps, TVL monitoring
  • πŸ“Š Full observability β€” real-time dashboard & daily PnL reports
  • πŸ€– Fully autonomous β€” runs 24/7 via Agentic Wallet on Claude Code

πŸ—οΈ Architecture

User (Claude Code / Agentic Wallet)
        β”‚
        β–Ό
  SolYield Pro Skill
        β”‚
        β”œβ”€β”€ okx-market-data      β†’ Real-time price & APY feeds
        β”œβ”€β”€ okx-defi-invest      β†’ Protocol scanning (Raydium, Orca, Marinade)
        β”œβ”€β”€ okx-dex-swap         β†’ Position rebalancing via Jupiter aggregator
        β”œβ”€β”€ okx-wallet-portfolio β†’ Portfolio tracking & PnL reporting
        └── okx-security         β†’ Transaction risk assessment

πŸš€ Quick Start

Prerequisites

  • Claude Code installed
  • OKX Agentic Wallet configured
  • SOL or USDC funded in your Solana wallet

Installation

# Install OKX Onchain OS skills
npx skills add okx/onchainos-skills

# Verify installation
onchainos --version

Activate SolYield Pro

Type this in your Claude Code agent chat:

Activate SolYield Pro and scan for best yield opportunities on Solana

πŸ“ Strategy

1. Protocol Scanning

The agent scans the following Solana DeFi protocols every 15 minutes:

Protocol Type Monitored Pools
Raydium AMM / Liquidity SOL-USDC, RAY-SOL, mSOL-SOL
Orca CLMM USDC-USDT, SOL-USDC, ORCA-SOL
Marinade Finance Liquid Staking mSOL staking
Jupiter Aggregator Best route for rebalancing

2. Yield Comparison

APY Score = Base APY + (Volume Bonus Γ— 0.3) - (IL Risk Γ— 0.5)

Positions are ranked by adjusted APY score. The highest-scoring pool receives allocation priority.

3. Rebalancing Logic

IF current_pool_APY < best_pool_APY - 2%:
    β†’ Exit current position
    β†’ Swap via Jupiter (best route)
    β†’ Enter new highest-yield position

πŸ›‘οΈ Risk Control Framework

Parameter Limit Description
Max allocation per pool 30% Prevents over-concentration
Stop-loss trigger >15% IL Auto-exit on impermanent loss
TVL drop alert >20% in 24h Protocol safety check
Daily loss limit >10% portfolio Pause all trading
Whitelisted protocols only βœ… Only audited protocols

Security Policies

  • βœ… All transactions assessed by okx-security skill before execution
  • βœ… User confirmation required for positions > $500
  • βœ… Gas fee estimate shown before every transaction
  • βœ… No unaudited or new protocol exposure

πŸ“Š Observability

Real-time Metrics

πŸ“ˆ Active Positions    β†’ Current pools & allocations
πŸ’° Total Value         β†’ Portfolio value in USD
πŸ“‰ PnL Today           β†’ Realized + unrealized gains
⚑ Best APY Available  β†’ Top opportunity right now
πŸ”„ Last Rebalance      β†’ Timestamp & reason

Daily Report (auto-generated by agent)

═══════════════════════════════
   SolYield Pro Daily Report
═══════════════════════════════
Date        : 2026-05-09
Portfolio   : $XXX.XX
PnL Today   : +$XX.XX (+X.XX%)
Fees Paid   : $X.XX
Net Yield   : $XX.XX
Top Pool    : Raydium SOL-USDC (APY: XX%)
Rebalances  : X times
═══════════════════════════════

πŸ’¬ Example Agent Commands

# Check current yield opportunities
"Show me the best yield pools on Solana right now"

# Start automated yield optimization
"Start SolYield Pro with $200 budget on Solana"

# Check portfolio performance
"Show my SolYield Pro performance today"

# Adjust risk settings
"Set my max allocation per pool to 20%"

# Manual rebalance
"Rebalance my yield positions now"

🧰 Skills Used

Skill Purpose
okx-defi-invest Scan DeFi protocols & APY data
okx-dex-swap Execute swaps via best route
okx-market-data Real-time price feeds
okx-wallet-portfolio Track positions & PnL
okx-security Pre-transaction risk check
okx-agentic-wallet Core wallet operations

πŸ“ Repository Structure

Agentic/
β”œβ”€β”€ README.md                    ← You are here
β”œβ”€β”€ skills-lock.json             ← Installed skills manifest
└── .agents/
    └── skills/
        β”œβ”€β”€ okx-agentic-wallet/
        β”œβ”€β”€ okx-defi-invest/
        β”œβ”€β”€ okx-dex-swap/
        β”œβ”€β”€ okx-market-data/
        β”œβ”€β”€ okx-wallet-portfolio/
        β”œβ”€β”€ okx-security/
        └── ... (18 skills total)

⚠️ Disclaimer

Trading digital assets involves significant risk. SolYield Pro is an experimental AI agent skill. Past performance does not guarantee future results. Always trade within your risk tolerance. The developer is not responsible for any financial losses incurred through the use of this skill.


πŸ‘€ Author

frankxeth


πŸ“„ License

MIT License β€” feel free to fork, improve, and build upon SolYield Pro.


Built with ❀️ on OKX Onchain OS Γ— Claude Code
OKX Agentic Trading Contest 2026

About

🌊 Autonomous DeFi Yield Optimizer on Solana | Built on OKX Onchain OS | Agentic Trading Contest 2026

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors