-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request a fail early process for missing fees in univ2 forks #601
Comments
Why are there rows with no fee in them? This issue needs to be resolved from the cause root. PR #607 attempts to do so by removing lines with fork=univ2 and no fee.
|
The fee is not required for every exchange since its only hardcoded for uniswapv2. I.e. passing the fee for uniswap v3 makes no sense since fees are decided at the pool level not the contract level
I believe (might need to check me on this) but uniswap_v2 forks are the only ones that require the fee to be read in here because its hardcoded at the contract level and thus unreadable in a dynamic sense. So in essence, the fee here for univ2 is the single source of truth for univ2 fork fee in the bot.
As above, we could consider passing NA but I dont know the implications of passing 0 instead of None.
I think this is adequately described above.
Absolutely. Since the multichain_addresses.csv can only be populated manually, it is possible to make human error entering the data. The root cause is human error in this case and so I suggest that we have an early failure or at least very visible warning that alerts users to the fact that the data isnt populated correctly.
I think this PR has since been closed but nevertheless, yes the lines should be flagged as incorrect so that the can be updated manually (as there is no way to automate this). Yes we can/should review the file contents entirely. No other files are not relevant |
Is your feature request related to a problem? Please describe.
Univ2 forks without fee specified in multichain_addresses.csv cause trade calculation failures. Since this is a known issue, any univ2 forks without fees should be flagged early in the process.
Describe the solution you'd like
When the multichain_addresses.csv is read in, any univ2 forks without a specified fee should raise an error immediately
Additional context
In the current bot process, the absence of the fee isnt noticed until an arbitrage is found, and the calculate_trade_outputs function is called. At which point a sensible input (trade) amount is converted to a NaN throwing a large error.
^ that NaN part fills the entire terminal output :)
The text was updated successfully, but these errors were encountered: