From e9d34ab0340fdeb825b22559c40f499e9bbd2a26 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Sat, 16 Sep 2023 15:09:55 +0000 Subject: [PATCH] orders shuffling --- arb-bot.js | 10 +-- docs/html/curve.js.html | 4 +- docs/html/global.html | 155 ++++++++++++++++++++++---------------- docs/html/index.html | 2 +- docs/html/index.js.html | 5 +- docs/html/query.js.html | 46 ++++++----- docs/html/router.js.html | 4 +- docs/html/srouter.js.html | 4 +- docs/html/utils.js.html | 34 ++++++++- docs/html/zeroex.js.html | 4 +- src/curve.js | 2 +- src/index.js | 3 +- src/query.js | 44 ++++++----- src/router.js | 2 +- src/srouter.js | 2 +- src/utils.js | 32 +++++++- src/zeroex.js | 2 +- 17 files changed, 212 insertions(+), 143 deletions(-) diff --git a/arb-bot.js b/arb-bot.js index 6fc7428b..89f7580f 100755 --- a/arb-bot.js +++ b/arb-bot.js @@ -127,8 +127,7 @@ const arbRound = async options => { { orderHash : options.orderHash, orderOwner : options.orderOwner, - orderInterpreter: options.orderInterpreter, - shuffle : options.shuffle + orderInterpreter: options.orderInterpreter } ); await clear( @@ -148,7 +147,6 @@ const main = async argv => { const rpcs = [...options.rpc]; let roundGap = 10000; let rpcTurn = 0; - let shuffle = 0; if (options.repetitions) { if (/^\d+$/.test(options.repetitions)) repetitions = Number(options.repetitions); @@ -169,7 +167,6 @@ const main = async argv => { // eslint-disable-next-line no-constant-condition if (repetitions === -1) while (true) { options.rpc = rpcs[rpcTurn]; - options.shuffle = shuffle; try { await arbRound(options); console.log("\x1b[32m%s\x1b[0m", "Round finished successfully!"); @@ -181,13 +178,10 @@ const main = async argv => { } if (rpcTurn === rpcs.length - 1) rpcTurn = 0; else rpcTurn++; - if (shuffle === 3) shuffle = 0; - else shuffle++; await sleep(roundGap); } else for (let i = 1; i <= repetitions; i++) { options.rpc = rpcs[rpcTurn]; - options.shuffle = shuffle; try { await arbRound(options); console.log("\x1b[32m%s\x1b[0m", `Round ${i} finished successfully!`); @@ -201,8 +195,6 @@ const main = async argv => { } if (rpcTurn === rpcs.length - 1) rpcTurn = 0; else rpcTurn++; - if (shuffle === 3) shuffle = 0; - else shuffle++; await sleep(roundGap); } }; diff --git a/docs/html/curve.js.html b/docs/html/curve.js.html index 218f30e2..d2a276cc 100644 --- a/docs/html/curve.js.html +++ b/docs/html/curve.js.html @@ -290,7 +290,7 @@

Source: curve.js

console.log( "------------------------- Bundling Orders -------------------------", "\n" ); - bundledOrders = await bundleTakeOrders(ordersDetails, orderbook, arb); + bundledOrders = await bundleTakeOrders(ordersDetails, orderbook, arb, undefined, config.rpc !== "test"); const availableSwaps = getAvailableSwaps(config); bundledOrders = prepare( bundledOrders, @@ -673,7 +673,7 @@

Home

Global