-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EASY] Move out fee calculation from "into_solution" (#2662)
# Description Baseline solver. Moves out fee calculation from the `into_solution` function. This is done as a preparation for a follow up PR, where I will not calculate the sell token price, but instead build `native_price_request` to buy weth in an exact amount needed to cover the gas costs (instead of using 1ETH as a default buy value). The output sell amount of `native_price_request` will directly give us the amount of sell token needed to cover the gas costs - fee. Related to #2624, where the `native_price_request` uses 1ETH as buy amount and fails. I don't see any good reason to use 1ETH here as buy amount, as it is not needed. It is perfectly fine to use, for example, 0.01ETH amount that actually covers the gas cost and it's more accurate.
- Loading branch information
Showing
6 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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