|
9 | 9 | Stitch is the Textile operator bot for filler-network market making. It runs |
10 | 10 | as a single binary named `stitch`. |
11 | 11 |
|
12 | | -Stitch does one job for each configured pool by default, plus an optional |
13 | | -second: |
| 12 | +Stitch quotes Swap by default, plus an optional second job: |
14 | 13 |
|
15 | | -- **Market making**: keep live buy and sell quotes for a configured |
16 | | - soft-asset/stablecoin pair. |
| 14 | +- **Swap quoting (RFQ)**: answer venue quote requests with firm, taker-bound |
| 15 | + orders for a configured soft-asset/stablecoin pair. Connect the bot to |
| 16 | + Textile before going live — a new bot will not Start without that. Connect |
| 17 | + from the panel's Settings, or with `stitch connect` on the CLI. |
17 | 18 | - **Limit-order taking** (opt-in): fill traders' resting limit orders on-chain |
18 | 19 | when their price is at or beyond your own quote, priced by the same spreads |
19 | | - as your market making. |
| 20 | + as your Swap quotes. |
20 | 21 |
|
21 | 22 | ## Contents |
22 | 23 |
|
@@ -53,11 +54,12 @@ No Docker and no terminal. [Download the release for your OS](https://github.com |
53 | 54 | entry). For a headless server, prefer Option 2. |
54 | 55 |
|
55 | 56 | In the browser: sign in with the password you created, **Add a bot**, pick a |
56 | | -corridor, paste your operator wallet key, approve allowances, dry-run, then |
57 | | -Start. Use **Start at login** in Settings if you want the panel (and any bots |
58 | | -left running) to come back after a reboot — login starts stay in the tray and |
59 | | -skip the control window. Quit Stitch from the menu / tray / window to stop the |
60 | | -panel. For unattended 24/7 quoting on a server, use Option 2. |
| 57 | +corridor, paste your operator wallet key, approve allowances, then **Connect** |
| 58 | +the bot to Textile on Settings before Start. Use **Start at login** in Settings |
| 59 | +if you want the panel (and any bots left running) to come back after a reboot |
| 60 | +— login starts stay in the tray and skip the control window. Quit Stitch from |
| 61 | +the menu / tray / window to stop the panel. For unattended 24/7 quoting on a |
| 62 | +server, use Option 2. |
61 | 63 |
|
62 | 64 | ### Option 2 — Server / Docker |
63 | 65 |
|
@@ -109,6 +111,11 @@ Everything else — custom reverse proxy, building from source — is in |
109 | 111 | - [Manual install — Windows](docs/install-windows.md) |
110 | 112 | - [Manual install — Linux](docs/install-linux.md) — includes the systemd service setup. |
111 | 113 |
|
| 114 | +Already running a bot on the public ladder? |
| 115 | +[Migrating from the public ladder to Swap (RFQ)](docs/migrate-book-to-rfq.md) |
| 116 | +covers both the panel and the |
| 117 | +[standalone CLI](docs/migrate-book-to-rfq.md#standalone-cli). |
| 118 | + |
112 | 119 | ### Install with an AI agent |
113 | 120 |
|
114 | 121 | Your coding agent installs the Stitch panel and opens the web UI. You finish |
@@ -154,15 +161,18 @@ The full copyable prompt is in [AI_INSTALL_PROMPT.md](docs/AI_INSTALL_PROMPT.md) |
154 | 161 | </details> |
155 | 162 |
|
156 | 163 | Running the binary directly without the panel? `stitch init` writes `stitch.toml`, |
157 | | -`stitch.env` and an owner-only `stitch.key` for a chosen corridor. The per-OS |
158 | | -guides cover it. |
| 164 | +`stitch.env` and an owner-only `stitch.key` for a chosen corridor, then |
| 165 | +`stitch connect` registers the wallet with Textile so the bot can quote Swap. |
| 166 | +The per-OS guides cover both. |
159 | 167 |
|
160 | 168 | ## How It Works |
161 | 169 |
|
162 | | -Stitch reads `stitch.toml`, polls your configured price feed, signs UniswapX |
163 | | -limit orders, and posts those signed orders to the Textile indexer. The wallet |
164 | | -private key is read from `STITCH_PRIVATE_KEY_FILE`, or from `STITCH_PRIVATE_KEY` |
165 | | -for compatibility. If both are set, `STITCH_PRIVATE_KEY_FILE` takes precedence. |
| 170 | +Stitch reads `stitch.toml`, polls your configured price feed, and answers Swap |
| 171 | +quote requests with firm, taker-bound UniswapX limit orders signed against the |
| 172 | +operator wallet. Connect in the panel registers the maker and writes |
| 173 | +`rfq-api.key`. The wallet private key is read from `STITCH_PRIVATE_KEY_FILE`, |
| 174 | +or from `STITCH_PRIVATE_KEY` for compatibility. If both are set, |
| 175 | +`STITCH_PRIVATE_KEY_FILE` takes precedence. |
166 | 176 |
|
167 | 177 | ### Signer / wallet backend |
168 | 178 |
|
@@ -200,13 +210,19 @@ manual `[signer]` fields below are for CLI and server operators editing |
200 | 210 | The operator wallet still needs a little native gas for Permit2 approvals |
201 | 211 | (`stitch approve`) no matter which signer you use. |
202 | 212 |
|
203 | | -For market making, each configured pool can have: |
| 213 | +For Swap quoting, each configured pool can have: |
204 | 214 |
|
205 | 215 | - a **buy side**, where Stitch spends the stable/debt asset to buy the |
206 | 216 | soft/collateral asset below the feed price; |
207 | 217 | - a **sell side**, where Stitch spends the soft/collateral asset to sell above |
208 | 218 | the feed price. |
209 | 219 |
|
| 220 | +RFQ prices those quotes off the latest feed print plus your configured |
| 221 | +spreads, capped by your liquidity — no TWAP smoothing and no inventory lean. |
| 222 | +TWAP and lean apply to the public ladder and, when it's on, the limit-order |
| 223 | +taker leg. TTL, refresh, and max-orders are ladder-only (`book_enabled`). New |
| 224 | +bots ship with the book off. |
| 225 | + |
210 | 226 | With `limit_taker_enabled = true` on a pool, Stitch also checks the corridor's |
211 | 227 | resting trader limit orders every tick and fills the profitable ones on-chain: |
212 | 228 | a trader selling the soft asset fills at or below your bid, a trader buying it |
@@ -246,6 +262,7 @@ indexer_url = "https://api.textilecredit.com" |
246 | 262 | permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3" |
247 | 263 | reactor = "0x0000000000000000000000000000000000000000" |
248 | 264 | tick_interval_secs = 5 |
| 265 | +book_enabled = false |
249 | 266 |
|
250 | 267 | [feed] |
251 | 268 | url = "https://your-feed.example/cngn-usdt" |
|
0 commit comments