页面加载中
页面加载中
DEX Aggregator / 路由设计(JD 重头戏)
两层:流动性发现 → 路由优化。
amountIn,最大化 amountOut(或最小化 amountIn)▾代码块Plain Text自动换行1234while remaining > 0: pick pool with best marginal rate at current size allocate min(remaining, sweet_spot_chunk) update pool state locally
更严谨可用凸优化 / 线性规划近似。