starkfi 0.6.3 → 0.7.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/MCP.md +26 -3
- package/README.md +16 -10
- package/dist/index.js +219 -158
- package/dist/index.js.map +1 -0
- package/package.json +10 -10
- package/skills/README.md +11 -3
- package/skills/balance/SKILL.md +3 -1
- package/skills/batch/SKILL.md +11 -3
- package/skills/lending/SKILL.md +3 -1
- package/skills/lst/SKILL.md +171 -0
- package/skills/portfolio/SKILL.md +5 -1
- package/skills/staking/SKILL.md +2 -0
- package/skills/trade/SKILL.md +3 -1
- package/skills/troves/SKILL.md +142 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starkfi",
|
|
3
|
-
"version": "0.
|
|
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.0",
|
|
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.
|
|
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.
|
|
84
|
+
"eslint": "^10.2.1",
|
|
85
85
|
"eslint-config-prettier": "^10.1.8",
|
|
86
|
-
"globals": "^17.
|
|
86
|
+
"globals": "^17.5.0",
|
|
87
87
|
"jiti": "^2.6.1",
|
|
88
|
-
"ora": "^9.
|
|
89
|
-
"prettier": "^3.8.
|
|
90
|
-
"starkzap": "^
|
|
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.
|
|
94
|
+
"typescript-eslint": "^8.59.0",
|
|
95
95
|
"zod": "^4.3.6"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@fatsolutions/tongo-sdk": "^1.
|
|
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
|
-
>
|
|
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 |
|
|
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` |
|
package/skills/balance/SKILL.md
CHANGED
|
@@ -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
|
-
-
|
|
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.
|
package/skills/batch/SKILL.md
CHANGED
|
@@ -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,
|
|
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**,
|
|
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> <strategy_id> [token]" \
|
|
52
|
+
--troves-withdraw "<amount> <strategy_id> [token]"
|
|
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> <strategy_id> [token]"` | `--troves-deposit "100 evergreen_strk"` |
|
|
69
|
+
| `--troves-withdraw` | `"<amount> <strategy_id> [token]"` | `--troves-withdraw "50 evergreen_strk"` |
|
|
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).
|
package/skills/lending/SKILL.md
CHANGED
|
@@ -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
|
|
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,171 @@
|
|
|
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.1.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. Suggest using `--simulate` first for large operations.
|
|
58
|
+
7. AFTER any transactional operation (stake, redeem, exit-all), verify with `tx-status`.
|
|
59
|
+
8. `lst-exit-all` redeems the entire xSTRK balance — warn the user before executing.
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Check LST position (xSTRK balance and STRK value)
|
|
65
|
+
npx starkfi@latest lst-position [--json]
|
|
66
|
+
|
|
67
|
+
# View Endur protocol stats (exchange rate, APR, total staked)
|
|
68
|
+
npx starkfi@latest lst-stats [--json]
|
|
69
|
+
|
|
70
|
+
# Stake STRK to receive xSTRK
|
|
71
|
+
npx starkfi@latest lst-stake <amount> [--simulate] [--json]
|
|
72
|
+
|
|
73
|
+
# Redeem xSTRK back to STRK (partial)
|
|
74
|
+
npx starkfi@latest lst-redeem <amount> [--simulate] [--json]
|
|
75
|
+
|
|
76
|
+
# Redeem all xSTRK back to STRK
|
|
77
|
+
npx starkfi@latest lst-exit-all [--simulate] [--json]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Parameters
|
|
81
|
+
|
|
82
|
+
### lst-stake
|
|
83
|
+
|
|
84
|
+
| Parameter | Type | Description | Required |
|
|
85
|
+
| ------------ | ------ | ---------------------------------- | -------- |
|
|
86
|
+
| `amount` | number | Amount of STRK to stake | Yes |
|
|
87
|
+
| `--simulate` | flag | Estimate fees without broadcasting | No |
|
|
88
|
+
| `--json` | flag | Output as JSON | No |
|
|
89
|
+
|
|
90
|
+
### lst-redeem
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Description | Required |
|
|
93
|
+
| ------------ | ------ | ---------------------------------- | -------- |
|
|
94
|
+
| `amount` | number | Amount of xSTRK to redeem | Yes |
|
|
95
|
+
| `--simulate` | flag | Estimate fees without broadcasting | No |
|
|
96
|
+
| `--json` | flag | Output as JSON | No |
|
|
97
|
+
|
|
98
|
+
### lst-exit-all
|
|
99
|
+
|
|
100
|
+
| Parameter | Type | Description | Required |
|
|
101
|
+
| ------------ | ---- | ---------------------------------- | -------- |
|
|
102
|
+
| `--simulate` | flag | Estimate fees without broadcasting | No |
|
|
103
|
+
| `--json` | flag | Output as JSON | No |
|
|
104
|
+
|
|
105
|
+
## Examples
|
|
106
|
+
|
|
107
|
+
**User:** "What's the current LST exchange rate?"
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npx starkfi@latest lst-stats
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**User:** "Stake 1000 STRK via liquid staking"
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npx starkfi@latest status
|
|
117
|
+
npx starkfi@latest balance --token STRK
|
|
118
|
+
npx starkfi@latest lst-stats # Check current exchange rate
|
|
119
|
+
npx starkfi@latest lst-stake 1000 --simulate
|
|
120
|
+
npx starkfi@latest lst-stake 1000
|
|
121
|
+
npx starkfi@latest tx-status <hash>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**User:** "How much is my xSTRK worth?"
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npx starkfi@latest lst-position
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**User:** "Redeem 500 xSTRK back to STRK"
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npx starkfi@latest lst-position # Check available xSTRK balance
|
|
134
|
+
npx starkfi@latest lst-redeem 500 --simulate
|
|
135
|
+
npx starkfi@latest lst-redeem 500
|
|
136
|
+
npx starkfi@latest tx-status <hash>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**User:** "Exit all my liquid staking"
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npx starkfi@latest lst-position # Show what will be redeemed
|
|
143
|
+
# WARN: This redeems all xSTRK. Confirm with user.
|
|
144
|
+
npx starkfi@latest lst-exit-all
|
|
145
|
+
npx starkfi@latest tx-status <hash>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**User:** "Should I use regular staking or liquid staking?"
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Show both options for comparison
|
|
152
|
+
npx starkfi@latest lst-stats # LST: exchange rate, APR
|
|
153
|
+
npx starkfi@latest validators # Delegation: validator list
|
|
154
|
+
# Explain: LST = liquid + auto-yield; Delegation = locked + manual claim
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Error Handling
|
|
158
|
+
|
|
159
|
+
| Error | Action |
|
|
160
|
+
| ---------------------- | -------------------------------------------------------- |
|
|
161
|
+
| `Insufficient balance` | Check `balance --token STRK` for staking, or `lst-position` for redeem. |
|
|
162
|
+
| `Simulation failed` | Transaction would revert. Check amount and gas. |
|
|
163
|
+
| `Not authenticated` | Run `authenticate-wallet` skill first. |
|
|
164
|
+
|
|
165
|
+
## Related Skills
|
|
166
|
+
|
|
167
|
+
- Use `balance` to check available STRK before staking.
|
|
168
|
+
- Use `staking` for delegation staking (validator-based, manual reward claims).
|
|
169
|
+
- Use `troves` to deposit xSTRK into yield vaults for additional yield.
|
|
170
|
+
- Use `portfolio` for a full overview including LST positions with USD values.
|
|
171
|
+
- 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
|
|
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
|
|
package/skills/staking/SKILL.md
CHANGED
|
@@ -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).
|
package/skills/trade/SKILL.md
CHANGED
|
@@ -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,142 @@
|
|
|
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.1.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 LP and leveraged positions.
|
|
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.
|
|
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
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# List all available strategies
|
|
46
|
+
npx starkfi@latest troves-list [--json]
|
|
47
|
+
|
|
48
|
+
# Check current vault positions
|
|
49
|
+
npx starkfi@latest troves-position [--json]
|
|
50
|
+
|
|
51
|
+
# Deposit into a strategy
|
|
52
|
+
npx starkfi@latest troves-deposit <amount> --strategy <id> [--token <symbol>] [--simulate] [--json]
|
|
53
|
+
|
|
54
|
+
# Withdraw from a strategy
|
|
55
|
+
npx starkfi@latest troves-withdraw <amount> --strategy <id> [--token <symbol>] [--simulate] [--json]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Parameters
|
|
59
|
+
|
|
60
|
+
### troves-deposit / troves-withdraw
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Description | Required |
|
|
63
|
+
| ------------ | ------ | ------------------------------------------------- | -------- |
|
|
64
|
+
| `amount` | number | Amount to deposit or withdraw (positional) | Yes |
|
|
65
|
+
| `--strategy` | string | Strategy ID (e.g. `evergreen_strk`) | Yes |
|
|
66
|
+
| `--token` | string | Token symbol (auto-detected from strategy if omitted) | No |
|
|
67
|
+
| `--simulate` | flag | Estimate fees without broadcasting | No |
|
|
68
|
+
| `--json` | flag | Output as JSON | No |
|
|
69
|
+
|
|
70
|
+
## Strategy Properties
|
|
71
|
+
|
|
72
|
+
Each strategy has the following properties:
|
|
73
|
+
|
|
74
|
+
| Property | Description |
|
|
75
|
+
| --------------- | ---------------------------------- |
|
|
76
|
+
| `id` | Unique strategy identifier |
|
|
77
|
+
| `name` | Human-readable strategy name |
|
|
78
|
+
| `apy` | Current annual percentage yield |
|
|
79
|
+
| `tvlUsd` | Total value locked in USD |
|
|
80
|
+
| `depositTokens` | Accepted deposit tokens |
|
|
81
|
+
| `riskFactor` | Risk rating (1.0 = low, 5.0 = high) |
|
|
82
|
+
| `isAudited` | Whether the strategy is audited |
|
|
83
|
+
| `status` | `Active`, `Paused`, or `Deprecated` |
|
|
84
|
+
|
|
85
|
+
## Examples
|
|
86
|
+
|
|
87
|
+
**User:** "What yield vault strategies are available?"
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx starkfi@latest troves-list
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**User:** "Deposit 500 STRK into Evergreen vault"
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx starkfi@latest status
|
|
97
|
+
npx starkfi@latest balance --token STRK
|
|
98
|
+
npx starkfi@latest troves-list # Verify strategy exists and is Active
|
|
99
|
+
npx starkfi@latest troves-deposit 500 --strategy evergreen_strk --simulate
|
|
100
|
+
npx starkfi@latest troves-deposit 500 --strategy evergreen_strk
|
|
101
|
+
npx starkfi@latest tx-status <hash>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**User:** "Show me my vault positions"
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx starkfi@latest troves-position
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**User:** "Withdraw 200 STRK from Evergreen"
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx starkfi@latest troves-position # Check available balance
|
|
114
|
+
npx starkfi@latest troves-withdraw 200 --strategy evergreen_strk --simulate
|
|
115
|
+
npx starkfi@latest troves-withdraw 200 --strategy evergreen_strk
|
|
116
|
+
npx starkfi@latest tx-status <hash>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**User:** "Find the highest APY vault for STRK"
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npx starkfi@latest troves-list --json
|
|
123
|
+
# Parse and present strategies sorted by APY, filtered by STRK deposit token
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Error Handling
|
|
127
|
+
|
|
128
|
+
| Error | Action |
|
|
129
|
+
| ----------------------- | -------------------------------------------------------------- |
|
|
130
|
+
| `Strategy not found` | Run `troves-list` to find valid strategy IDs. |
|
|
131
|
+
| `Strategy paused` | Strategy is not accepting deposits. Choose another one. |
|
|
132
|
+
| `Insufficient balance` | Check `balance` for the required deposit token. |
|
|
133
|
+
| `Simulation failed` | Transaction would revert. Check amount, strategy, and gas. |
|
|
134
|
+
| `Not authenticated` | Run `authenticate-wallet` skill first. |
|
|
135
|
+
|
|
136
|
+
## Related Skills
|
|
137
|
+
|
|
138
|
+
- Use `balance` to verify available tokens before depositing.
|
|
139
|
+
- Use `portfolio` for a full overview including vault positions with USD values.
|
|
140
|
+
- Use `batch` to combine vault deposits with swaps or staking in one transaction.
|
|
141
|
+
- Use `lst` for liquid staking (different yield mechanism — share price appreciation).
|
|
142
|
+
- Use `staking` for delegation staking (validator-based yield).
|