@earnforge/skill 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +118 -0
- package/package.json +11 -0
- package/references/chains.md +29 -0
- package/references/examples.md +172 -0
- package/references/pitfalls.md +24 -0
- package/references/protocols.md +26 -0
- package/references/strategies.md +84 -0
package/SKILL.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: earnforge
|
|
3
|
+
description: >
|
|
4
|
+
Discovers, compares, risk-scores, and builds unsigned deposit and withdrawal
|
|
5
|
+
quotes for 623+ DeFi yield vaults across 16 chains via the LI.FI Earn API.
|
|
6
|
+
Includes ERC-20 allowance checking, risk scoring (0-10), yield strategy
|
|
7
|
+
presets, portfolio allocation, and all 18 known API pitfalls handled.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# EarnForge Agent Skill
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
All commands accept `--json` for machine-readable output.
|
|
15
|
+
|
|
16
|
+
### Vault Discovery
|
|
17
|
+
|
|
18
|
+
- `earnforge list [--asset USDC] [--chain 8453] [--min-tvl 1000000] [--strategy conservative] [--json]`
|
|
19
|
+
List vaults with optional filters. Supports pagination.
|
|
20
|
+
|
|
21
|
+
- `earnforge top --asset USDC [--chain 8453] [--limit 10] [--strategy max-apy] [--json]`
|
|
22
|
+
Top vaults sorted by APY descending.
|
|
23
|
+
|
|
24
|
+
- `earnforge vault <slug> [--json]`
|
|
25
|
+
Fetch a single vault by its slug.
|
|
26
|
+
|
|
27
|
+
### Comparison & Analysis
|
|
28
|
+
|
|
29
|
+
- `earnforge risk <slug> [--json]`
|
|
30
|
+
Full risk score breakdown (0-10 scale): TVL magnitude, APY stability,
|
|
31
|
+
protocol maturity, redeemability, asset type.
|
|
32
|
+
|
|
33
|
+
- `earnforge apy-history <slug> [--json]`
|
|
34
|
+
30-day APY history from DeFiLlama yields API.
|
|
35
|
+
|
|
36
|
+
### Portfolio & Suggestions
|
|
37
|
+
|
|
38
|
+
- `earnforge suggest --amount 10000 --asset USDC [--max-chains 3] [--strategy diversified] [--json]`
|
|
39
|
+
Risk-adjusted portfolio allocation. Returns vault list with amounts and percentages.
|
|
40
|
+
|
|
41
|
+
- `earnforge portfolio <wallet> [--json]`
|
|
42
|
+
Current positions for a wallet address.
|
|
43
|
+
|
|
44
|
+
### Deposit & Withdraw
|
|
45
|
+
|
|
46
|
+
- `earnforge quote --vault <slug> --amount 100 --wallet 0x... [--from-chain 1] [--optimize-gas] [--json]`
|
|
47
|
+
Build an unsigned deposit quote. Validates all pitfalls before quoting.
|
|
48
|
+
**Check allowance before executing** — the response includes `approvalAddress`.
|
|
49
|
+
|
|
50
|
+
- `earnforge withdraw --vault <slug> --amount 100 --wallet 0x... [--to-token 0x...] [--json]`
|
|
51
|
+
Build an unsigned redeem/withdraw quote. Checks `isRedeemable` first.
|
|
52
|
+
|
|
53
|
+
- `earnforge allowance --token 0x... --owner 0x... --spender 0x... --amount 1000000 --rpc-url <url> --chain-id 8453 [--json]`
|
|
54
|
+
Check ERC-20 token allowance. Returns whether approval is sufficient and
|
|
55
|
+
builds an unsigned approval tx if not. Use `approvalAddress` from the
|
|
56
|
+
deposit quote as the `--spender`.
|
|
57
|
+
|
|
58
|
+
- `earnforge approve --token 0x... --spender 0x... --amount 1000000 --chain-id 8453 [--json]`
|
|
59
|
+
Build an unsigned ERC-20 approval transaction.
|
|
60
|
+
|
|
61
|
+
### Safety & Monitoring
|
|
62
|
+
|
|
63
|
+
- `earnforge preflight --vault <slug> --wallet 0x... [--amount 100] [--cross-chain] [--json]`
|
|
64
|
+
Run all preflight checks: isTransactional, chain match, gas balance,
|
|
65
|
+
token balance, redeemability.
|
|
66
|
+
|
|
67
|
+
- `earnforge doctor --vault <slug> [--env] [--json]`
|
|
68
|
+
Run all 18 pitfall checks on a vault.
|
|
69
|
+
|
|
70
|
+
- `earnforge watch --vault <slug> [--apy-drop 20] [--tvl-drop 30] [--json]`
|
|
71
|
+
Monitor a vault for APY/TVL drops. Streams events.
|
|
72
|
+
|
|
73
|
+
- `earnforge simulate --vault <slug> --amount 100 --wallet 0x... [--json]`
|
|
74
|
+
Dry-run a deposit via eth_call. Runs preflight first.
|
|
75
|
+
|
|
76
|
+
### Reference Data
|
|
77
|
+
|
|
78
|
+
- `earnforge chains [--json]` — 16 supported chains with chainIds
|
|
79
|
+
- `earnforge protocols [--json]` — 11 protocols with URLs
|
|
80
|
+
- `earnforge init <name>` — Scaffold a new project with EarnForge wired up
|
|
81
|
+
|
|
82
|
+
## Rules
|
|
83
|
+
|
|
84
|
+
1. **Never submit transactions.** Only build unsigned quotes. The user signs.
|
|
85
|
+
|
|
86
|
+
2. **Check ERC-20 allowance before depositing.** Use `earnforge allowance`
|
|
87
|
+
with the quote's `approvalAddress` as spender. If insufficient, have the
|
|
88
|
+
user sign the approval tx from `earnforge approve` first, then the deposit.
|
|
89
|
+
|
|
90
|
+
3. **Always check `isTransactional` before quoting deposits.** Use `doctor`
|
|
91
|
+
or `preflight` to verify.
|
|
92
|
+
|
|
93
|
+
4. **Check `isRedeemable` before quoting withdrawals.** Non-redeemable vaults
|
|
94
|
+
have locked liquidity.
|
|
95
|
+
|
|
96
|
+
5. **Use `vault.address` as `toToken` for deposits, not the underlying.**
|
|
97
|
+
This is Pitfall #5. The SDK handles it automatically.
|
|
98
|
+
|
|
99
|
+
6. **Filter stablecoins by the `stablecoin` tag, not by token symbol.**
|
|
100
|
+
|
|
101
|
+
7. **Risk score thresholds:** >= 7 is low risk, 4-6.9 is medium, < 4 is
|
|
102
|
+
high risk. Always show score alongside APY.
|
|
103
|
+
|
|
104
|
+
8. **APY values are already percentages** (3.84 = 3.84%). Do NOT multiply
|
|
105
|
+
by 100. `apy1d/apy7d/apy30d` can be null — use the fallback chain.
|
|
106
|
+
|
|
107
|
+
9. **Cross-chain deposits require explicit `--from-token`.** The vault's
|
|
108
|
+
underlying token address is on the vault's chain, not the source chain.
|
|
109
|
+
|
|
110
|
+
10. **Use chainId (number), not chain name, in all API paths.**
|
|
111
|
+
|
|
112
|
+
## References
|
|
113
|
+
|
|
114
|
+
- [references/pitfalls.md](references/pitfalls.md) — All 18 API pitfalls
|
|
115
|
+
- [references/protocols.md](references/protocols.md) — 11 protocols with risk tiers
|
|
116
|
+
- [references/chains.md](references/chains.md) — 16 chains with chainIds
|
|
117
|
+
- [references/examples.md](references/examples.md) — Worked examples
|
|
118
|
+
- [references/strategies.md](references/strategies.md) — 4 yield strategy presets
|
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@earnforge/skill",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"description": "Agent Skill for LI.FI Earn — vault discovery, risk scoring, and deposit quoting via CLI",
|
|
7
|
+
"files": ["SKILL.md", "references", "README.md", "LICENSE"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "echo 'Skill package has no tests — content only'"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Supported Chains
|
|
2
|
+
|
|
3
|
+
16 chains currently supported by the LI.FI Earn API.
|
|
4
|
+
|
|
5
|
+
| Chain | chainId | Network CAIP | Notes |
|
|
6
|
+
|-------|---------|-------------|-------|
|
|
7
|
+
| Ethereum | 1 | eip155:1 | Largest DeFi ecosystem; highest gas costs |
|
|
8
|
+
| Optimism | 10 | eip155:10 | OP Stack L2; low gas |
|
|
9
|
+
| BSC | 56 | eip155:56 | Binance Smart Chain |
|
|
10
|
+
| Gnosis | 100 | eip155:100 | Formerly xDai; stable gas |
|
|
11
|
+
| Unichain | 130 | eip155:130 | Uniswap's app-chain |
|
|
12
|
+
| Polygon | 137 | eip155:137 | PoS chain; low gas |
|
|
13
|
+
| Monad | 143 | eip155:143 | High-performance EVM chain |
|
|
14
|
+
| Sonic | 146 | eip155:146 | Formerly Fantom rebranded |
|
|
15
|
+
| Mantle | 5000 | eip155:5000 | L2 with MNT gas token |
|
|
16
|
+
| Base | 8453 | eip155:8453 | Coinbase L2; fastest growing |
|
|
17
|
+
| Arbitrum | 42161 | eip155:42161 | Largest L2 by TVL |
|
|
18
|
+
| Celo | 42220 | eip155:42220 | Mobile-first chain |
|
|
19
|
+
| Avalanche | 43114 | eip155:43114 | Subnet architecture |
|
|
20
|
+
| Linea | 59144 | eip155:59144 | Consensys zkEVM L2 |
|
|
21
|
+
| Berachain | 80094 | eip155:80094 | Proof of Liquidity chain |
|
|
22
|
+
| Katana | 747474 | eip155:747474 | Ronin's DeFi chain |
|
|
23
|
+
|
|
24
|
+
## Usage Notes
|
|
25
|
+
|
|
26
|
+
- Always use `chainId` (number) in API calls, never the chain name string.
|
|
27
|
+
- Chain name matching in CLI/bot is case-insensitive: `base`, `Base`, `BASE` all map to 8453.
|
|
28
|
+
- Cross-chain deposits are supported via the Composer API (LI.FI routing).
|
|
29
|
+
- Gas costs vary significantly: Ethereum (~$5-50) vs L2s (~$0.01-0.10).
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Worked Examples
|
|
2
|
+
|
|
3
|
+
8 end-to-end examples demonstrating common EarnForge workflows.
|
|
4
|
+
|
|
5
|
+
## 1. List Vaults by Asset
|
|
6
|
+
|
|
7
|
+
Find all USDC vaults sorted by APY:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
earnforge top --asset USDC --limit 5
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
[
|
|
15
|
+
{
|
|
16
|
+
"name": "STEAKUSDC",
|
|
17
|
+
"slug": "8453-0xbeef...",
|
|
18
|
+
"chain": "Base",
|
|
19
|
+
"apy": 3.85,
|
|
20
|
+
"tvl": "$33.8M",
|
|
21
|
+
"protocol": "morpho-v1",
|
|
22
|
+
"risk": { "score": 7.8, "label": "low" }
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 2. Compare Two Vaults
|
|
28
|
+
|
|
29
|
+
Side-by-side comparison of Morpho vs Aave USDC vaults:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
earnforge compare 8453-0xbeef... 1-0xaave... --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Output includes APY difference, TVL ratio, risk score delta, and protocol tier comparison.
|
|
36
|
+
|
|
37
|
+
## 3. Build a Deposit Quote
|
|
38
|
+
|
|
39
|
+
Quote depositing 1000 USDC into a Base vault:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
earnforge quote 8453-0xbeef... 1000 0xYourWallet --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The SDK automatically:
|
|
46
|
+
- Sets `toToken = vault.address` (Pitfall #5)
|
|
47
|
+
- Uses 6 decimals for USDC (Pitfall #9)
|
|
48
|
+
- Validates `isTransactional` (Pitfall #13)
|
|
49
|
+
- Checks `underlyingTokens` is non-empty (Pitfall #15)
|
|
50
|
+
|
|
51
|
+
Returns an unsigned transaction for the user to sign.
|
|
52
|
+
|
|
53
|
+
## 4. Portfolio Allocation
|
|
54
|
+
|
|
55
|
+
Get a diversified allocation for $50,000 in USDC:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
earnforge suggest 50000 USDC --max-vaults 5 --max-chains 3 --strategy diversified --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"totalAmount": 50000,
|
|
64
|
+
"expectedApy": 4.52,
|
|
65
|
+
"allocations": [
|
|
66
|
+
{ "vault": "STEAKUSDC", "amount": 20000, "percentage": 40.0, "apy": 3.85 },
|
|
67
|
+
{ "vault": "Aave USDC", "amount": 15000, "percentage": 30.0, "apy": 5.20 },
|
|
68
|
+
{ "vault": "Euler USDC", "amount": 10000, "percentage": 20.0, "apy": 4.10 },
|
|
69
|
+
{ "vault": "Pendle USDC", "amount": 5000, "percentage": 10.0, "apy": 6.50 }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 5. Withdraw from a Vault
|
|
75
|
+
|
|
76
|
+
Build a redeem quote to exit a position:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
earnforge withdraw 8453-0xbeef... 500 0xYourWallet --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Checks `isRedeemable` and `redeemPacks` before building the quote. Warns if the vault is non-redeemable.
|
|
83
|
+
|
|
84
|
+
## 6. Cross-Chain Deposit
|
|
85
|
+
|
|
86
|
+
Deposit from Ethereum into a Base vault using LI.FI routing:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
earnforge quote 8453-0xbeef... 1000 0xYourWallet --from-chain 1 --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The Composer API handles the bridge + swap + deposit in a single quote. Use `gas-optimize` to compare costs across source chains:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
earnforge gas-optimize 8453-0xbeef... 1000 0xYourWallet --from-chains 1,10,8453 --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 7. Risk Analysis
|
|
99
|
+
|
|
100
|
+
Get a full risk breakdown for a vault:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
earnforge risk 8453-0xbeef... --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"score": 7.8,
|
|
109
|
+
"label": "low",
|
|
110
|
+
"breakdown": {
|
|
111
|
+
"tvl": 8,
|
|
112
|
+
"apyStability": 8,
|
|
113
|
+
"protocol": 9,
|
|
114
|
+
"redeemability": 10,
|
|
115
|
+
"assetType": 9
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Dimensions:
|
|
121
|
+
- **TVL Magnitude** (25% weight): Higher TVL = lower risk. $100M+ = 10/10.
|
|
122
|
+
- **APY Stability** (20% weight): Small divergence between apy1d/apy30d/total = more stable.
|
|
123
|
+
- **Protocol Maturity** (25% weight): Known blue-chip protocols score higher.
|
|
124
|
+
- **Redeemability** (15% weight): Non-redeemable = liquidity risk (3/10).
|
|
125
|
+
- **Asset Type** (15% weight): Stablecoin tag = lower asset risk (9/10).
|
|
126
|
+
|
|
127
|
+
## 8. Portfolio Suggestion with Strategy
|
|
128
|
+
|
|
129
|
+
Use the conservative strategy for a safe allocation:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
earnforge suggest 100000 USDC --strategy conservative --json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The conservative strategy applies these filters:
|
|
136
|
+
- Only stablecoin-tagged vaults
|
|
137
|
+
- TVL > $50M
|
|
138
|
+
- Blue-chip protocols only (aave-v3, morpho-v1, euler-v2, pendle, maple)
|
|
139
|
+
|
|
140
|
+
Other strategies: `max-apy` (no filters, pure APY sort), `diversified` (3+ chains, $1M+ TVL), `risk-adjusted` (risk score >= 7).
|
|
141
|
+
|
|
142
|
+
## 9. Full Deposit Flow with Allowance Check
|
|
143
|
+
|
|
144
|
+
The complete deposit flow has 3 steps: quote, approve, deposit.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Step 1: Build deposit quote
|
|
148
|
+
earnforge quote --vault 8453-0xbeef... --amount 100 --wallet 0xYour --json
|
|
149
|
+
# Note the approvalAddress in the response
|
|
150
|
+
|
|
151
|
+
# Step 2: Check if approval is needed
|
|
152
|
+
earnforge allowance --token 0xUSDC --owner 0xYour --spender 0xApprovalAddr --amount 100000000 --rpc-url https://mainnet.base.org --chain-id 8453 --json
|
|
153
|
+
# If sufficient: false, sign the approvalTx first
|
|
154
|
+
|
|
155
|
+
# Step 3: Execute deposit (user signs the transactionRequest from step 1)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The SDK's `buildDepositQuote()` handles toToken, decimals, and pitfall validation automatically. The allowance check uses a raw JSON-RPC `eth_call` to read the ERC-20 contract.
|
|
159
|
+
|
|
160
|
+
## 10. Withdraw from a Vault
|
|
161
|
+
|
|
162
|
+
Withdrawal reverses the deposit — fromToken is the vault share token, toToken is the underlying.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Check if vault is redeemable
|
|
166
|
+
earnforge vault 8453-0xbeef... --json | jq '.isRedeemable'
|
|
167
|
+
|
|
168
|
+
# Build withdrawal quote
|
|
169
|
+
earnforge withdraw --vault 8453-0xbeef... --amount 50 --wallet 0xYour --json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The Composer uses the same `/v1/quote` endpoint with swapped tokens. Cross-chain withdrawals are supported — add `--to-chain` and `--to-token` for the destination.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# LI.FI Earn API Pitfalls
|
|
2
|
+
|
|
3
|
+
All 18 known pitfalls discovered during integration. The SDK handles each one by default.
|
|
4
|
+
|
|
5
|
+
| # | Pitfall | Impact | Fix |
|
|
6
|
+
|---|---------|--------|-----|
|
|
7
|
+
| 1 | Earn Data API has no auth, Composer API requires API key | 401 on quote requests | Set `x-lifi-api-key` header only on Composer calls |
|
|
8
|
+
| 2 | Earn Data base URL is `earn.li.fi`, not `li.quest` | 404 on vault/chain/protocol endpoints | Use `https://earn.li.fi` for data, `https://li.quest` for Composer |
|
|
9
|
+
| 3 | API key goes in `x-lifi-api-key` header, not query param | 401 even with valid key | Pass key via header, never as URL parameter |
|
|
10
|
+
| 4 | Composer quote endpoint is GET, not POST | 405 Method Not Allowed | Use `GET /v1/quote` with query parameters |
|
|
11
|
+
| 5 | `toToken` must be vault address, not underlying token | Quote returns wrong asset or fails | Set `toToken = vault.address` for deposits |
|
|
12
|
+
| 6 | Pagination uses cursor-based, not offset-based | Missing vaults after page 1 | Pass `nextCursor` to fetch subsequent pages |
|
|
13
|
+
| 7 | `apy.total` can be 0 when only `apy30d` has data | Show 0% APY for active vaults | Use fallback chain: `apy.total` -> `apy30d` -> `apy7d` -> `apy1d` |
|
|
14
|
+
| 8 | `tvl.usd` is a string, not a number | Numeric comparisons fail silently | Parse with `Number()` or `parseTvl()` before comparing |
|
|
15
|
+
| 9 | Token amounts need correct decimals (USDC=6, ETH=18) | Deposit 1 USDC sends 0.000001 USDC | Read `underlyingTokens[0].decimals`, use `toSmallestUnit()` |
|
|
16
|
+
| 10 | Vault list returns all chains mixed together | Cannot filter by chain in client | Pass `chainId` query parameter to filter server-side |
|
|
17
|
+
| 11 | No gas token on destination chain | Transaction reverts | Check native balance before quoting; use LI.Fuel `fromAmountForGas` |
|
|
18
|
+
| 12 | Wallet on wrong chain | Transaction sent to wrong network | Compare `wallet.chainId` with `vault.chainId` before deposit |
|
|
19
|
+
| 13 | Non-transactional vaults exist | Cannot deposit programmatically | Check `vault.isTransactional === true` before any quote |
|
|
20
|
+
| 14 | Some vaults have zero APY temporarily | Misleading display | Filter or flag vaults with `apy.total === 0` and no historical data |
|
|
21
|
+
| 15 | `underlyingTokens` can be an empty array | Cannot determine `fromToken` | Check array length; require explicit `fromToken` if empty |
|
|
22
|
+
| 16 | `description` field is optional (~14% of vaults) | `undefined` in display strings | Use optional chaining or fallback to vault name |
|
|
23
|
+
| 17 | `apy.reward` is null for some protocols | NaN when summing base + reward | Normalize null to 0 (SDK Zod schema does this automatically) |
|
|
24
|
+
| 18 | `apy1d`, `apy7d`, `apy30d` can all be null | Crash on `.toFixed()` or division | Null-check before arithmetic; use `getBestApy()` helper |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Supported Protocols
|
|
2
|
+
|
|
3
|
+
11 protocols currently available through the LI.FI Earn API, with risk tier assignments used by the SDK's risk scorer.
|
|
4
|
+
|
|
5
|
+
| Protocol | Risk Tier | Score | URL | Notes |
|
|
6
|
+
|----------|-----------|-------|-----|-------|
|
|
7
|
+
| aave-v3 | Blue-chip | 9/10 | https://app.aave.com | Largest DeFi lending protocol; battle-tested |
|
|
8
|
+
| morpho-v1 | Blue-chip | 9/10 | https://app.morpho.org | Optimized lending layer on top of Aave/Compound |
|
|
9
|
+
| euler-v2 | Established | 7/10 | https://app.euler.finance | Modular lending with custom vault support |
|
|
10
|
+
| pendle | Established | 7/10 | https://app.pendle.finance | Yield tokenization and trading |
|
|
11
|
+
| ethena-usde | Established | 7/10 | https://www.ethena.fi | Synthetic dollar protocol backed by staked ETH |
|
|
12
|
+
| ether.fi-liquid | Established | 7/10 | https://app.ether.fi/liquid | Liquid restaking vaults |
|
|
13
|
+
| ether.fi-stake | Established | 7/10 | https://ether.fi/app/weeth | Native ETH staking (weETH) |
|
|
14
|
+
| maple | Moderate | 6/10 | https://app.maple.finance | Institutional lending with credit risk |
|
|
15
|
+
| upshift | Emerging | 5/10 | https://app.upshift.finance | Newer yield aggregator |
|
|
16
|
+
| neverland | Emerging | 4/10 | https://app.neverland.money | Emerging lending market |
|
|
17
|
+
| yo-protocol | Emerging | 4/10 | https://app.yo.xyz | Newer yield protocol |
|
|
18
|
+
|
|
19
|
+
## Risk Tier Definitions
|
|
20
|
+
|
|
21
|
+
- **Blue-chip (9-10):** Multi-year track record, $1B+ TVL historically, multiple audits, battle-tested through market cycles.
|
|
22
|
+
- **Established (7-8):** At least 1 year live, audited, significant TVL, active development.
|
|
23
|
+
- **Moderate (5-6):** Audited but newer, or has had security incidents that were resolved.
|
|
24
|
+
- **Emerging (3-4):** Less than 1 year live, limited audit history, lower TVL. Higher risk/reward.
|
|
25
|
+
|
|
26
|
+
Protocols not in the list default to a score of 3/10 (unrated).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Yield Strategy Presets
|
|
2
|
+
|
|
3
|
+
4 built-in strategy presets for portfolio allocation and vault filtering.
|
|
4
|
+
|
|
5
|
+
## 1. Conservative
|
|
6
|
+
|
|
7
|
+
**Description:** Stablecoin-tagged, TVL > $50M, APY 3-7%, blue-chip protocols only.
|
|
8
|
+
|
|
9
|
+
| Filter | Value |
|
|
10
|
+
|--------|-------|
|
|
11
|
+
| Tags | `stablecoin` |
|
|
12
|
+
| Min TVL | $50,000,000 |
|
|
13
|
+
| Protocols | aave-v3, morpho-v1, euler-v2, pendle, maple |
|
|
14
|
+
| Sort | APY descending |
|
|
15
|
+
|
|
16
|
+
**Best for:** Capital preservation. Large allocations where safety is the priority. Institutional deposits.
|
|
17
|
+
|
|
18
|
+
**Expected APY range:** 3-7%
|
|
19
|
+
|
|
20
|
+
## 2. Max APY
|
|
21
|
+
|
|
22
|
+
**Description:** Sort by APY descending, no TVL floor.
|
|
23
|
+
|
|
24
|
+
| Filter | Value |
|
|
25
|
+
|--------|-------|
|
|
26
|
+
| Tags | (none) |
|
|
27
|
+
| Min TVL | (none) |
|
|
28
|
+
| Protocols | (all) |
|
|
29
|
+
| Sort | APY descending |
|
|
30
|
+
|
|
31
|
+
**Best for:** Yield maximizers willing to accept higher risk. Smaller allocations where loss is tolerable.
|
|
32
|
+
|
|
33
|
+
**Expected APY range:** 5-50%+ (higher APY often correlates with higher risk)
|
|
34
|
+
|
|
35
|
+
## 3. Diversified
|
|
36
|
+
|
|
37
|
+
**Description:** Spread across 3+ chains, 3+ protocols, mix of stablecoin and LST.
|
|
38
|
+
|
|
39
|
+
| Filter | Value |
|
|
40
|
+
|--------|-------|
|
|
41
|
+
| Tags | (none) |
|
|
42
|
+
| Min TVL | $1,000,000 |
|
|
43
|
+
| Protocols | (all) |
|
|
44
|
+
| Sort | APY descending |
|
|
45
|
+
|
|
46
|
+
**Best for:** Balanced risk through diversification. Medium-sized portfolios. Reducing single-chain or single-protocol exposure.
|
|
47
|
+
|
|
48
|
+
**Expected APY range:** 4-15%
|
|
49
|
+
|
|
50
|
+
## 4. Risk-Adjusted
|
|
51
|
+
|
|
52
|
+
**Description:** Filter by risk score >= 7, then sort by APY.
|
|
53
|
+
|
|
54
|
+
| Filter | Value |
|
|
55
|
+
|--------|-------|
|
|
56
|
+
| Tags | (none) |
|
|
57
|
+
| Min TVL | (none) |
|
|
58
|
+
| Min Risk Score | 7 (low risk only) |
|
|
59
|
+
| Protocols | (all) |
|
|
60
|
+
| Sort | APY descending |
|
|
61
|
+
|
|
62
|
+
**Best for:** Optimizing the risk/return ratio. Getting the highest yield among safe vaults. Data-driven allocation.
|
|
63
|
+
|
|
64
|
+
**Expected APY range:** 3-10%
|
|
65
|
+
|
|
66
|
+
## Combining Strategies with Suggestions
|
|
67
|
+
|
|
68
|
+
Pass `--strategy` to `earnforge suggest` to apply a preset:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Conservative allocation for $100K USDC
|
|
72
|
+
earnforge suggest 100000 USDC --strategy conservative
|
|
73
|
+
|
|
74
|
+
# Max yield for $1K ETH
|
|
75
|
+
earnforge suggest 1000 ETH --strategy max-apy
|
|
76
|
+
|
|
77
|
+
# Diversified across chains
|
|
78
|
+
earnforge suggest 50000 USDC --strategy diversified --max-chains 5
|
|
79
|
+
|
|
80
|
+
# Only low-risk vaults
|
|
81
|
+
earnforge suggest 25000 USDC --strategy risk-adjusted
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Strategies can be combined with `--max-vaults` and `--max-chains` to further constrain the allocation.
|