You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 different errors which are occasionally emitted in the optimizer:
The 1st error:
RuntimeWarning: overflow encountered in exp
p = np.exp(plog10 * np.log(10))
The 2nd error:
RuntimeWarning: invalid value encountered in scalar divide
p = pvec[self.tknx] / pvec[self.tkny]
Neither one of these errors ends up with an uncaught exception, i.e., both are handled gracefully in some way.
The result is a potentially-undesired behavior of the system.
Severity
High
Steps to Reproduce
Both errors are consistently reproducible in test_901_TestMultiTriangleModeSlow.py:
The 1st error occurs in function test_test_combos
The 2nd error occurs in function test_test_find_arbitrage_single
PR #546 attempts to handle the 1st error, so it may serve as a starting-point.
The 2nd error appears to be just a matter of the price of one of the two tokens (and sometimes the prices of both of them) being zero, which is pretty much invalid to begin with.
So a special handling of this specific scenario should possibly be applied here, perhaps at a much earlier point, before even entering optimizer's code.
Alternatively, the initial state could actually be a valid one, but with some inaccurate or incorrect calculation along the way ultimately leading to an invalid (zero) price.
The text was updated successfully, but these errors were encountered:
Bug Description
There are 2 different errors which are occasionally emitted in the optimizer:
The 1st error:
The 2nd error:
Neither one of these errors ends up with an uncaught exception, i.e., both are handled gracefully in some way.
The result is a potentially-undesired behavior of the system.
Severity
High
Steps to Reproduce
Both errors are consistently reproducible in
test_901_TestMultiTriangleModeSlow.py
:test_test_combos
test_test_find_arbitrage_single
PR #546 attempts to handle the 1st error, so it may serve as a starting-point.
The 2nd error appears to be just a matter of the price of one of the two tokens (and sometimes the prices of both of them) being zero, which is pretty much invalid to begin with.
So a special handling of this specific scenario should possibly be applied here, perhaps at a much earlier point, before even entering optimizer's code.
Alternatively, the initial state could actually be a valid one, but with some inaccurate or incorrect calculation along the way ultimately leading to an invalid (zero) price.
The text was updated successfully, but these errors were encountered: