torch-liquidation-bot 4.0.1 → 10.0.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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/readme.md +19 -46
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ const scanAndLiquidate = async (connection, log, vaultCreator, agentKeypair) =>
|
|
|
54
54
|
borrower: position.borrower,
|
|
55
55
|
vault: vaultCreator,
|
|
56
56
|
}), 'buildLiquidateTransaction');
|
|
57
|
-
transaction.sign(agentKeypair);
|
|
57
|
+
transaction.sign([agentKeypair]);
|
|
58
58
|
const signature = await connection.sendRawTransaction(transaction.serialize());
|
|
59
59
|
await (0, utils_1.withTimeout)((0, torchsdk_1.confirmTransaction)(connection, signature, agentKeypair.publicKey.toBase58()), 'confirmTransaction');
|
|
60
60
|
log('info', `LIQUIDATED | ${token.symbol} | borrower=${position.borrower.slice(0, 8)}... | ` +
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;GAeG;;AAEH,6CAAqD;AACrD,uCAQiB;AACjB,qCAAqC;AACrC,mCAAoF;AAEpF,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,gBAAgB,GAAG,KAAK,EAC5B,UAAsB,EACtB,GAAoC,EACpC,YAAoB,EACpB,YAAqB,EACrB,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,mBAAW,EAClC,IAAA,oBAAS,EAAC,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,EACxE,WAAW,CACZ,CAAA;IAED,GAAG,CAAC,OAAO,EAAE,cAAc,MAAM,CAAC,MAAM,kBAAkB,CAAC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AAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,CAAA;IAC5E,CAAC;AACH,CAAC,CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,CAAA;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "torch-liquidation-bot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "autonomous vault-based liquidation keeper for Torch Market lending on Solana using torchsdk",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@solana/web3.js": "1.98.4",
|
|
21
|
-
"torchsdk": "
|
|
21
|
+
"torchsdk": "10.2.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "20.19.33",
|
package/readme.md
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
# torch-liquidation-bot
|
|
1
|
+
# torch-liquidation-bot
|
|
2
2
|
|
|
3
|
-
Vault-based liquidation
|
|
4
|
-
|
|
5
|
-
> **v3.0.0+ Breaking Change:** The bot now operates through the torchsdk v3.7.22 vault model. It generates a disposable agent keypair at startup, scans for underwater loan positions using the SDK's bulk loan scanner (`getAllLoanPositions`), and executes liquidations. The user never provides a wallet — only a vault creator pubkey and an RPC endpoint.
|
|
3
|
+
Vault-based liquidation keeper for [Torch Market](https://torch.market) on Solana. Generates an agent keypair in-process -- no user wallet required. All operations route through a Torch Vault.
|
|
6
4
|
|
|
7
5
|
## Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm install torch-liquidation-bot
|
|
8
|
+
npm install torch-liquidation-bot
|
|
11
9
|
```
|
|
12
10
|
|
|
13
11
|
## Quick Start
|
|
14
12
|
|
|
15
13
|
```bash
|
|
16
|
-
# 1. start the bot
|
|
14
|
+
# 1. start the bot -- it prints its agent wallet on startup
|
|
17
15
|
VAULT_CREATOR=<your-vault-creator-pubkey> SOLANA_RPC_URL=<rpc> npx torch-liquidation-bot
|
|
18
16
|
|
|
19
17
|
# 2. link the printed agent wallet to your vault (one-time, from your authority wallet)
|
|
20
18
|
# the bot will print the exact instructions if the wallet is not yet linked
|
|
21
19
|
|
|
22
|
-
# 3. restart the bot
|
|
20
|
+
# 3. restart the bot -- it will begin scanning and liquidating
|
|
23
21
|
```
|
|
24
22
|
|
|
25
23
|
## What It Does
|
|
@@ -30,7 +28,7 @@ This bot:
|
|
|
30
28
|
|
|
31
29
|
1. Generates a disposable `Keypair` in-process (no private key leaves the process)
|
|
32
30
|
2. Verifies the vault exists and the agent wallet is linked
|
|
33
|
-
3. Scans migrated tokens with `getAllLoanPositions()`
|
|
31
|
+
3. Scans migrated tokens with `getAllLoanPositions()` -- one RPC call per token, positions pre-sorted liquidatable-first
|
|
34
32
|
4. Executes `buildLiquidateTransaction()` for each liquidatable position
|
|
35
33
|
5. Confirms the transaction via `confirmTransaction()`
|
|
36
34
|
6. Repeats on a configurable interval
|
|
@@ -49,15 +47,13 @@ All value flows through the vault. The agent wallet is a stateless controller.
|
|
|
49
47
|
|
|
50
48
|
## Vault Setup
|
|
51
49
|
|
|
52
|
-
The bot uses the torchsdk v3.7.22 vault model:
|
|
53
|
-
|
|
54
50
|
```
|
|
55
|
-
User (hardware wallet)
|
|
56
|
-
|
|
57
|
-
Bot (disposable)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
User
|
|
51
|
+
User (hardware wallet) -> Creates vault, deposits SOL
|
|
52
|
+
-> Links bot's agent wallet
|
|
53
|
+
Bot (disposable) -> Scans for liquidatable positions
|
|
54
|
+
-> Executes liquidations using vault funds
|
|
55
|
+
-> All proceeds return to vault
|
|
56
|
+
User -> Withdraws from vault (authority only)
|
|
61
57
|
```
|
|
62
58
|
|
|
63
59
|
The agent wallet needs minimal SOL for gas (~0.01 SOL). All liquidation value flows through the vault.
|
|
@@ -98,7 +94,7 @@ for (const token of tokens) {
|
|
|
98
94
|
borrower: pos.borrower,
|
|
99
95
|
vault: vaultCreator,
|
|
100
96
|
})
|
|
101
|
-
transaction.sign(agent)
|
|
97
|
+
transaction.sign([agent])
|
|
102
98
|
const sig = await connection.sendRawTransaction(transaction.serialize())
|
|
103
99
|
await confirmTransaction(connection, sig, agent.publicKey.toBase58())
|
|
104
100
|
}
|
|
@@ -109,22 +105,12 @@ for (const token of tokens) {
|
|
|
109
105
|
|
|
110
106
|
```
|
|
111
107
|
src/
|
|
112
|
-
├── types.ts
|
|
113
|
-
├── config.ts
|
|
114
|
-
├── utils.ts
|
|
115
|
-
└── index.ts
|
|
108
|
+
├── types.ts -- BotConfig interface
|
|
109
|
+
├── config.ts -- loadConfig() (SOLANA_RPC_URL, VAULT_CREATOR, SOLANA_PRIVATE_KEY, SCAN_INTERVAL_MS, LOG_LEVEL)
|
|
110
|
+
├── utils.ts -- sol(), bpsToPercent(), withTimeout(), createLogger()
|
|
111
|
+
└── index.ts -- vault-based liquidation loop
|
|
116
112
|
```
|
|
117
113
|
|
|
118
|
-
## Lending Parameters
|
|
119
|
-
|
|
120
|
-
| Parameter | Value |
|
|
121
|
-
|-----------|-------|
|
|
122
|
-
| Max LTV | 50% |
|
|
123
|
-
| Liquidation threshold | 65% LTV |
|
|
124
|
-
| Interest rate | 2% per epoch (~7 days) |
|
|
125
|
-
| Liquidation bonus | 10% of collateral |
|
|
126
|
-
| Min borrow | 0.1 SOL |
|
|
127
|
-
|
|
128
114
|
## Testing
|
|
129
115
|
|
|
130
116
|
Requires [Surfpool](https://github.com/nicholasgasior/surfpool) running a mainnet fork:
|
|
@@ -139,24 +125,11 @@ pnpm test
|
|
|
139
125
|
- Agent keypair generated in-process with `Keypair.generate()` (or loaded from optional `SOLANA_PRIVATE_KEY`)
|
|
140
126
|
- Vault model: agent is a stateless controller, all value stays in the vault
|
|
141
127
|
- Authority can unlink the agent wallet instantly via `buildUnlinkWalletTransaction()`
|
|
142
|
-
- All SDK calls wrapped with 30-second timeout
|
|
143
|
-
- Minimal dependencies: `@solana/web3.js` + `torchsdk`
|
|
128
|
+
- All SDK calls wrapped with 30-second timeout
|
|
129
|
+
- Minimal dependencies: `@solana/web3.js` + `torchsdk`
|
|
144
130
|
- No post-install hooks, no remote code fetching
|
|
145
131
|
- `disable-model-invocation: true` -- agents cannot invoke this skill autonomously
|
|
146
132
|
|
|
147
|
-
### External Runtime Dependencies
|
|
148
|
-
|
|
149
|
-
The SDK makes outbound HTTPS requests to two external services at runtime (the bot does **not** contact SAID Protocol):
|
|
150
|
-
|
|
151
|
-
| Service | Purpose | When Called |
|
|
152
|
-
|---------|---------|------------|
|
|
153
|
-
| **CoinGecko** (`api.coingecko.com`) | SOL/USD price for display | Token queries via `getTokens()` |
|
|
154
|
-
| **Irys Gateway** (`gateway.irys.xyz`) | Token metadata fallback (name, symbol, image) | `getTokens()` when on-chain metadata URI points to Irys |
|
|
155
|
-
|
|
156
|
-
`confirmTransaction()` does NOT contact SAID — it only calls `connection.getParsedTransaction()` (Solana RPC). The SDK exports a `verifySaid()` function that contacts `api.saidprotocol.com`, but the bot never calls it.
|
|
157
|
-
|
|
158
|
-
No credentials are sent to any external service. All requests are read-only GET. No private key material is ever transmitted.
|
|
159
|
-
|
|
160
133
|
## Links
|
|
161
134
|
|
|
162
135
|
- [torchsdk](https://github.com/mrsirg97-rgb/torchsdk) -- the SDK powering this bot
|