|
|
@@ -119,8 +119,8 @@ func (h *HistoryArbitrage) run() {
|
|
|
|
|
|
// 初次获取lp
|
|
|
h.lpList = h.GetLpList()
|
|
|
- for _, lp := range h.lpList {
|
|
|
- lp.Fee = 30
|
|
|
+ for index, _ := range h.lpList {
|
|
|
+ h.lpList[index].Fee = 3000
|
|
|
}
|
|
|
HistoryInfo("lp list updated.", "length", len(h.lpList))
|
|
|
|
|
|
@@ -162,20 +162,21 @@ func (h *HistoryArbitrage) OnTick() {
|
|
|
h.pathList = GetFinalPathList(h.pathList)
|
|
|
// 根据利润排序
|
|
|
InsertionSort(h.pathList)
|
|
|
+ HistoryInfo(fmt.Sprintf("len=%v", len(h.pathList)))
|
|
|
//for _, path := range h.pathList {
|
|
|
// if path.FeeTokenProfit.GreaterThan(MinProfit) {
|
|
|
- // HistoryInfo(fmt.Sprintf("level=%+v, Sim=%+v, lpList=%+v", path.Level, path.Sim.ToJsonString(), path.LpHashList))
|
|
|
- // for fmIndex, fm := range path.FmList {
|
|
|
- // HistoryInfo(fmt.Sprintf("fm%v=%+v", fmIndex, fm))
|
|
|
- // }
|
|
|
- // HistoryInfo("")
|
|
|
+ // //HistoryInfo(fmt.Sprintf("level=%+v, Sim=%+v, lpList=%+v", path.Level, path.Sim.ToJsonString(), path.LpHashList))
|
|
|
+ // //for fmIndex, fm := range path.FmList {
|
|
|
+ // // HistoryInfo(fmt.Sprintf("fm%v=%+v", fmIndex, fm))
|
|
|
+ // //}
|
|
|
+ // //HistoryInfo("")
|
|
|
// }
|
|
|
//}
|
|
|
// 发交易
|
|
|
// Gas War
|
|
|
// TODO 获取fee
|
|
|
|
|
|
- time.Sleep(100 * time.Second)
|
|
|
+ time.Sleep(3 * time.Second)
|
|
|
}
|
|
|
|
|
|
func (h *HistoryArbitrage) Stop() error {
|