Skip to content

Commit

Permalink
Merge pull request #8 from williamwxz/7-provide-chinese-version-of-re…
Browse files Browse the repository at this point in the history
…adme

Start Chinese version of README
  • Loading branch information
williamwxz authored Feb 2, 2025
2 parents b7189e7 + 29cf50e commit ef5cb48
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 32 deletions.
60 changes: 28 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,70 +20,66 @@ graph TD
## 🧩 Core Components
1. Data Pipeline
Sources:

RWA APIs (Ondo Finance, Centrifuge)

Berachain/EVM nodes

DEX liquidity pools
* RWA APIs (Ondo Finance, Centrifuge)
* Berachain/EVM nodes
* DEX liquidity pools

Key Files:

app/data/fetcher.py: Fetches real-time prices and yields

app/data/processors.py: Cleans and normalizes data
* `app/data/fetcher.py`: Fetches real-time prices and yields
* `app/data/processors.py`: Cleans and normalizes data

2. Strategy Engine
Location: app/strategies/
Location: `app/strategies/`

Key Strategies:

```mermaid
graph LR
A[Cross-Chain Arbitrage] -->|RWA vs DeFi| B[Execution]
C[Liquidity Mining] -->|Berachain Pools| B
Cross-Chain Arbitrage
```

* `cross_chain_arb.py`: Cross-chain arbitrage logic
* `liquidity_mining.py`: Liquidity mining strategy

Cross-Chain Arbitrage
File: `cross_chain_arb.py`

Logic:

python
Copy
```python
if (rwa_yield - defi_yield) > threshold:
execute_trade()
```

Liquidity Optimization
File: liquidity_mining.py
File: `liquidity_mining.py`

Logic:

python
Copy
```python
best_pool = max(pools, key=lambda x: x.apr * (1 - x.il_risk))
```

3. Risk Management
Location: app/risk/
Location: `app/risk/`

Key Checks:

Position sizing (max 10% per trade)

Liquidity thresholds ($500k+ TVL)

Market volatility circuit breakers
* Position sizing (max 10% per trade)
* Liquidity thresholds ($500k+ TVL)
* Market volatility circuit breakers

4. Execution Engine
Location: app/execution/
Location: `app/execution/`

Features:

Multi-DEX order routing

Slippage control

MEV protection
* Multi-DEX order routing
* Slippage control
* MEV protection

5. Monitoring
Prometheus metrics endpoint (:8000/metrics)

Health checks (:8000/health)
* Prometheus metrics endpoint (:8000/metrics)
* Health checks (:8000/health)

98 changes: 98 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# DeFi-Kaiser: 面向RWA和Berachain的量化交易机器人

一个专注于现实世界资产(RWA)和新兴链(如Berachain)的高频交易机器人,旨在自动化跨链套利和流动性优化策略。

---

## 📊 架构概览

```mermaid
graph TD
A[数据源] --> B[数据管道]
B --> C[策略引擎]
C --> D[风险管理]
D --> E[执行引擎]
E --> F[区块链网络]
F --> G[监控]
G --> A
```

🧩 核心组件
1. 数据管道
数据源:

RWA API(Ondo Finance, Centrifuge)

Berachain/EVM节点

DEX流动性池

关键文件:

app/data/fetcher.py:获取实时价格和收益率

app/data/processors.py:清洗和标准化数据

2. 策略引擎
位置:app/strategies/

关键策略:

```mermaid
graph LR
A[跨链套利] -->|RWA vs DeFi| B[执行]
C[流动性挖矿] -->|Berachain Pools| B
```

跨链套利
文件:cross_chain_arb.py

逻辑:
```python
if (rwa_yield - defi_yield) > threshold:
execute_trade()
```

流动性挖矿
文件:liquidity_mining.py

逻辑:
```python
best_pool = max(pools, key=lambda x: x.apr * (1 - x.il_risk))
```

3. 风险管理
位置:app/risk/

关键检查:
* 头寸规模(每笔交易最多10%)
* 流动性阈值(TVL > $500k)
* 市场波动性熔断机制

4. 执行引擎
位置:app/execution/

功能:

* 多DEX订单路由
* 滑点控制
* MEV保护

5. 监控
位置:app/monitoring/

* Prometheus 指标端点(:8000/metrics)
* 健康检查(:8000/health)



📈 未来路线图
第二阶段(2024年Q3):

* 机器学习价格预测
* 多链MEV保护

第三阶段(2024年Q4):

* 投资组合再平衡引擎
* 机构级RWA集成

0 comments on commit ef5cb48

Please sign in to comment.