skills$openclaw/morpho-earn
lyoungblood2.4kā˜…

by lyoungblood

morpho-earn – OpenClaw Skill

morpho-earn is an OpenClaw Skills integration for coding workflows. Earn yield on USDC by supplying to the Moonwell Flagship USDC vault on Morpho (Base). Use when depositing USDC, withdrawing from the vault, checking position/APY, or setting up wallet credentials for DeFi yield.

2.4k stars6.7k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namemorpho-earn
descriptionEarn yield on USDC by supplying to the Moonwell Flagship USDC vault on Morpho (Base). Use when depositing USDC, withdrawing from the vault, checking position/APY, or setting up wallet credentials for DeFi yield. OpenClaw Skills integration.
ownerlyoungblood
repositorylyoungblood/morpho-earn
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lyoungblood/morpho-earn
last updatedFeb 7, 2026

Maintainer

lyoungblood

lyoungblood

Maintains morpho-earn in the OpenClaw Skills directory.

View GitHub profile
File Explorer
20 files
.
references
setup.md
2.6 KB
scripts
compound.ts
15.8 KB
config.ts
16.7 KB
deposit.ts
6.2 KB
package-lock.json
23.1 KB
package.json
333 B
report.ts
6.3 KB
rewards.ts
7.5 KB
setup.ts
9.5 KB
status.ts
4.2 KB
test-swap.ts
10.7 KB
tsconfig.json
388 B
withdraw.ts
7.0 KB
_meta.json
318 B
CLAUDE.md
3.2 KB
package.json
1.1 KB
README.md
7.9 KB
SKILL.md
6.0 KB
SKILL.md

name: morpho-earn description: Earn yield on USDC by supplying to the Moonwell Flagship USDC vault on Morpho (Base). Use when depositing USDC, withdrawing from the vault, checking position/APY, or setting up wallet credentials for DeFi yield. version: 1.2.0 metadata: {"clawdbot":{"emoji":"šŸŒœšŸŒ›","category":"defi","requires":{"bins":["node"]}}}

Morpho Earn — Earn safe yield on your USDC

Earn yield on USDC via the Moonwell Flagship USDC vault on Base (Morpho protocol).

Vault: 0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca Chain: Base (8453) Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)

Why This Vault?

The Moonwell Flagship USDC vault is one of the safest places to earn yield on Base:

  • Powers Coinbase — Provides $20M+ liquidity to Coinbase's BTC/ETH borrow products
  • Blue-chip collateral only — Loans backed by ETH, cbETH, wstETH, cbBTC
  • Conservative LTV ratios — Healthy collateral requirements
  • Isolated markets — Risk is compartmentalized
  • No rehypothecation — Your USDC isn't lent recursively
  • Battle-tested — Morpho's codebase is <650 lines, immutable, extensively audited
  • Multi-layer governance — Moonwell DAO + Block Analitica/B.Protocol curators + Security Council

Current APY (~4.5-5%)

ComponentAPYSource
Base yield~4%Borrower interest
Rewards~0.5-1%WELL + MORPHO via Merkl
Total~4.5-5%Sustainable, from real demand

Yields come from real borrowing demand, not unsustainable emissions. Check current APY with npx tsx status.ts.

Quick Start

cd ~/clawd/skills/morpho-yield/scripts
npm install
npx tsx setup.ts

The setup wizard will:

  1. Configure your wallet (private key file, env var, or 1Password)
  2. Ask your notification preferences (daily/weekly reports)
  3. Set compound threshold and auto-compound preference
  4. Add monitoring to HEARTBEAT.md automatically

Commands

Interactive Setup

npx tsx setup.ts

Guides you through wallet configuration and preferences.

Check Position & APY

npx tsx status.ts

Returns: current deposit, vault shares, APY, wallet balances.

Generate Report

# Telegram/Discord format (default)
npx tsx report.ts

# JSON format (for automation)
npx tsx report.ts --json

# Plain text
npx tsx report.ts --plain

Beautiful formatted report showing position, rewards, and estimated earnings.

Deposit USDC

npx tsx deposit.ts <amount>
# Example: deposit 100 USDC
npx tsx deposit.ts 100

Deposits USDC into the Moonwell vault. Requires sufficient USDC balance and gas (ETH on Base).

Withdraw

# Withdraw specific amount of USDC
npx tsx withdraw.ts <amount>

# Withdraw all (redeem all shares)
npx tsx withdraw.ts all

Check Rewards

npx tsx rewards.ts

Returns: claimable MORPHO, WELL, and other reward tokens from Merkl.

Claim Rewards

npx tsx rewards.ts claim

Claims all pending rewards from Merkl distributor to your wallet.

Auto-Compound

npx tsx compound.ts

All-in-one command that:

  1. Claims any pending rewards from Merkl
  2. Swaps reward tokens (MORPHO, WELL) to USDC via Odos aggregator
  3. Deposits the USDC back into the vault

Heartbeat Integration

After setup, your agent monitors the position based on deposit size:

Deposit SizeCompound CheckRationale
$10,000+DailyLarge positions accumulate meaningful rewards quickly
$1,000-$10,000Every 3 daysBalance between gas costs and reward accumulation
$100-$1,000WeeklySmall rewards need time to exceed gas costs
<$100Bi-weeklyMinimal positions, compound only when worthwhile

The agent will:

  • Check reward balances at the appropriate frequency
  • Compound when rewards exceed your threshold (default: $0.50)
  • Send position reports (daily/weekly based on preference)
  • Alert you if gas is running low

Configuration

Config location: ~/.config/morpho-yield/config.json

{
  "wallet": {
    "source": "file",
    "path": "~/.clawd/vault/morpho.key"
  },
  "rpc": "https://rpc.moonwell.fi/main/evm/8453"
}

Preferences: ~/.config/morpho-yield/preferences.json

{
  "reportFrequency": "weekly",
  "compoundThreshold": 0.50,
  "autoCompound": true
}

āš ļø This skill manages real funds. Review carefully:

  • Private keys loaded at runtime from your chosen source
  • Keys never logged or written to disk by scripts
  • All transactions simulated before execution
  • Contract addresses verified on each run
  • Scripts show transaction preview before sending

Recommended Setup

  1. Dedicated wallet — Create a hot wallet just for this skill
  2. Limited funds — Only deposit what you're comfortable having in a hot wallet
  3. Secure key storage — Use encrypted file or 1Password
  4. Monitor activity — Periodically check wallet transactions
  5. Keep gas funded — Maintain small ETH balance on Base for transactions

Rewards

The vault earns rewards beyond base APY via Merkl:

  • WELL — Moonwell governance token incentives
  • MORPHO — Morpho protocol incentives

Rewards update approximately every 8 hours. The compound.ts script handles:

  1. Claiming rewards from Merkl distributor
  2. Swapping tokens to USDC via Odos aggregator
  3. Depositing USDC back into the vault

Error Handling

ErrorCauseFix
Insufficient USDCNot enough USDC in walletBridge/transfer more USDC to Base
Insufficient gasNot enough ETH for txAdd ETH to wallet on Base
Wallet not configuredMissing configRun npx tsx setup.ts
RPC errorNetwork issuesCheck RPC URL or try again
Swap revertedGas underestimateScript auto-adds 50% buffer

Dependencies

Scripts require Node.js 18+. Install deps before first run:

cd scripts && npm install

Packages used:

  • viem — Ethereum interaction
  • tsx — TypeScript execution
README.md

šŸŒœšŸŒ› Moonwell Morpho Earn

A Clawdbot / OpenClaw skill for earning yield on USDC via the Moonwell Flagship USDC vault on Morpho (Base network).

Why Moonwell Flagship USDC?

The Moonwell Flagship USDC vault is one of the safest places to earn yield on Base. Here's why:

šŸ›ļø Powers Coinbase's Borrow Products

The Moonwell Flagship USDC vault provides over $20 million in liquidity to Coinbase's Bitcoin and Ethereum borrow products. When Coinbase users take out loans against their cbBTC or ETH, that liquidity flows from this vault. This institutional-grade integration speaks to the vault's reliability and security.

šŸ›”ļø Conservative Risk Management

Unlike aggressive yield strategies, Moonwell vaults prioritize capital preservation:

  • Blue-chip collateral only — Loans are backed by established assets like ETH, cbETH, wstETH, and cbBTC
  • Conservative LTV ratios — Borrowers must maintain healthy collateral levels
  • Isolated markets — Risk is compartmentalized; issues in one market don't affect others
  • No rehypothecation — Your USDC isn't lent out recursively

šŸ”’ Multi-Layer Security

The vault employs a robust governance structure:

RoleEntityResponsibility
OwnerMoonwell DAOSets high-level vault strategy
CuratorsBlock Analitica & B.ProtocolDefine risk parameters, supply caps, market allocations
GuardianMoonwell Security CouncilOversight with veto power during timelock periods

šŸ”¬ Battle-Tested Infrastructure

  • Morpho's codebase — Under 650 lines of Solidity, fully immutable, extensively audited
  • ERC-4626 compliant — Standard vault interface ensures broad compatibility
  • On-chain transparency — All vault logic executes on-chain with full visibility
  • No upgradeable proxies — What you see is what you get

šŸ“Š Sustainable Yields

Current APY breakdown:

  • Base yield: ~4% from borrower interest
  • Reward incentives: ~0.5-1% in WELL + MORPHO tokens (via Merkl)
  • Total: ~4.5-5% APY

Yields come from real borrowing demand, not unsustainable token emissions. Rates vary based on market conditions — check current APY with npx tsx status.ts.


What This Skill Does

This skill enables AI agents to:

  • Deposit USDC into the Moonwell vault to earn yield
  • Monitor positions with beautiful formatted reports
  • Auto-compound rewards (WELL + MORPHO tokens → USDC → reinvest)
  • Withdraw funds when needed
  • Smart scheduling — compound frequency adapts to deposit size

Vault Details

PropertyValue
VaultMoonwell Flagship USDC
Address0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca
ChainBase (8453)
AssetUSDC
Current APY~4.5-5% (base + rewards)
CuratorsBlock Analitica & B.Protocol

Installation

For Clawdbot Users

# Clone to your skills directory
cd ~/clawd/skills
git clone https://github.com/moonwell-fi/openclaw-morpho-earn.git morpho-yield

# Install dependencies
cd morpho-yield/scripts
npm install

# Run interactive setup
npx tsx setup.ts

For Other Agents

The skill can be adapted for any agent framework. The core scripts in scripts/ are standalone TypeScript files using viem for Ethereum interaction.

Quick Start

cd scripts

# 1. Configure wallet and preferences
npx tsx setup.ts

# 2. Check vault status and APY
npx tsx status.ts

# 3. Deposit USDC (requires USDC + ETH for gas on Base)
npx tsx deposit.ts 100

# 4. Check your position
npx tsx report.ts

# 5. Compound rewards when ready
npx tsx compound.ts

Commands

CommandDescription
setup.tsInteractive setup wizard
status.tsCheck position, balances, and vault APY
report.tsGenerate formatted report (Telegram/Discord/plain/JSON)
deposit.ts <amount>Deposit USDC into vault
withdraw.ts <amount|all>Withdraw USDC from vault
rewards.tsCheck claimable rewards
rewards.ts claimClaim rewards from Merkl
compound.tsClaim → Swap → Deposit (full auto-compound)
test-swap.ts [amount]Test swap flow (USDC → WELL + MORPHO)

Reports

The skill generates beautiful reports for chat platforms:

šŸŒœšŸŒ› Moonwell Yield Report

šŸ“Š Position
ā”œ Value: $1,234.56 USDC
ā”œ Base APY: 4.09%
ā”” Total APY: ~7.59%

šŸ”„ Recently Compounded
ā”œ 310.68 WELL → $1.43 USDC
ā”œ 0.91 MORPHO → $1.01 USDC
ā”” Total: +$2.44 reinvested

šŸ’° Estimated Earnings
ā”œ Daily: ~$0.26
ā”” Monthly: ~$7.80

⛽ Gas: āœ… 0.0021 ETH
šŸ”— Wallet: 0xc6d8...cdf5

Smart Compound Scheduling

The skill automatically adjusts monitoring frequency based on position size:

Deposit SizeCheck FrequencyRationale
$10,000+DailyLarge positions accumulate meaningful rewards quickly
$1,000-$10,000Every 3 daysBalance gas costs vs reward accumulation
$100-$1,000WeeklySmall rewards need time to exceed gas costs
<$100Bi-weeklyMinimal positions, compound only when worthwhile

Config files are stored in ~/.config/morpho-yield/:

config.json — Wallet and RPC settings

{
  "wallet": {
    "source": "file",
    "path": "~/.clawd/vault/morpho.key"
  },
  "rpc": "https://mainnet.base.org"
}

preferences.json — Notification and compound settings

{
  "reportFrequency": "weekly",
  "compoundThreshold": 0.50,
  "autoCompound": true
}

Wallet Options

The skill supports multiple wallet sources:

  1. Private key file (recommended for agents)

    { "source": "file", "path": "~/.clawd/vault/morpho.key" }
    
  2. Environment variable

    { "source": "env", "env": "MORPHO_PRIVATE_KEY" }
    
  3. 1Password (requires op CLI)

    { "source": "1password", "item": "Morpho Wallet" }
    

Security Considerations

āš ļø This skill manages real funds. Please review carefully:

  • Private keys are loaded at runtime and never logged
  • All transactions are simulated before execution
  • Contract addresses are verified on each run
  • The wallet should be a dedicated hot wallet with limited funds
  • Review all script code before use — this is open source for transparency
  • Gas (ETH) is required on Base for transactions

Recommended Setup

  1. Create a dedicated wallet just for this skill
  2. Fund it with only what you're comfortable having in a hot wallet
  3. Keep the private key in a secure location (encrypted file or 1Password)
  4. Monitor the wallet's activity periodically

How Rewards Work

The Moonwell vault earns rewards beyond the base APY:

  • MORPHO — Morpho protocol incentives (~1.5% APR)
  • WELL — Moonwell governance token (~2% APR)

Rewards are distributed via Merkl and update approximately every 8 hours. The compound.ts script handles:

  1. Claiming rewards from Merkl distributor
  2. Swapping tokens to USDC via Odos aggregator
  3. Depositing USDC back into the vault

Dependencies

  • Node.js 18+
  • viem — Ethereum interaction
  • tsx — TypeScript execution

License

MIT


Built with šŸŒœšŸŒ› by Moonwell

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

āš ļø **This skill manages real funds. Review carefully:** - Private keys loaded at runtime from your chosen source - Keys never logged or written to disk by scripts - All transactions simulated before execution - Contract addresses verified on each run - Scripts show transaction preview before sending ### Recommended Setup 1. **Dedicated wallet** — Create a hot wallet just for this skill 2. **Limited funds** — Only deposit what you're comfortable having in a hot wallet 3. **Secure key storage** — Use encrypted file or 1Password 4. **Monitor activity** — Periodically check wallet transactions 5. **Keep gas funded** — Maintain small ETH balance on Base for transactions

Requirements

Scripts require Node.js 18+. Install deps before first run: ```bash cd scripts && npm install ``` Packages used: - `viem` — Ethereum interaction - `tsx` — TypeScript execution

Configuration

Config location: `~/.config/morpho-yield/config.json` ```json { "wallet": { "source": "file", "path": "~/.clawd/vault/morpho.key" }, "rpc": "https://rpc.moonwell.fi/main/evm/8453" } ``` Preferences: `~/.config/morpho-yield/preferences.json` ```json { "reportFrequency": "weekly", "compoundThreshold": 0.50, "autoCompound": true } ```

FAQ

How do I install morpho-earn?

Run openclaw add @lyoungblood/morpho-earn in your terminal. This installs morpho-earn into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lyoungblood/morpho-earn. Review commits and README documentation before installing.