Skip to content

Commit

Permalink
Update srouter.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Mar 8, 2024
1 parent 4158e08 commit 23519ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modes/srouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,14 @@ async function checkArb(

// filter out orders that are not price match or failed eval when --max-profit is enabled
// price check is at +2% as a headroom for current block vs tx block
if (maxProfit) bundledOrder.takeOrders = bundledOrder.takeOrders.filter(
if (!mode && maxProfit) bundledOrder.takeOrders = bundledOrder.takeOrders.filter(
v => v.ratio !== undefined ? price.mul("102").div("100").gte(v.ratio) : false
);

if (bundledOrder.takeOrders.length === 0) {
continue;
}

console.log(
`Current best route price for ${modeText} for this token pair:`,
`\x1b[33m${ethers.utils.formatEther(price)}\x1b[0m`,
Expand Down

0 comments on commit 23519ca

Please sign in to comment.