-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement automatic on-chain arbitrage (#833)
* WIP * Do dependency injection of `max_iterations` * Complete benchmarks * Remove `println!` * Clean up benchmarks * Finish benchmarks * Reduce size of minimum weight * `cargo fmt` * Fix clippy issues * Change `Hasher` of arbitrage cache * More clippy fixes * Remove outdated TODO * Change hasher of cache * Remove `MIN_ARBITRAGE_WEIGHT` * Correctly mimic buy/sell complete set ops * Fix formatting * Add `market_account` to `market-commons` * Fix benchmark * Fix benchmarks some more * Add missing changelog * Remove `market_account` from `prediction-markets` * Update changelog * Add a better solution for enforcing pool limit * Revert hasher to `Twox64Concat` * Update zrml/swaps/src/benchmarks.rs Co-authored-by: Chralt <chralt.developer@gmail.com> * Fix benchmarks * Add comment explaining a test * Use variable for the base asset * Replace `is_err` with explicit `assert_eq` * Replace `is_err` with explicit `assert_eq` * Remove TODO * Remove `iteration_count` parameter from benchmarks * `cargo fmt` * Fix `WeightInfo` invocation * Fix clippy issues * Update zrml/swaps/src/arbitrage.rs Co-authored-by: Chralt <chralt.developer@gmail.com> * correct review suggestion comment * Default to min on low volume domains * Fix doc string formatting * Fix clippy errors * Apply suggestions from code review Co-authored-by: Harald Heckmann <mail@haraldheckmann.de> * Add module docstrings * Add missing docstrings * Update `zrml_market_commons` mock * Fix formatting * Ensure that min balance is observed by arbitrage Co-authored-by: Chralt <chralt.developer@gmail.com> Co-authored-by: Chralt98 <chralt98@gmail.com> Co-authored-by: Harald Heckmann <mail@haraldheckmann.de>
- Loading branch information
1 parent
4d4f2c1
commit 6fcdae8
Showing
21 changed files
with
1,780 additions
and
160 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
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
Oops, something went wrong.