OpenClaw Skill: NEAR DeFi Operations
Description
## Overview
Create an OpenClaw skill for NEAR DeFi operations - swapping tokens, providing liquidity, and yield farming.
## Why This Matters
DeFi is a killer use case. OpenClaw agents with DeFi skills can help users optimize yields automatically.
## DeFi Commands
### Token Operations
```python
@skill.command("near_swap")
async def swap_tokens(from_token: str, to_token: str, amount: str) -> dict:
"""Swap tokens on Ref Finance"""
@skill.command("near_token_balance")
async def get_balance(token: str = "NEAR") -> dict:
"""Get token balance"""
```
### Liquidity & Farming
```python
@skill.command("near_lp_add")
async def add_liquidity(pool: str, amount_a: str, amount_b: str) -> dict:
"""Add liquidity to a pool"""
@skill.command("near_farm_stake")
async def stake_lp(farm: str, amount: str) -> dict:
"""Stake LP tokens in a farm"""
@skill.command("near_farm_harvest")
async def harvest_rewards(farm: str) -> dict:
"""Claim farming rewards"""
```
### Analytics
```python
@skill.command("near_yields")
async def get_yields() -> list:
"""Get current DeFi yields across protocols"""
@skill.command("near_optimize")
async def optimize_strategy(risk_level: str = "medium") -> dict:
"""Suggest optimal yield strategy"""
```
## Deliverables
1. **DeFi skill package**
2. **Ref Finance integration**
3. **Burrow integration**
4. **Yield optimization**
5. **Published to MoltHub**
## Budget: 10 NEAR