starkfi 0.6.4 → 0.7.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starkfi",
3
- "version": "0.6.4",
4
- "description": "AI-native Starknet DeFi CLI + MCP Server + Agent Skills — Swaps, multi-swap, batch (multicall), staking, lending, DCA, confidential transfers, simulation, portfolio, gas abstraction",
3
+ "version": "0.7.1",
4
+ "description": "AI-native Starknet DeFi CLI + MCP Server + Agent Skills — Swaps, multi-swap, batch (multicall), staking, liquid staking (LST), lending, DCA, Troves vaults, confidential transfers, simulation, portfolio, gas abstraction",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "starkfi": "./dist/index.js"
@@ -77,24 +77,24 @@
77
77
  "devDependencies": {
78
78
  "@eslint/js": "^10.0.1",
79
79
  "@modelcontextprotocol/sdk": "^1.29.0",
80
- "@types/node": "^25.5.2",
80
+ "@types/node": "^25.6.0",
81
81
  "chalk": "^5.6.2",
82
82
  "commander": "^14.0.3",
83
83
  "env-paths": "^3.0.0",
84
- "eslint": "^10.2.0",
84
+ "eslint": "^10.2.1",
85
85
  "eslint-config-prettier": "^10.1.8",
86
- "globals": "^17.4.0",
86
+ "globals": "^17.5.0",
87
87
  "jiti": "^2.6.1",
88
- "ora": "^9.3.0",
89
- "prettier": "^3.8.1",
90
- "starkzap": "^2.0.0",
88
+ "ora": "^9.4.0",
89
+ "prettier": "^3.8.3",
90
+ "starkzap": "^3.0.0",
91
91
  "tsup": "^8.5.1",
92
92
  "tsx": "^4.21.0",
93
93
  "typescript": "^5.9.3",
94
- "typescript-eslint": "^8.58.0",
94
+ "typescript-eslint": "^8.59.0",
95
95
  "zod": "^4.3.6"
96
96
  },
97
97
  "dependencies": {
98
- "@fatsolutions/tongo-sdk": "^1.4.0"
98
+ "@fatsolutions/tongo-sdk": "^1.5.0"
99
99
  }
100
100
  }
package/skills/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Agent Skills for the [StarkFi](https://github.com/ahmetenesdur/starkfi) CLI — a Starknet DeFi toolkit.
4
4
 
5
- > 12 skills · [Full Documentation](https://docs.starkfi.app/docs/skills)
5
+ > 14 skills · [Full Documentation](https://docs.starkfi.app/docs/skills)
6
6
 
7
7
  ## Available Skills
8
8
 
@@ -13,8 +13,10 @@ Agent Skills for the [StarkFi](https://github.com/ahmetenesdur/starkfi) CLI —
13
13
  | [send](./send/SKILL.md) | transaction | Transfer tokens to a Starknet address |
14
14
  | [trade](./trade/SKILL.md) | transaction | Swap tokens via Fibrous (default), AVNU, or Ekubo |
15
15
  | [multi-swap](./multi-swap/SKILL.md) | transaction | Multiple swaps in one transaction (up to 3) |
16
- | [batch](./batch/SKILL.md) | transaction | Combine swap + stake + supply + send + borrow + repay + withdraw + DCA in one multicall |
17
- | [staking](./staking/SKILL.md) | transaction | Stake, unstake, claim, compound (STRK, WBTC, tBTC, SolvBTC, LBTC) |
16
+ | [batch](./batch/SKILL.md) | transaction | Combine swap + stake + supply + send + borrow + repay + withdraw + DCA + troves in one multicall |
17
+ | [staking](./staking/SKILL.md) | transaction | Delegation staking: stake, unstake, claim, compound (STRK, WBTC, tBTC, SolvBTC, LBTC) |
18
+ | [lst](./lst/SKILL.md) | transaction | Endur liquid staking: stake STRK → xSTRK, redeem, exit-all (auto-yield via share price) |
19
+ | [troves](./troves/SKILL.md) | transaction | Troves DeFi yield vaults: list strategies, deposit, withdraw, check positions |
18
20
  | [lending](./lending/SKILL.md) | transaction | Vesu V2 lending: supply, borrow, repay, monitor, auto-rebalance |
19
21
  | [dca](./dca/SKILL.md) | transaction | Dollar-Cost Averaging: create, preview, list, cancel recurring orders |
20
22
  | [confidential](./confidential/SKILL.md) | transaction | Tongo Cash: fund, transfer, withdraw, ragequit, rollover (ZK privacy) |
@@ -62,6 +64,12 @@ npx skills add ahmetenesdur/starkfi
62
64
  | "Repay debt and stake in one tx" | `batch` |
63
65
  | "Stake 1000 STRK with Karnot" | `staking` |
64
66
  | "Earn yield on my STRK" | `staking` |
67
+ | "Liquid stake 500 STRK" | `lst` |
68
+ | "How much is my xSTRK worth?" | `lst` |
69
+ | "What's the LST exchange rate?" | `lst` |
70
+ | "Deposit 100 into Evergreen vault" | `troves` |
71
+ | "Show me yield vault strategies" | `troves` |
72
+ | "Withdraw from my vault" | `troves` |
65
73
  | "Supply 500 USDC to Prime pool" | `lending` |
66
74
  | "Is my position safe?" | `lending` |
67
75
  | "My health factor is low, fix it" | `lending` |
@@ -79,4 +79,6 @@ npx starkfi@latest balance --json
79
79
  - Run this BEFORE `lending` supply operations to confirm available assets.
80
80
  - Run this BEFORE `dca` to verify sufficient sell token balance for the total DCA amount.
81
81
  - Run this BEFORE `confidential` `conf-fund` to verify sufficient tokens for funding the confidential account.
82
- - Use `portfolio` for a complete view including staking and lending positions with USD values.
82
+ - Run this BEFORE `troves` deposits to verify sufficient tokens for the vault strategy.
83
+ - Run this BEFORE `lst` liquid staking to confirm available STRK.
84
+ - Use `portfolio` for a complete view including staking, lending, vault, and LST positions with USD values.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: batch
3
- description: Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply/borrow/repay/withdraw, token sends, and DCA orders into one multicall. Use this skill when the user wants to batch, combine, bundle, or chain multiple diverse operations together in one atomic transaction, such as "swap ETH and then stake STRK" or "withdraw from lending and swap" or "repay debt and stake" or "swap and send in one go" or "create a DCA order and stake". Also trigger when the user mentions multicall, combining operations, doing multiple things at once, or wants to save gas by bundling actions — even if they don't use the word "batch".
3
+ description: Execute multiple different DeFi operations in a single Starknet transaction — combine swaps, staking, lending supply/borrow/repay/withdraw, token sends, DCA orders, and Troves vault deposits/withdrawals into one multicall. Use this skill when the user wants to batch, combine, bundle, or chain multiple diverse operations together in one atomic transaction, such as "swap ETH and then stake STRK" or "withdraw from lending and swap" or "repay debt and stake" or "swap and send in one go" or "create a DCA order and stake" or "deposit into vault and swap". Also trigger when the user mentions multicall, combining operations, doing multiple things at once, or wants to save gas by bundling actions — even if they don't use the word "batch".
4
4
  license: MIT
5
5
  compatibility: Requires Node.js 18+ and npx.
6
6
  metadata:
@@ -17,7 +17,7 @@ allowed-tools:
17
17
 
18
18
  # Batch Execute
19
19
 
20
- Bundle multiple diverse DeFi operations into a single Starknet multicall transaction. Supports combining **swaps**, **staking**, **lending supply/borrow/repay/withdraw**, **token sends**, and **DCA orders** — all executed atomically in one on-chain call.
20
+ Bundle multiple diverse DeFi operations into a single Starknet multicall transaction. Supports combining **swaps**, **staking**, **lending supply/borrow/repay/withdraw**, **token sends**, **DCA orders**, and **Troves vault deposits/withdrawals** — all executed atomically in one on-chain call.
21
21
 
22
22
  ## Prerequisites
23
23
 
@@ -47,7 +47,9 @@ npx starkfi@latest batch [--simulate] [--json] \
47
47
  --repay "<amount> <token> <col_token> <pool>" \
48
48
  --withdraw "<amount> <token> <pool>" \
49
49
  --dca-create "<amount> <sell> <buy> <perCycle> [frequency]" \
50
- --dca-cancel "<orderId>"
50
+ --dca-cancel "<orderId>" \
51
+ --troves-deposit "<amount> <token> <strategyId> [amount2 token2]" \
52
+ --troves-withdraw "<amount> <token> <strategyId> [amount2 token2]"
51
53
  ```
52
54
 
53
55
  ## Operation Formats
@@ -63,6 +65,8 @@ npx starkfi@latest batch [--simulate] [--json] \
63
65
  | `--withdraw` | `"<amount> <token> <pool>"` | `--withdraw "200 USDC Prime"` |
64
66
  | `--dca-create` | `"<amount> <sell> <buy> <perCycle> [freq]"` | `--dca-create "1000 USDC ETH 10 P1D"` |
65
67
  | `--dca-cancel` | `"<orderId>"` | `--dca-cancel "abc123"` |
68
+ | `--troves-deposit` | `"<amount> <token> <strategyId> [amount2 token2]"` | `--troves-deposit "100 STRK evergreen_strk"` or `"100 STRK ekubo_cl_strketh 0.005 ETH"` |
69
+ | `--troves-withdraw` | `"<amount> <token> <strategyId> [amount2 token2]"` | `--troves-withdraw "50 STRK evergreen_strk"` or `"50 STRK ekubo_cl_strketh 0.005 ETH"` |
66
70
 
67
71
  > **Note:** `--stake` accepts either a validator name (e.g. `Karnot`) or a pool contract address (starting with `0x`). The CLI auto-detects the format.
68
72
 
@@ -79,6 +83,8 @@ npx starkfi@latest batch [--simulate] [--json] \
79
83
  | `--withdraw` | string | Withdraw from lending pool (repeatable) | No\* |
80
84
  | `--dca-create` | string | Create DCA order (repeatable) | No\* |
81
85
  | `--dca-cancel` | string | Cancel DCA order (repeatable) | No\* |
86
+ | `--troves-deposit` | string | Troves vault deposit (repeatable) | No\* |
87
+ | `--troves-withdraw` | string | Troves vault withdraw (repeatable) | No\* |
82
88
  | `--simulate` | flag | Estimate fees without broadcasting | No |
83
89
  | `--json` | flag | Output as JSON | No |
84
90
 
@@ -150,3 +156,5 @@ npx starkfi@latest batch --simulate \
150
156
  - Use `lending` for standalone lending operations.
151
157
  - Use `send` for standalone token transfers.
152
158
  - Use `dca` for standalone DCA order management.
159
+ - Use `troves` for standalone vault deposit/withdraw operations.
160
+ - Use `lst` for liquid staking operations (not supported in batch).
@@ -310,5 +310,7 @@ npx starkfi@latest lend-auto --pool Prime --collateral-token ETH --borrow-token
310
310
  - Use `balance` to verify available assets before supplying.
311
311
  - Use `trade` to swap tokens if the user doesn't have the right asset.
312
312
  - Use `portfolio` for a full overview including lending positions with USD values.
313
- - Use `batch` to combine supply operations with swaps or staking.
313
+ - Use `batch` to combine supply operations with swaps, staking, or vault deposits.
314
+ - Use `troves` for vault-based yield strategies (different from lending).
315
+ - Use `lst` for liquid staking yield (xSTRK can also be supplied to lending pools).
314
316
  - Use `portfolio-rebalance` (within `portfolio` skill) to optimize overall portfolio allocation.
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: lst
3
+ description: Liquid staking via Endur on Starknet — stake STRK to receive xSTRK, redeem xSTRK back to STRK, check positions, and view protocol stats. Yield is embedded in the xSTRK share price (no manual claim needed). Use this skill when the user mentions liquid staking, LST, xSTRK, Endur, liquid staking token, share price, instant staking, tradeable staking position, or wants a staking token they can trade or use in DeFi — even if they don't say "liquid staking" explicitly.
4
+ license: MIT
5
+ compatibility: Requires Node.js 18+ and npx.
6
+ metadata:
7
+ version: 0.2.0
8
+ author: ahmetenesdur
9
+ category: transaction
10
+ allowed-tools:
11
+ - Bash(npx starkfi@latest lst-position)
12
+ - Bash(npx starkfi@latest lst-position *)
13
+ - Bash(npx starkfi@latest lst-stats)
14
+ - Bash(npx starkfi@latest lst-stats *)
15
+ - Bash(npx starkfi@latest lst-stake *)
16
+ - Bash(npx starkfi@latest lst-redeem *)
17
+ - Bash(npx starkfi@latest lst-exit-all)
18
+ - Bash(npx starkfi@latest lst-exit-all *)
19
+ - Bash(npx starkfi@latest status)
20
+ - Bash(npx starkfi@latest balance)
21
+ - Bash(npx starkfi@latest balance *)
22
+ - Bash(npx starkfi@latest tx-status *)
23
+ ---
24
+
25
+ # Liquid Staking (Endur LST)
26
+
27
+ Stake STRK tokens through the Endur liquid staking protocol to receive **xSTRK** — a liquid staking token whose value appreciates over time as staking yield accrues automatically.
28
+
29
+ ## Prerequisites
30
+
31
+ - Active session required.
32
+ - Sufficient STRK balance for staking + gas fees.
33
+
34
+ ## ⚠️ Critical: Yield Model
35
+
36
+ Endur LST yield is **NOT** a claimable reward. The xSTRK share price increases automatically to reflect accumulated staking yield. To realize your yield, redeem xSTRK back to STRK — you will receive more STRK than you originally staked.
37
+
38
+ **Do NOT use the `staking` skill's `rewards --claim` or `rewards --compound` for xSTRK positions.** Those commands are for delegation staking only.
39
+
40
+ ## LST vs Delegation Staking
41
+
42
+ | Feature | Delegation Staking (`staking` skill) | Endur LST (`lst` skill) |
43
+ | ------------------- | ------------------------------------ | -------------------------------- |
44
+ | Token received | None (position tracked on-chain) | xSTRK (ERC-20, tradeable) |
45
+ | Yield mechanism | Manual claim via `rewards --claim` | Automatic via share price |
46
+ | Liquidity | Locked until unstake cooldown | Liquid — trade xSTRK anytime |
47
+ | DeFi composability | Limited | xSTRK usable in Troves, lending |
48
+ | Unstaking | 2-step process with cooldown | Instant redemption |
49
+
50
+ ## Rules
51
+
52
+ 1. BEFORE staking, check `balance --token STRK` to confirm sufficient STRK.
53
+ 2. Use `lst-stats` to check the current exchange rate, total STRK staked, and APR before staking.
54
+ 3. Use `lst-position` to check the user's current xSTRK balance and its STRK value.
55
+ 4. **NEVER** suggest using `rewards --claim` or `rewards --compound` for LST positions. Yield is automatic.
56
+ 5. When the user asks about "how much yield" from LST, show `lst-position` which displays the current STRK value vs original deposit.
57
+ 6. AFTER any transactional operation (stake, redeem, exit-all), verify with `tx-status`.
58
+ 7. `lst-exit-all` redeems the entire xSTRK balance — warn the user before executing.
59
+
60
+ ## Commands
61
+
62
+ ```bash
63
+ # Check LST position (xSTRK balance and STRK value)
64
+ npx starkfi@latest lst-position [-a <symbol>] [--json]
65
+
66
+ # View Endur protocol stats (exchange rate, APR, total staked)
67
+ npx starkfi@latest lst-stats [-a <symbol>] [--json]
68
+
69
+ # Stake STRK to receive xSTRK
70
+ npx starkfi@latest lst-stake <amount> [-a <symbol>] [--json]
71
+
72
+ # Redeem xSTRK back to STRK (partial)
73
+ npx starkfi@latest lst-redeem <amount> [-a <symbol>] [--json]
74
+
75
+ # Redeem all xSTRK back to STRK
76
+ npx starkfi@latest lst-exit-all [-a <symbol>] [--json]
77
+ ```
78
+
79
+ ## Parameters
80
+
81
+ ### lst-position / lst-stats
82
+
83
+ | Parameter | Type | Description | Required |
84
+ | ------------ | ------ | ---------------------------------------------- | -------- |
85
+ | `-a, --asset`| string | Underlying asset symbol (default: STRK) | No |
86
+ | `--json` | flag | Output as JSON | No |
87
+
88
+ ### lst-stake
89
+
90
+ | Parameter | Type | Description | Required |
91
+ | ------------ | ------ | ---------------------------------------------- | -------- |
92
+ | `amount` | number | Amount of the asset to stake | Yes |
93
+ | `-a, --asset`| string | Asset to stake (default: STRK) | No |
94
+ | `--json` | flag | Output as JSON | No |
95
+
96
+ ### lst-redeem
97
+
98
+ | Parameter | Type | Description | Required |
99
+ | ------------ | ------ | ---------------------------------------------- | -------- |
100
+ | `amount` | number | Amount of LST shares to redeem | Yes |
101
+ | `-a, --asset`| string | Underlying asset (default: STRK) | No |
102
+ | `--json` | flag | Output as JSON | No |
103
+
104
+ ### lst-exit-all
105
+
106
+ | Parameter | Type | Description | Required |
107
+ | ------------ | ------ | ---------------------------------------------- | -------- |
108
+ | `-a, --asset`| string | Asset to exit completely (default: STRK) | No |
109
+ | `--json` | flag | Output as JSON | No |
110
+
111
+ ## Examples
112
+
113
+ **User:** "What's the current LST exchange rate?"
114
+
115
+ ```bash
116
+ npx starkfi@latest lst-stats
117
+ ```
118
+
119
+ **User:** "Stake 1000 STRK via liquid staking"
120
+
121
+ ```bash
122
+ npx starkfi@latest status
123
+ npx starkfi@latest balance --token STRK
124
+ npx starkfi@latest lst-stats # Check current exchange rate
125
+ npx starkfi@latest lst-stake 1000
126
+ npx starkfi@latest tx-status <hash>
127
+ ```
128
+
129
+ **User:** "How much is my xSTRK worth?"
130
+
131
+ ```bash
132
+ npx starkfi@latest lst-position
133
+ ```
134
+
135
+ **User:** "Redeem 500 xSTRK back to STRK"
136
+
137
+ ```bash
138
+ npx starkfi@latest lst-position # Check available xSTRK balance
139
+ npx starkfi@latest lst-redeem 500
140
+ npx starkfi@latest tx-status <hash>
141
+ ```
142
+
143
+ **User:** "Exit all my liquid staking"
144
+
145
+ ```bash
146
+ npx starkfi@latest lst-position # Show what will be redeemed
147
+ # WARN: This redeems all xSTRK. Confirm with user.
148
+ npx starkfi@latest lst-exit-all
149
+ npx starkfi@latest tx-status <hash>
150
+ ```
151
+
152
+ **User:** "Should I use regular staking or liquid staking?"
153
+
154
+ ```bash
155
+ # Show both options for comparison
156
+ npx starkfi@latest lst-stats # LST: exchange rate, APR
157
+ npx starkfi@latest validators # Delegation: validator list
158
+ # Explain: LST = liquid + auto-yield; Delegation = locked + manual claim
159
+ ```
160
+
161
+ ## Error Handling
162
+
163
+ | Error | Action |
164
+ | ---------------------- | -------------------------------------------------------- |
165
+ | `Insufficient balance` | Check `balance --token STRK` for staking, or `lst-position` for redeem. |
166
+ | `Not authenticated` | Run `authenticate-wallet` skill first. |
167
+
168
+ ## Related Skills
169
+
170
+ - Use `balance` to check available STRK before staking.
171
+ - Use `staking` for delegation staking (validator-based, manual reward claims).
172
+ - Use `troves` to deposit xSTRK into yield vaults for additional yield.
173
+ - Use `portfolio` for a full overview including LST positions with USD values.
174
+ - Use `batch` to combine swaps with liquid staking in one transaction.
@@ -71,13 +71,15 @@ npx starkfi@latest portfolio-rebalance --target "<allocation>" [--slippage <n>]
71
71
 
72
72
  ## Dashboard Sections
73
73
 
74
- The portfolio displays five sections:
74
+ The portfolio displays seven sections:
75
75
 
76
76
  1. **Token Balances** — STRK, ETH, and all ERC-20 tokens with non-zero balances and their USD values.
77
77
  2. **Staking Positions** — Active stakes across all validators/pools with pending rewards. Shows unpooling amounts and cooldown dates when exit intents are active.
78
78
  3. **Lending Positions** — Active Vesu V2 positions: supplied and borrowed amounts with pool details.
79
79
  4. **DCA Orders** — Active Dollar-Cost Averaging recurring swap orders.
80
80
  5. **Confidential Tongo Balance** — Private active and pending balances under Tongo Cash.
81
+ 6. **Troves Vault Positions** — Active deposits in Troves DeFi yield strategies with current value and APY.
82
+ 7. **LST Positions** — xSTRK holdings from Endur liquid staking with current STRK value and yield accrued.
81
83
 
82
84
  ## Examples
83
85
 
@@ -146,5 +148,7 @@ npx starkfi@latest portfolio-rebalance --target "50 ETH, 30 USDC, 20 STRK" --sli
146
148
  - Use `lending` `lend-status` for detailed lending positions.
147
149
  - Use `lending` `lend-monitor` to monitor health factors across lending positions.
148
150
  - Use `dca` `dca-list` to view active DCA orders.
151
+ - Use `troves` `troves-position` for detailed vault positions.
152
+ - Use `lst` `lst-position` for detailed liquid staking positions.
149
153
  - Use `trade` if you need to swap a single token pair (not full rebalance).
150
154
 
@@ -50,6 +50,7 @@ Manage Starknet staking operations: delegate tokens to validators, claim or comp
50
50
  5. AFTER any transactional operation (stake, unstake, rewards), verify with `tx-status`.
51
51
  6. Use `stake-status` to view the user's current staking positions across all validators. When exit intents are active, unpooling amounts and cooldown dates are shown automatically.
52
52
  7. Token defaults to `STRK` if `--token` is not specified.
53
+ 8. **LST Disambiguation:** If the user mentions "liquid staking", "xSTRK", or "Endur", redirect to the `lst` skill instead. This skill handles **delegation staking** only. Do NOT use `rewards --claim` or `rewards --compound` for xSTRK positions.
53
54
 
54
55
  ## Commands
55
56
 
@@ -187,3 +188,4 @@ npx starkfi@latest stake-status
187
188
  - Use `balance` to check available tokens before staking.
188
189
  - Use `portfolio` for a full overview including staking positions with USD values.
189
190
  - Use `batch` to combine staking with other operations in one transaction.
191
+ - Use `lst` for liquid staking via Endur (xSTRK — automatic yield, instant redemption).
@@ -91,6 +91,8 @@ npx starkfi@latest tx-status <hash>
91
91
 
92
92
  - Use `balance` to check available tokens before trading.
93
93
  - Use `multi-swap` for executing 2-3 swaps in a single transaction.
94
- - Use `batch` for combining a swap with other operations (stake, supply, send, dca).
94
+ - Use `batch` for combining a swap with other operations (stake, supply, send, dca, troves).
95
95
  - Use `dca` for recurring buy orders instead of a one-time swap.
96
+ - Use `troves` to deposit swap proceeds into yield vaults.
97
+ - Use `lst` for liquid staking after swapping to STRK.
96
98
  - Use `config` to set a custom RPC if experiencing rate limits.
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: troves
3
+ description: Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.
4
+ license: MIT
5
+ compatibility: Requires Node.js 18+ and npx.
6
+ metadata:
7
+ version: 0.3.0
8
+ author: ahmetenesdur
9
+ category: transaction
10
+ allowed-tools:
11
+ - Bash(npx starkfi@latest troves-list)
12
+ - Bash(npx starkfi@latest troves-list *)
13
+ - Bash(npx starkfi@latest troves-position)
14
+ - Bash(npx starkfi@latest troves-position *)
15
+ - Bash(npx starkfi@latest troves-deposit *)
16
+ - Bash(npx starkfi@latest troves-withdraw *)
17
+ - Bash(npx starkfi@latest status)
18
+ - Bash(npx starkfi@latest balance)
19
+ - Bash(npx starkfi@latest balance *)
20
+ - Bash(npx starkfi@latest tx-status *)
21
+ ---
22
+
23
+ # Troves DeFi Vaults
24
+
25
+ Manage Troves yield vault strategies on Starknet: browse curated vault strategies, deposit tokens to earn yield, and withdraw from positions. Strategies range from single-asset vaults to dual-asset LP positions (e.g. Ekubo CL pools).
26
+
27
+ ## Prerequisites
28
+
29
+ - Active session required.
30
+ - Sufficient token balance for deposits + gas fees.
31
+
32
+ ## Rules
33
+
34
+ 1. BEFORE any deposit, you MUST run `npx starkfi@latest troves-list` to discover available strategies and their current APY, TVL, and risk factors.
35
+ 2. BEFORE depositing, check `balance` to confirm the user has enough of the required deposit token(s).
36
+ 3. Use `troves-position` to check the user's current vault positions before withdrawing.
37
+ 4. **Risk awareness:** Always inform the user of the strategy's `riskFactor` (1.0 = low, 5.0 = high) and `isAudited` status before depositing.
38
+ 5. Suggest using `--simulate` first for large deposits to verify the transaction would succeed.
39
+ 6. AFTER any transactional operation (deposit, withdraw), verify with `tx-status`.
40
+ 7. Only deposit into strategies with status `Active`. Warn if a strategy is `Paused` or `Deprecated`.
41
+ 8. **Dual-asset strategies:** When a strategy has 2 deposit tokens (e.g. `STRK, ETH`), you MUST provide `--amount2` and `--token2` flags in addition to the primary amount and token. Omitting these will produce a descriptive validation error explaining exactly which parameters are missing.
42
+
43
+ ## Commands
44
+
45
+ ```bash
46
+ # List all available strategies
47
+ npx starkfi@latest troves-list [--json]
48
+
49
+ # Check current vault positions
50
+ npx starkfi@latest troves-position <strategy-id> [--json]
51
+
52
+ # Deposit into a strategy (single-asset)
53
+ npx starkfi@latest troves-deposit <amount> <strategy-id> [--token <symbol>] [--simulate] [--json]
54
+
55
+ # Deposit into a strategy (dual-asset)
56
+ npx starkfi@latest troves-deposit <amount> <strategy-id> -t <symbol> --amount2 <value> --token2 <symbol2> [--simulate] [--json]
57
+
58
+ # Withdraw from a strategy
59
+ npx starkfi@latest troves-withdraw <amount> <strategy-id> [--token <symbol>] [--amount2 <value>] [--token2 <symbol2>] [--simulate] [--json]
60
+ ```
61
+
62
+ ## Parameters
63
+
64
+ ### troves-deposit / troves-withdraw
65
+
66
+ | Parameter | Type | Description | Required |
67
+ | ------------ | ------ | ------------------------------------------------------- | -------- |
68
+ | `amount` | number | Amount to deposit or withdraw (positional) | Yes |
69
+ | `strategy-id`| string | Strategy ID (positional, e.g. `evergreen_strk`) | Yes |
70
+ | `--token` | string | Token symbol (default: STRK) | No |
71
+ | `--amount2` | string | Second token amount for dual-asset strategies | Dual-asset only |
72
+ | `--token2` | string | Second token symbol for dual-asset strategies | Dual-asset only |
73
+ | `--simulate` | flag | Estimate fees without broadcasting | No |
74
+ | `--json` | flag | Output as JSON | No |
75
+
76
+ ## Strategy Types
77
+
78
+ ### Single-Asset Strategies
79
+ Strategies with one deposit token (e.g. `evergreen_strk`, `hyper_xstrk`). Only `--token` and `amount` are needed.
80
+
81
+ ### Dual-Asset Strategies
82
+ Strategies with two deposit tokens (e.g. `ekubo_cl_strketh`, `ekubo_cl_strkusdc_v2`). Both token amounts are required via `--amount2` and `--token2` flags. Check `depositTokens` in `troves-list` output to identify these.
83
+
84
+ ## Strategy Properties
85
+
86
+ Each strategy has the following properties:
87
+
88
+ | Property | Description |
89
+ | --------------- | ---------------------------------- |
90
+ | `id` | Unique strategy identifier |
91
+ | `name` | Human-readable strategy name |
92
+ | `apy` | Current annual percentage yield |
93
+ | `tvlUsd` | Total value locked in USD |
94
+ | `depositTokens` | Accepted deposit tokens |
95
+ | `riskFactor` | Risk rating (1.0 = low, 5.0 = high) |
96
+ | `isAudited` | Whether the strategy is audited |
97
+ | `status` | `Active`, `Paused`, or `Deprecated` |
98
+
99
+ ## Examples
100
+
101
+ **User:** "What yield vault strategies are available?"
102
+
103
+ ```bash
104
+ npx starkfi@latest troves-list
105
+ ```
106
+
107
+ **User:** "Deposit 500 STRK into Evergreen vault"
108
+
109
+ ```bash
110
+ npx starkfi@latest status
111
+ npx starkfi@latest balance --token STRK
112
+ npx starkfi@latest troves-list # Verify strategy exists and is Active
113
+ npx starkfi@latest troves-deposit 500 evergreen_strk --simulate
114
+ npx starkfi@latest troves-deposit 500 evergreen_strk
115
+ npx starkfi@latest tx-status <hash>
116
+ ```
117
+
118
+ **User:** "Deposit into Ekubo STRK/ETH pool" (dual-asset)
119
+
120
+ ```bash
121
+ npx starkfi@latest troves-list --json # Check depositTokens for ekubo_cl_strketh
122
+ npx starkfi@latest balance --token STRK
123
+ npx starkfi@latest balance --token ETH
124
+ npx starkfi@latest troves-deposit 100 ekubo_cl_strketh -t STRK --amount2 0.005 --token2 ETH --simulate
125
+ npx starkfi@latest troves-deposit 100 ekubo_cl_strketh -t STRK --amount2 0.005 --token2 ETH
126
+ npx starkfi@latest tx-status <hash>
127
+ ```
128
+
129
+ **User:** "Show me my vault positions"
130
+
131
+ ```bash
132
+ npx starkfi@latest troves-position evergreen_strk
133
+ ```
134
+
135
+ **User:** "Withdraw 200 STRK from Evergreen"
136
+
137
+ ```bash
138
+ npx starkfi@latest troves-position evergreen_strk # Check available balance
139
+ npx starkfi@latest troves-withdraw 200 evergreen_strk --simulate
140
+ npx starkfi@latest troves-withdraw 200 evergreen_strk
141
+ npx starkfi@latest tx-status <hash>
142
+ ```
143
+
144
+ **User:** "Find the highest APY vault for STRK"
145
+
146
+ ```bash
147
+ npx starkfi@latest troves-list --json
148
+ # Parse and present strategies sorted by APY, filtered by STRK deposit token
149
+ ```
150
+
151
+ ## Error Handling
152
+
153
+ | Error | Action |
154
+ | ----------------------------------- | -------------------------------------------------------------- |
155
+ | `Strategy not found` | Run `troves-list` to find valid strategy IDs. |
156
+ | `Strategy paused` | Strategy is not accepting deposits. Choose another one. |
157
+ | `Insufficient balance` | Check `balance` for the required deposit token(s). |
158
+ | `Simulation failed` | Transaction would revert. Check amount, strategy, and gas. |
159
+ | `Not authenticated` | Run `authenticate-wallet` skill first. |
160
+ | `dual-asset strategy ... must provide` | Strategy requires two token amounts. Add `--amount2` and `--token2`. |
161
+ | `does not accept <token>` | Use a token from the strategy's `depositTokens` list. |
162
+
163
+ ## Related Skills
164
+
165
+ - Use `balance` to verify available tokens before depositing.
166
+ - Use `portfolio` for a full overview including vault positions with USD values.
167
+ - Use `batch` to combine vault deposits with swaps or staking in one transaction.
168
+ - Use `lst` for liquid staking (different yield mechanism — share price appreciation).
169
+ - Use `staking` for delegation staking (validator-based yield).