-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/profit calculation and path cooldown (#50)
* feat: add cooldown feature to paths, calculate fees based on msgs We use a cooldown feature on paths to prevent the bot for overtrading a path whiles the arb is already gone. if it did one attempt cooldown is set to true, on next block arrival the bot sets all paths cooldowns back to false. Also, this commit changes the way fees are attached to TXs, because fees do not only scale with amount of pools, but also amount of messages used for a pooltrade, therefore the amount of msgs is used as an indexer for the amount of txfees to attach to a tx * bug: fix profit calculation based on tradesize and skipbid * chore: more comments on profit calc and try-catch on mempool tx
- Loading branch information
Showing
8 changed files
with
158 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ import { Pool } from "./pool"; | |
|
||
export interface Path { | ||
pools: Array<Pool>; | ||
cooldown: boolean; | ||
} |
Oops, something went wrong.