- deployment-status and pool-matrix snapshots aligned with validate-deployment-status.cjs. - Micro-trade / scorecard docs and run-scenario wiring. Made-with: Cursor
61 lines
2.5 KiB
Markdown
61 lines
2.5 KiB
Markdown
# Bot Policy (What It Actually Does)
|
||
|
||
## Inputs (per pool)
|
||
|
||
- **Oracle price** `P_oracle(T)` — target peg: 1.00 for USD stables; FX for EUR tokens
|
||
- **Pool mid price** `P_pool(T)`
|
||
- **Deviation**: `δ = (P_pool - P_oracle) / P_oracle`
|
||
- **Inventory imbalance** on cW side (how much of your token remains vs baseline)
|
||
- Public chain liquidity/volatility conditions
|
||
- Bridge backlog / mint-burn queue status (if available)
|
||
|
||
## Actions
|
||
|
||
### 1. Tight-peg maintenance trades
|
||
|
||
- If `P_pool(T) > P_oracle + band` → bot **sells** `T` into pool (adds T inventory / absorbs quote)
|
||
- If `P_pool(T) < P_oracle - band` → bot **buys** `T` from pool (removes T inventory / spends quote)
|
||
|
||
### 2. Inventory re-centering
|
||
|
||
- If pool is “too drained” of T (or too full), bot adjusts by:
|
||
- Adding/removing single-sided liquidity on T side
|
||
- Optionally bridging more T from ChainID 138 or redeeming back
|
||
|
||
### 3. Cross-pool routing
|
||
|
||
When multiple quotes exist (USDT/USDC/DAI), the bot routes to the best edge:
|
||
|
||
- Trade where slippage + fee is lowest
|
||
- Optionally rebalance quote asset via existing DEX routes (USDC ↔ USDT ↔ DAI)
|
||
|
||
### 4. Bridge-aware throttling
|
||
|
||
- If the bridge is congested or risk flags trip, bot widens bands / reduces exposure
|
||
|
||
### 5. Gas-budgeted micro-support lane
|
||
|
||
For selected wrapped USD rails, especially **cWUSDC** and **cWUSDT**, you can reserve a small gas budget for **micro-trades** against **USDC** / **USDT**:
|
||
|
||
- Prefer matched-quote rails when they exist: `cWUSDC/USDC`, `cWUSDT/USDT`
|
||
- Keep each trade tiny relative to `I_T^*`
|
||
- Use inventory-aware direction first: sell cW into the pool when inventory is too low; buy cW from the pool when inventory is too high
|
||
- If the pool is already near its inventory target, alternate tiny buys/sells only within a separate gas budget
|
||
|
||
Purpose:
|
||
|
||
- Give wrappers **observable turnover**
|
||
- Tighten route discovery and quote confidence
|
||
- Keep the support lane small enough that the PMM remains a **corridor defense tool**, not the primary venue
|
||
|
||
Important: this improves **tradability and price discovery**, but it does **not** create backing or intrinsic value by itself.
|
||
|
||
## Peg bands
|
||
|
||
See [../config/peg-bands.json](../config/peg-bands.json) and [05-oracles.md](05-oracles.md). Summary:
|
||
|
||
- **USD-pegged**: Normal ±10–25 bps; stress ±50–150 bps; circuit break >2%
|
||
- **EUR-pegged**: Normal ±25–50 bps; stress ±100–250 bps; anchor via EURUSD oracle
|
||
|
||
State machine and pseudo-code: [../spec/bot-state-machine.md](../spec/bot-state-machine.md), [../spec/bot-pseudo-code.md](../spec/bot-pseudo-code.md).
|