docs: README 中英文更新 - Cashback 章节与大纲、示例与表格同步

- 大纲增加 Cashback 支持(PumpFun/PumpSwap)入口
- 新增 Cashback 说明:交易侧无需改代码,事件解析可获返现字段
- 英文:Method 1 增加 with_wsol_ata_config 可选示例
- 中文:创建客户端拆为方式一/方式二,表格增加 shared_infrastructure,特性增加共享基础设施

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Wood
2026-02-19 01:01:21 +08:00
co-authored by Cursor
parent 43d1369d4e
commit 9a8e3ffb2d
2 changed files with 42 additions and 14 deletions
+12
View File
@@ -51,6 +51,7 @@
- [🔧 Middleware System](#-middleware-system)
- [🔍 Address Lookup Tables](#-address-lookup-tables)
- [🔍 Nonce Cache](#-nonce-cache)
- [💰 Cashback Support (PumpFun / PumpSwap)](#-cashback-support-pumpfun--pumpswap)
- [🛡️ MEV Protection Services](#-mev-protection-services)
- [📁 Project Structure](#-project-structure)
- [📄 License](#-license)
@@ -122,6 +123,10 @@ let swqos_configs: Vec<SwqosConfig> = vec![
// Create TradeConfig instance
let trade_config = TradeConfig::new(rpc_url, swqos_configs, commitment);
// Optional: customize WSOL ATA and seed optimization
// let trade_config = TradeConfig::new(rpc_url, swqos_configs, commitment)
// .with_wsol_ata_config(true, true); // create_wsol_ata_on_startup, use_seed_optimize
// Create TradingClient
let client = TradingClient::new(Arc::new(payer), trade_config).await;
```
@@ -273,6 +278,13 @@ Address Lookup Tables (ALT) allow you to optimize transaction size and reduce fe
Use Durable Nonce to implement transaction replay protection and optimize transaction processing. For detailed information, see the [Durable Nonce Guide](docs/NONCE_CACHE.md).
## 💰 Cashback Support (PumpFun / PumpSwap)
PumpFun and PumpSwap support **cashback** for eligible tokens: part of the trading fee can be returned to the user. When you use this SDK to execute `buy` or `sell`, the transaction is submitted as usual; if the token has cashback enabled, the protocol will credit cashback according to its rules.
- **Trading**: No change to your code—use `TradeBuyParams` / `TradeSellParams` as normal. Cashback is handled on-chain.
- **Event parsing**: If you consume chain events (e.g. via [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk)), trade events can expose cashback-related fields (e.g. `cashback_fee_basis_points`, `cashback`, `is_cashback_enabled`) so your strategy or analytics can be cashback-aware.
## 🛡️ MEV Protection Services
You can apply for a key through the official website: [Community Website](https://fnzero.dev/swqos)