Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Improve arbitrage cost calculation #1

Closed
ghost opened this issue Dec 7, 2017 · 1 comment
Closed

Improve arbitrage cost calculation #1

ghost opened this issue Dec 7, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 7, 2017

The keeper tries to estimate the cost of sending the arbitrage transaction(s) to the network, subtracting that cost from expected profit in order to compare it with the minimum profit threshold. Unfortunately, the way it is currently implemented is very simple and basically wrong. The keeper always assumes that one arbitrage step costs 0.25 of the base currency, which may be ok if the base currency is SAI, but will be completely wrong if we set the base currency to WETH.

The calculation also completely abstracts from the current gas price in the network, or the gas price that will be used to send the arbitrage transaction. We should consider making the keeper aware of this price as well, as there are days when gas costs 1 GWei as well days when you have to use 100 GWei to get your transaction through.

Please bear in mind that ransactions may be send directly (in sequence) or via TxManager, we should figure out whether that should impact cost calculation or not.

Pls see the # TODO transaction costs are still in a fixed currency (SAI) here comment in opportunity.py.

@ghost
Copy link
Author

ghost commented Aug 30, 2018

I have removed the net profit calculation feature, so this issue is now redundant.

@ghost ghost closed this as completed Aug 30, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants