2.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.
Skill Snapshot
| 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. OpenClaw Skills integration. |
| owner | lyoungblood |
| repository | lyoungblood/morpho-earn |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @lyoungblood/morpho-earn |
| last updated | Feb 7, 2026 |
Maintainer

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%)
| Component | APY | Source |
|---|---|---|
| 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:
- Configure your wallet (private key file, env var, or 1Password)
- Ask your notification preferences (daily/weekly reports)
- Set compound threshold and auto-compound preference
- 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:
- Claims any pending rewards from Merkl
- Swaps reward tokens (MORPHO, WELL) to USDC via Odos aggregator
- Deposits the USDC back into the vault
Heartbeat Integration
After setup, your agent monitors the position based on deposit size:
| Deposit Size | Compound Check | Rationale |
|---|---|---|
| $10,000+ | Daily | Large positions accumulate meaningful rewards quickly |
| $1,000-$10,000 | Every 3 days | Balance between gas costs and reward accumulation |
| $100-$1,000 | Weekly | Small rewards need time to exceed gas costs |
| <$100 | Bi-weekly | Minimal 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
}
Security
ā ļø 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
- Dedicated wallet ā Create a hot wallet just for this skill
- Limited funds ā Only deposit what you're comfortable having in a hot wallet
- Secure key storage ā Use encrypted file or 1Password
- Monitor activity ā Periodically check wallet transactions
- 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:
- Claiming rewards from Merkl distributor
- Swapping tokens to USDC via Odos aggregator
- Depositing USDC back into the vault
Error Handling
| Error | Cause | Fix |
|---|---|---|
| Insufficient USDC | Not enough USDC in wallet | Bridge/transfer more USDC to Base |
| Insufficient gas | Not enough ETH for tx | Add ETH to wallet on Base |
| Wallet not configured | Missing config | Run npx tsx setup.ts |
| RPC error | Network issues | Check RPC URL or try again |
| Swap reverted | Gas underestimate | Script auto-adds 50% buffer |
Dependencies
Scripts require Node.js 18+. Install deps before first run:
cd scripts && npm install
Packages used:
viemā Ethereum interactiontsxā TypeScript execution
šš 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:
| Role | Entity | Responsibility |
|---|---|---|
| Owner | Moonwell DAO | Sets high-level vault strategy |
| Curators | Block Analitica & B.Protocol | Define risk parameters, supply caps, market allocations |
| Guardian | Moonwell Security Council | Oversight 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
| Property | Value |
|---|---|
| Vault | Moonwell Flagship USDC |
| Address | 0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca |
| Chain | Base (8453) |
| Asset | USDC |
| Current APY | ~4.5-5% (base + rewards) |
| Curators | Block 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
| Command | Description |
|---|---|
setup.ts | Interactive setup wizard |
status.ts | Check position, balances, and vault APY |
report.ts | Generate formatted report (Telegram/Discord/plain/JSON) |
deposit.ts <amount> | Deposit USDC into vault |
withdraw.ts <amount|all> | Withdraw USDC from vault |
rewards.ts | Check claimable rewards |
rewards.ts claim | Claim rewards from Merkl |
compound.ts | Claim ā 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 Size | Check Frequency | Rationale |
|---|---|---|
| $10,000+ | Daily | Large positions accumulate meaningful rewards quickly |
| $1,000-$10,000 | Every 3 days | Balance gas costs vs reward accumulation |
| $100-$1,000 | Weekly | Small rewards need time to exceed gas costs |
| <$100 | Bi-weekly | Minimal positions, compound only when worthwhile |
Configuration
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:
-
Private key file (recommended for agents)
{ "source": "file", "path": "~/.clawd/vault/morpho.key" } -
Environment variable
{ "source": "env", "env": "MORPHO_PRIVATE_KEY" } -
1Password (requires
opCLI){ "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
- Create a dedicated wallet just for this skill
- Fund it with only what you're comfortable having in a hot wallet
- Keep the private key in a secure location (encrypted file or 1Password)
- 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:
- Claiming rewards from Merkl distributor
- Swapping tokens to USDC via Odos aggregator
- Depositing USDC back into the vault
Dependencies
Links
- Moonwell ā DeFi lending protocol
- Moonwell Docs ā Vault documentation
- Morpho ā Lending optimizer
- Vault on Morpho
- Clawdbot ā AI agent framework
- ClawdHub ā Skill registry
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.
