Yield Strategies
by @rachidjarray-hk-qa-fdt
Discover, deposit into, and withdraw from DeFi yield generation strategies across multiple chains and protocols. Use when you or the user want to earn yield,...
clawhub install yield-strategiesπ About This Skill
name: yield-strategies description: Discover, deposit into, and withdraw from DeFi yield generation strategies across multiple chains and protocols. Use when you or the user want to earn yield, find APY, stake tokens, explore DeFi, farm, deposit into a protocol, withdraw earnings, check yield opportunities, or grow their holdings. Covers "how can I earn on my USDC?", "find me yield", "stake my ETH", "where can I get the best APY?", "withdraw from Aave". user-invocable: true disable-model-invocation: false allowed-tools: ["Bash(fdx status*)", "Bash(fdx call discoverYieldStrategies*)", "Bash(fdx call depositForYield*)", "Bash(fdx call withdrawFromYield*)", "Bash(fdx call getWalletOverview*)"]
DeFi Yield Strategies
Discover yield opportunities across DeFi protocols (Aave, Compound, and others), deposit tokens to earn yield, and withdraw when ready. This is a full lifecycle skill covering discovery through to exit.
Confirm wallet is authenticated
fdx status
If the wallet is not authenticated, refer to the authenticate skill.
Step 1: Discover Yield Strategies
Search for available yield opportunities:
# Browse all available strategies
fdx call discoverYieldStrategiesFilter by chain
fdx call discoverYieldStrategies --chainKey ethereumFilter by token
fdx call discoverYieldStrategies --chainKey ethereum --tokenAddress 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48Filter by minimum APY and risk level
fdx call discoverYieldStrategies --chainKey ethereum --minApy 5 --maxRisk lowSort results
fdx call discoverYieldStrategies --chainKey ethereum --sortBy apy
discoverYieldStrategies Parameters
| Parameter | Required | Description |
| ---------------- | -------- | --------------------------------------------------------------------- |
| --chainKey | No | Filter by blockchain (e.g. ethereum, polygon, arbitrum, base) |
| --tokenAddress | No | Filter by token contract address |
| --minApy | No | Minimum APY percentage (e.g. 5 for 5%) |
| --maxRisk | No | Maximum risk level filter (e.g. low, medium, high) |
| --sortBy | No | Sort results (e.g. apy, risk) |
Step 2: Deposit for Yield
Once a strategy is selected, deposit tokens into it:
fdx call depositForYield \
--chainKey \
--strategyId \
--amount
depositForYield Parameters
| Parameter | Required | Description |
| ---------------- | -------- | ---------------------------------------------------------- |
| --chainKey | Yes | Blockchain where the strategy runs |
| --strategyId | Yes | Strategy identifier from discoverYieldStrategies results |
| --amount | Yes | Amount to deposit (human-readable) |
| --tokenAddress | No | Token to deposit (if strategy accepts multiple tokens) |
Step 3: Withdraw from Yield
Exit a position and retrieve tokens:
fdx call withdrawFromYield \
--chainKey \
--positionId
withdrawFromYield Parameters
| Parameter | Required | Description |
| -------------- | -------- | ------------------------------------------------- |
| --chainKey | Yes | Blockchain of the position |
| --positionId | Yes | Position identifier from the deposit result |
| --amount | No | Amount to withdraw (omit for full withdrawal) |
| --recipient | No | Custom recipient address (defaults to own wallet) |
Example Session
# Check auth and balance
fdx status
fdx call getWalletOverview --chainKey ethereumDiscover USDC yield strategies on Ethereum with at least 3% APY
fdx call discoverYieldStrategies \
--chainKey ethereum \
--tokenAddress 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
--minApy 3 \
--sortBy apyDeposit 1000 USDC into a chosen strategy
fdx call depositForYield \
--chainKey ethereum \
--strategyId \
--amount 1000Later: withdraw the full position
fdx call withdrawFromYield \
--chainKey ethereum \
--positionId
Flow
1. Check authentication with fdx status
2. Check available balance with fdx call getWalletOverview --chainKey
3. Discover strategies with fdx call discoverYieldStrategies β present options to the human
4. Human selects a strategy β confirm the choice, risks, and deposit amount
5. Execute deposit with fdx call depositForYield
6. When the human wants to exit, withdraw with fdx call withdrawFromYield
Important: DeFi protocols carry smart contract risk. Always present the risk level to your human and let them make the final decision on which strategy to use and how much to deposit.
Prerequisites
fdx status to check, see authenticate skill)fund-wallet skill or swap-tokens skill to acquire the needed tokenError Handling
fdx setup first, or see authenticate skillfund-wallet skilldiscoverYieldStrategies to get current strategy IDsβοΈ Configuration
fdx status to check, see authenticate skill)fund-wallet skill or swap-tokens skill to acquire the needed token