Yield Optimization logo

Yield Optimization

Organization
moonpay
yield-optimization

Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.

Overview

Publishermoonpay
Repositoryskills
Skill nameyield-optimization
Stars
112
Forks
30
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by moonpay on GitHub. Read the source before you install it.

Installation

Install the Yield Optimization AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/moonpay/skills/tree/main/skills/yield-optimization
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/moonpay/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/yield-optimization .claude/skills/yield-optimization
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Yield Optimization in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Yield Optimization on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Yield Optimization is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

yield.xyz — Multi-Chain Yield Optimization

Overview

yield.xyz (powered by StakeKit) aggregates 2,988+ yield opportunities across 75+ blockchains — lending, staking, vaults, restaking, and liquidity pools. The agent skill uses shell scripts to discover yields, build unsigned transactions, and sign them with your MoonPay wallet.

find-yields.sh    → discover opportunities by chain + token
enter-position.sh → build unsigned deposit transaction
mp transaction send → sign and broadcast with MoonPay wallet
check-portfolio.sh → monitor balances and pending rewards
exit-position.sh  → build unsigned withdrawal transaction

Prerequisites

bash
# curl and jq (required)
which curl jq

# MoonPay CLI for wallet + signing
npm install -g @moonpay/cli
mp login

export YIELDS_API_KEY="..."   # optional: get one at https://dashboard.yield.xyz

Installation

bash
npx clawhub@latest install yield-agent

Or manually:

bash
git clone https://github.com/stakekit/yield-agent.git ~/.openclaw/skills/yield-agent
chmod +x ~/.openclaw/skills/yield-agent/scripts/*.sh

Commands

ScriptDescription
find-yields.sh [chain] [token]Discover yields by network and token
get-yield-info.sh [yield-id]Retrieve yield schema and validator info
list-validators.sh [yield-id]List validators for staking positions
enter-position.sh [yield-id] [address] [params]Build unsigned deposit transaction
exit-position.sh [yield-id] [address]Build unsigned withdrawal transaction
manage-position.sh [yield-id] [action]Claim rewards, restake, redelegate
check-portfolio.sh [yield-id] [address]View balances and pending actions

Core Workflow

1. Discover Yields

bash
# Find USDC yields on Base
./scripts/find-yields.sh base USDC

# Find ETH staking on Ethereum
./scripts/find-yields.sh ethereum ETH

2. Inspect a Yield

bash
# Get schema and requirements before entering
./scripts/get-yield-info.sh base-usdc-aave-v3-lending

Always fetch the yield schema before executing — it specifies required params and multi-step order.

3. Enter a Position

bash
# Build unsigned deposit transaction (amounts are human-readable — "100" = 100 USDC)
./scripts/enter-position.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS '{"amount":"100"}'
# → returns unsignedTransaction JSON

4. Sign with MoonPay

bash
# Step 1: Sign the unsigned transaction
mp transaction sign \
  --wallet "yield-agent" \
  --chain base \
  --transaction '<unsignedTransaction from step 3>'
# → returns signedTransaction JSON

# Step 2: Broadcast the signed transaction
mp transaction send \
  --chain base \
  --transaction '<signedTransaction from step 1>'

For multi-step transactions, execute in stepIndex order. Sign each step exactly as returned — never modify unsignedTransaction.

5. Monitor Portfolio

bash
./scripts/check-portfolio.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS

6. Exit a Position

bash
./scripts/exit-position.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS
# → sign result with mp transaction send

7. Manage Rewards

bash
./scripts/manage-position.sh base-usdc-aave-v3-lending claim
./scripts/manage-position.sh ethereum-eth-lido-staking redelegate

Wallet Setup with MoonPay

bash
# Create a dedicated yield wallet
mp wallet create --name "yield-agent"
mp wallet retrieve --wallet "yield-agent"  # note addresses per chain

Funding Your Wallet

Buy with Fiat

bash
mp buy --token usdc_base --amount 500 --wallet <base-address> --email <email>
mp buy --token usdc_ethereum --amount 1000 --wallet <eth-address> --email <email>
mp buy --token eth_ethereum --amount 0.05 --wallet <eth-address> --email <email>

Bridge Cross-Chain

bash
# USDC on Ethereum → Base (chase higher yield)
mp token bridge \
  --from-wallet yield-agent --from-chain ethereum \
  --from-token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
  --from-amount 500 \
  --to-chain base \
  --to-token 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913

Bank Transfer (Large Capital)

bash
mp virtual-account create && mp virtual-account kyc submit
mp virtual-account bank-account add
mp virtual-account onramp create \
  --name "yield-onramp" --fiat usd --stablecoin usdc --chain ethereum --wallet <eth-address>

Check Balances / Withdraw

bash
mp token balance list --wallet <eth-address> --chain ethereum
mp virtual-account offramp create --amount 2000 --chain ethereum --wallet <eth-address>

Security

yield.xyz only builds unsigned transactions — your MoonPay wallet handles all signing. Keys are AES-256-GCM encrypted locally and never leave the machine. For large positions use a hardware wallet:

bash
mp wallet hardware add --name "yield-ledger"

End-to-End Workflow

  1. npx clawhub@latest install yield-agent
  2. mp wallet create --name "yield-agent"
  3. mp buy --token usdc_base --amount 500 --wallet <address> --email <email>
  4. ./scripts/find-yields.sh base USDC
  5. ./scripts/get-yield-info.sh <yield-id>
  6. ./scripts/enter-position.sh <yield-id> <address> '{"amount":"500"}'
  7. mp transaction sign --wallet "yield-agent" --chain base --transaction <unsignedTx> then mp transaction send --chain base --transaction <signedTx>
  8. ./scripts/check-portfolio.sh <yield-id> <address>
  9. mp virtual-account offramp create to withdraw earned yield

Resources

Related Skills

  • moonpay-check-wallet — Verify balances before depositing
  • moonpay-swap-tokens — Swap tokens to what a yield pool requires
  • moonpay-virtual-account — Bank transfer for large capital inflows
  • moonpay-trading-automation — Automate rebalancing on a schedule

Frequently asked questions

What does the Yield Optimization AI skill do?

Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.

Why use Yield Optimization on TypingMind?

Because you install it once and use it with any model. Yield Optimization is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Yield Optimization in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/moonpay/skills/tree/main/skills/yield-optimization. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Yield Optimization?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Yield Optimization?

As many as you like. As long as a model supports skills, you can use Yield Optimization with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Yield Optimization AI skill free?

Yes. It is published on GitHub by moonpay under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇