Skip to content

Commit b695843

Browse files
committed
feat: add cNGN/USDT BSC testnet corridor template
- Add new corridor entry for cNGN/USDT on BNB Smart Chain testnet (chain 97) to setup catalog - Add cngn-usdt-bsc-testnet.toml template with testnet-specific configuration: public BSC testnet RPC, staging indexer URL, and faucet links for test tokens - Configure real cNGN (6 decimals) and faucet USDT (18 decimals) pool parameters with symmetric 1 bps buy/sell offsets - Mark reactor address as placeholder to be filled in after deployment - Bump version to 0.1.102
1 parent c2c6fba commit b695843

6 files changed

Lines changed: 53 additions & 4 deletions

File tree

.textile-monorepo-source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
56bf56642e56e2ba05eb5cdf5650e45d8e243336
1+
d4a56272a14d20623804c01667cb535a334bf7d5

.textile-stitch-release-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.101
1+
0.1.102

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stitch-bot"
3-
version = "0.1.101"
3+
version = "0.1.102"
44
edition = "2021"
55
description = "Stitch — Textile filler-network operator bot; market-makes the filler order book with signed UniswapX limit orders."
66
license = "AGPL-3.0-or-later"

src/setup/catalog.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ const CORRIDORS: &[Corridor] = &[
6262
chain_id: 42220,
6363
toml_template: include_str!("templates/wbrl-usdt-celo.toml"),
6464
},
65+
Corridor {
66+
id: "cngn-usdt-bsc-testnet",
67+
display_name: "cNGN / USDT",
68+
network_label: "BNB Smart Chain testnet",
69+
chain_id: 97,
70+
toml_template: include_str!("templates/cngn-usdt-bsc-testnet.toml"),
71+
},
6572
];
6673

6774
/// All corridors, in display order (first is the recommended default).
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Textile Stitch — cNGN/USDT on BSC testnet (chain 97).
2+
# The wallet key is NOT here; export STITCH_PRIVATE_KEY (or STITCH_PRIVATE_KEY_FILE).
3+
#
4+
# Testnet notes:
5+
# - Get test tokens: BNB gas + USDT from https://www.bnbchain.org/en/testnet-faucet,
6+
# cNGN from https://cngn.co/faucet.
7+
# - The reactor runs a 1 bps SellFirstFeeController (matching BSC mainnet), so
8+
# both the maker and taker legs work here.
9+
10+
chain_id = 97 # BNB Smart Chain testnet
11+
rpc_url = "https://data-seed-prebsc-1-s1.binance.org:8545" # public BSC testnet RPC; swap for your own if you have one
12+
indexer_url = "https://api.textilecredit.com" # serves chain 97; staging is https://api.s1.textilecredit.com
13+
permit2 = "0x000000000022D473030F116dDEE9F6B43aC78BA3"
14+
reactor = "0x0000000000000000000000000000000000000000" # SETTLEMENT_V3_FILLER_REACTOR (BSC testnet) — FILL IN after `deploy-filler-reactor.ts`
15+
tick_interval_secs = 5
16+
17+
# Textile's own price endpoint. Returns { price, timestamp } where price is
18+
# debt-per-collateral (USDT per cNGN, e.g. ~0.000728).
19+
[feed]
20+
url = "https://api.textilecredit.com/price?chainId=97&pair=cngn-usdt"
21+
staleness_secs = 900
22+
23+
[[pools]]
24+
collateral = "0x8a078b182bA9649c03982c2a80CDcc81cdc99dA8" # cNGN testnet (soft asset, 6dp)
25+
collateral_decimals = 6
26+
debt = "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd" # USDT testnet faucet (stable, 18dp)
27+
debt_decimals = 18
28+
29+
# Buy low: bid below the mid, paying USDT for cNGN. Funds USDT + Permit2 on USDT.
30+
buy_offset_bps = 1 # 1 bps below mid
31+
buy_total_liquidity_debt = "max" # quote all funded USDT
32+
buy_min_slice_debt = "10000000000000000000" # 10 USDT smallest slice (18dp)
33+
buy_max_orders = 40
34+
35+
# Sell high: ask above the mid, selling cNGN for USDT. Funds cNGN + Permit2 on cNGN.
36+
sell_offset_bps = 1 # 1 bps above mid
37+
sell_total_liquidity_collateral = "max" # quote all funded cNGN
38+
sell_min_slice_debt = "10000000000000000000" # 10 USDT-equivalent slice (18dp)
39+
sell_max_orders = 40
40+
41+
ttl_secs = 120
42+
refresh_threshold_bps = 10 # re-quote when price moves >0.10%

0 commit comments

Comments
 (0)