diff --git a/fastlane_bot/testing.py b/fastlane_bot/testing.py
index cf47d1c2f..1267ed662 100644
--- a/fastlane_bot/testing.py
+++ b/fastlane_bot/testing.py
@@ -67,7 +67,7 @@ class VersionRequirementNotMetError(RuntimeError): pass
def _split_version_str(vstr):
"""splits version mumber string into tuple (int, int, int, ...)"""
- m = _re.match("^([0-9\.]*)", vstr.strip())
+ m = _re.match(r"^([0-9\.]*)", vstr.strip())
if m is None:
raise ValueError("Invalid version number string", vstr)
vlst = tuple(int(x) for x in m.group(0).split("."))
diff --git a/fastlane_bot/tests/nbtest/test_003_Serialization.py b/fastlane_bot/tests/nbtest/test_003_Serialization.py
index 12076f10f..7a894fbf4 100644
--- a/fastlane_bot/tests/nbtest/test_003_Serialization.py
+++ b/fastlane_bot/tests/nbtest/test_003_Serialization.py
@@ -31,23 +31,30 @@
def notest_optimizer_pickling():
# ------------------------------------------------------------
- N=5
- curves = [
- CPC.from_xy(x=1, y=2000, pair="ETH/USDC"),
- CPC.from_xy(x=1, y=2200, pair="ETH/USDC"),
- CPC.from_xy(x=1, y=2400, pair="ETH/USDC"),
- ]
- # note: the below is a bit icky as the same curve objects are added multiple times
- CC = CPCContainer(curves*N)
- O = CPCArbOptimizer(CC)
- O.CC.asdf()
+ pass
- O.pickle("delme")
- O.pickle("delme", addts=False)
+ # +
+ # N=5
+ # curves = [
+ # CPC.from_xy(x=1, y=2000, pair="ETH/USDC"),
+ # CPC.from_xy(x=1, y=2200, pair="ETH/USDC"),
+ # CPC.from_xy(x=1, y=2400, pair="ETH/USDC"),
+ # ]
+
+ # CC = CPCContainer(curves*N)
+ # O = CPCArbOptimizer(CC)
+ # O.CC.asdf()
- # !ls *.pickle
+ # +
+ # O.pickle("delme")
+ # O.pickle("delme", addts=False)
- O.unpickle("delme")
+ # +
+
+
+ # +
+ # O.unpickle("delme")
+ # -
# ------------------------------------------------------------
@@ -92,6 +99,7 @@ def test_creating_curves():
'x': 100,
'x_act': 100,
'y_act': 100,
+ 'alpha': 0.5,
'pair': 'TKNB/TKNQ',
'cid': "1",
'fee': 0,
@@ -278,7 +286,7 @@ def test_serializing_curves():
df = CC.asdf()
assert len(df) == 3
- assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act',
+ assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act', 'alpha',
'pair', 'fee', 'descr', 'constr', 'params')
assert tuple(df["k"]) == (2000, 8040, 1970)
assert CPCContainer.from_df(df) == CC
@@ -395,4 +403,6 @@ def notest_saving_curves():
+
+
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_037_Exchanges.py b/fastlane_bot/tests/nbtest/test_037_Exchanges.py
index 29fcdf253..944353a3a 100644
--- a/fastlane_bot/tests/nbtest/test_037_Exchanges.py
+++ b/fastlane_bot/tests/nbtest/test_037_Exchanges.py
@@ -39,6 +39,7 @@
mocked_contract.functions.token0.return_value.call.return_value = 'token0'
mocked_contract.functions.token1.return_value.call.return_value = 'token1'
mocked_contract.functions.fee.return_value.call.return_value = 3000
+mocked_contract.functions.tradingFeePPM.return_value.call.return_value = 2000
# ------------------------------------------------------------
@@ -107,7 +108,7 @@ def test_test_carbon_v1_exchange_update():
carbon_v1_exchange = CarbonV1()
assert (carbon_v1_exchange.get_abi() == CARBON_CONTROLLER_ABI)
- assert (carbon_v1_exchange.get_fee('', mocked_contract) == ('0.002', 0.002))
+ assert (carbon_v1_exchange.get_fee('', mocked_contract) == ('2000', 0.002))
assert (carbon_v1_exchange.get_tkn0('', mocked_contract, setup_data['carbon_v1_event_update']) == setup_data['carbon_v1_event_update']['args']['token0'])
@@ -121,7 +122,7 @@ def test_test_carbon_v1_exchange_create():
carbon_v1_exchange = CarbonV1()
assert (carbon_v1_exchange.get_abi() == CARBON_CONTROLLER_ABI)
- assert (carbon_v1_exchange.get_fee('', mocked_contract) == ('0.002', 0.002))
+ assert (carbon_v1_exchange.get_fee('', mocked_contract) == ('2000', 0.002))
assert (carbon_v1_exchange.get_tkn0('', mocked_contract, setup_data['carbon_v1_event_create']) == setup_data['carbon_v1_event_create']['args']['token0'])
diff --git a/fastlane_bot/tests/nbtest/test_038_TestBancorV3Mode.py b/fastlane_bot/tests/nbtest/test_038_TestBancorV3Mode.py
index f1eb2a048..cc7f317d8 100644
--- a/fastlane_bot/tests/nbtest/test_038_TestBancorV3Mode.py
+++ b/fastlane_bot/tests/nbtest/test_038_TestBancorV3Mode.py
@@ -196,17 +196,7 @@ def init_bot(mgr: Manager) -> CarbonBot:
assert pool.cid in pool_cids, f"[test_bancor_v3] Validation missing pool.cid {pool.cid} in {pool_cids}"
optimal_arb = finder.get_optimal_arb_trade_amts(pool_cids, 'BNT-FF1C')
assert type(optimal_arb) == float, f"[test_bancor_v3] Optimal arb calculation type is {type(optimal_arb)} not float"
-assert iseq(optimal_arb, 5003.2368760578265), f"[test_bancor_v3] Optimal arb calculation type is {optimal_arb}, expected 5003.2368760578265"
-
-
-
-
-
-
-
-
-
-
+assert iseq(optimal_arb, 4051.1611717583105), f"[test_bancor_v3] Optimal arb calculation type is {optimal_arb}, expected 4051.1611717583105"
# ------------------------------------------------------------
# Test 038
@@ -282,7 +272,7 @@ def test_test_get_fee_safe():
)
ext_fee = finder.get_fee_safe(first_check_pools[1].fee)
assert type(ext_fee) == float, f"[test_bancor_v3] Testing external pool, fee type is {type(ext_fee)} not float"
- assert iseq(ext_fee, 0.003), f"[test_bancor_v3] Testing external pool, fee amt is {ext_fee} not 0.003"
+ assert iseq(ext_fee, 0.0005), f"[test_bancor_v3] Testing external pool, fee amt is {ext_fee} not 0.0005"
# ------------------------------------------------------------
diff --git a/fastlane_bot/tests/nbtest/test_048_RespectFlashloanTokensClickParam.py b/fastlane_bot/tests/nbtest/test_048_RespectFlashloanTokensClickParam.py
new file mode 100644
index 000000000..8d553c5c2
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_048_RespectFlashloanTokensClickParam.py
@@ -0,0 +1,100 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_048_RespectFlashloanTokensClickParam.py`
+# ------------------------------------------------------------
+# source file = NBTest_048_RespectFlashloanTokensClickParam.py
+# test id = 048
+# test comment = RespectFlashloanTokensClickParam
+# ------------------------------------------------------------
+
+
+
+"""
+This module contains the tests which ensure that the flashloan tokens click parameters are respected.
+"""
+from fastlane_bot import Bot
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+import subprocess, os, sys
+import pytest
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+
+
+def find_main_py():
+ # Start at the directory of the current script
+ cwd = os.path.abspath(os.path.join(os.getcwd()))
+
+ print(f"Searching for main.py in {cwd}")
+ while True:
+ # Check if main.py exists in the current directory
+ if "main.py" in os.listdir(cwd):
+ return cwd # Found the directory containing main.py
+ else:
+ # If not, go up one directory
+ new_cwd = os.path.dirname(cwd)
+
+ # If we're already at the root directory, stop searching
+ if new_cwd == cwd:
+ raise FileNotFoundError("Could not find main.py in any parent directory")
+
+ cwd = new_cwd
+
+
+def run_command(arb_mode, expected_log_line):
+
+ # Find the correct path to main.py
+ main_script_path = find_main_py()
+ print(f"Found main.py in {main_script_path}")
+ main_script_path = main_script_path + "/main.py"
+
+ # Run the command
+ cmd = [
+ "python",
+ main_script_path,
+ f"--arb_mode={arb_mode}",
+ "--default_min_profit_bnt=60",
+ "--limit_bancor3_flashloan_tokens=False",
+ "--use_cached_events=True",
+ "--logging_path=fastlane_bot/data/",
+ "--timeout=1",
+ "--loglevel=DEBUG",
+ "--flashloan_tokens=BNT-FF1C,ETH-EEeE,ETH2X-FLI-USD",
+ ]
+ subprocess.Popen(cmd)
+
+ # Wait for the expected log line to appear
+ found = False
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=7)
+
+ # Check if the expected log line is in the output
+ if expected_log_line in result.stderr or expected_log_line in result.stdout:
+ found = True
+
+ if not found:
+ pytest.fail("Expected log line was not found within 1 minute") # If we reach this point, the test has failed
+
+
+
+
+# ------------------------------------------------------------
+# Test 048
+# File test_048_RespectFlashloanTokensClickParam.py
+# Segment Test flashloan_tokens is Respected
+# ------------------------------------------------------------
+def test_test_flashloan_tokens_is_respected():
+# ------------------------------------------------------------
+
+ expected_log_line = "Flashloan tokens are set as: ['BNT-FF1C', 'ETH-EEeE', 'ETH2X_FLI-USD']"
+ arb_mode = "multi"
+ run_command(arb_mode=arb_mode, expected_log_line=expected_log_line)
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_049_CPCBalancer.py b/fastlane_bot/tests/nbtest/test_049_CPCBalancer.py
new file mode 100644
index 000000000..2e5d4b1b4
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_049_CPCBalancer.py
@@ -0,0 +1,556 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_049_CPCBalancer.py`
+# ------------------------------------------------------------
+# source file = NBTest_049_CPCBalancer.py
+# test id = 049
+# test comment = CPCBalancer
+# ------------------------------------------------------------
+
+
+
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+#from flbtools.cpc import ConstantProductCurve as CPC
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+
+from fastlane_bot.testing import *
+#from flbtesting import *
+from math import sqrt
+
+
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment Constant product constructor
+# ------------------------------------------------------------
+def test_constant_product_constructor():
+# ------------------------------------------------------------
+
+ c0 = CPC.from_xy(100, 200)
+ assert c0.x == 100
+ assert c0.y == 200
+ assert c0.k == 20000
+ assert c0.x == c0.x_act
+ assert c0.y == c0.y_act
+ assert c0.alpha == 0.5
+ assert c0.eta == 1
+ assert c0.constr == "xy"
+ assert c0.is_constant_product() == True
+ c0
+
+ assert c0.asdict() == {
+ 'k': 20000,
+ 'x': 100,
+ 'x_act': 100,
+ 'y_act': 200.0,
+ 'alpha': 0.5,
+ 'pair': 'TKNB/TKNQ',
+ 'cid': 'None',
+ 'fee': None,
+ 'descr': None,
+ 'constr': 'xy',
+ 'params': {}
+ }
+
+ c1 = CPC.from_xyal(100, 200)
+ assert c1.constr == "xyal"
+ assert c1.is_constant_product() == True
+ assert c1==c0
+ c1
+
+ assert c1.asdict() == {
+ 'k': 20000,
+ 'x': 100,
+ 'x_act': 100,
+ 'y_act': 200.0,
+ 'alpha': 0.5,
+ 'pair': 'TKNB/TKNQ',
+ 'cid': 'None',
+ 'fee': None,
+ 'descr': None,
+ 'constr': 'xyal',
+ 'params': {}
+ }
+
+ c2 = CPC.from_xyal(100, 200, alpha=0.5)
+ assert c2.constr == "xyal"
+ assert c2.is_constant_product() == True
+ assert c2==c0
+ assert c2.asdict() == c1.asdict()
+ c2
+
+ c3 = CPC.from_xyal(100, 200, eta=1)
+ assert c3.constr == "xyal"
+ assert c3.is_constant_product() == True
+ assert c3==c0
+ assert c3.asdict() == c1.asdict()
+ c3
+
+ assert raises(CPC.from_xyal, 100, 200,
+ alpha=0.5, eta=1) == 'at most one of alpha and eta must be given [0.5, 1]'
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment Weighted constructor
+# ------------------------------------------------------------
+def test_weighted_constructor():
+# ------------------------------------------------------------
+
+ c0 = CPC.from_xy(100, 200)
+ assert c0.x == 100
+ assert c0.y == 200
+ assert c0.k == 20000
+ assert c0.x == c0.x_act
+ assert c0.y == c0.y_act
+ assert c0.alpha == 0.5
+ assert c0.eta == 1
+ assert c0.constr == "xy"
+ assert c0.is_constant_product() == True
+ c0
+
+ c1 = CPC.from_xyal(100, 200)
+ assert c1.constr == "xyal"
+ assert c1.is_constant_product() == True
+ assert c1 == c0
+ assert c1.asdict()["alpha"] == 0.5
+ c1
+
+ c2 = CPC.from_xyal(100, 200, alpha=0.25)
+ assert c2.constr == "xyal"
+ assert c2.is_constant_product() == False
+ assert c2.alpha == 0.25
+ assert c2.asdict()["alpha"] == 0.25
+ assert iseq(c2.eta, 0.25/0.75)
+ assert c2 != c0
+ assert c2 != c1
+ c2
+
+ c3 = CPC.from_xyal(100, 200, alpha=0.8)
+ assert c3.constr == "xyal"
+ assert c3.is_constant_product() == False
+ assert iseq(c3.alpha, 0.8)
+ assert c3.asdict()["alpha"] == 0.8
+ assert iseq(c3.eta, 0.8/0.2)
+ assert c3 != c0
+ assert c3 != c1
+ assert c3 != c2
+ c2
+
+ c3b = CPC.fromdict(c3.asdict())
+ assert c3b == c3
+ c3b
+
+ assert raises(CPC.from_xyal,100, 200, alpha=0) == 'alpha must be > 0 [0]'
+ assert raises(CPC.from_xyal,100, 200, alpha=-1) == 'alpha must be > 0 [-1]'
+ assert raises(CPC.from_xyal,100, 200, alpha=1) == 'alpha must be < 1 [1]'
+ assert raises(CPC.from_xyal,100, 200, alpha=2) == 'alpha must be < 1 [2]'
+
+ raises(CPC.from_xyal,100, 200, alpha=0)
+
+ assert not raises(CPC.from_xyal,100, 200, alpha=1-1e-10)
+ assert not raises(CPC.from_xyal,100, 200, alpha=0.01)
+
+ raises(CPC.from_xyal,100, 200, alpha=0.001)
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment High level testing of all functions
+# ------------------------------------------------------------
+def test_high_level_testing_of_all_functions():
+# ------------------------------------------------------------
+ #
+ # (including not YET implemented)
+
+ c0 = CPC.from_xyal(100, 200)
+ assert c0.is_constant_product() == True
+ c0
+
+ c1 = CPC.from_xyal(100, 200, alpha=0.25)
+ assert c1.is_constant_product() == False
+ c1
+
+ # #### Not (yet) implemented functions
+ #
+ # Those function groups are not currently planned to be implemented at all
+ #
+ # - `execute` as there is no need to simulate those curves for the time being; that was a Carbon thing
+ #
+ # The functions we may implement at a later stage are
+ #
+ # - `description` should probably be updated, but it is tedious; `format` ditto
+ # - `x_max`, `x_min`, `p_max`, `p_min` and the other leverage functions once we consider it important and safe
+
+ # execute
+
+ assert not raises(c0.execute)
+ assert raises(c1.execute).startswith("only implemented for")
+
+ # description and format
+
+ assert not raises(c0.description)
+ assert raises(c1.description).startswith("only implemented for")
+
+ assert not raises(c0.format)
+ assert raises(c1.format).startswith("only implemented for")
+
+ # leverage related functions (primary)
+
+ assert not raises(lambda: c0.p_max)
+ assert raises(lambda: c1.p_max).startswith("only implemented for")
+
+ assert not raises(lambda: c0.p_min)
+ assert raises(lambda: c1.p_min).startswith("only implemented for")
+
+ assert not raises(lambda: c0.x_min)
+ assert raises(lambda: c1.x_min).startswith("only implemented for")
+
+ assert not raises(lambda: c0.x_max)
+ assert raises(lambda: c1.x_max).startswith("only implemented for")
+
+ assert not raises(lambda: c0.y_min)
+ assert raises(lambda: c1.y_min).startswith("only implemented for")
+
+ assert not raises(lambda: c0.y_max)
+ assert raises(lambda: c1.y_max).startswith("only implemented for")
+
+ # leverage related functions (secondary, ie calling primary ones)
+
+ assert not raises(c0.p_max_primary)
+ assert raises(c1.p_max_primary).startswith("only implemented for")
+
+ assert not raises(c0.p_min_primary)
+ assert raises(c1.p_min_primary).startswith("only implemented for")
+
+ assert not raises(lambda: c0.at_xmin)
+ assert raises(lambda: c1.at_xmin).startswith("only implemented for")
+
+ assert not raises(lambda: c0.at_xmax)
+ assert raises(lambda: c1.at_xmax).startswith("only implemented for")
+
+ assert not raises(lambda: c0.at_ymin)
+ assert raises(lambda: c1.at_ymin).startswith("only implemented for")
+
+ assert not raises(lambda: c0.at_ymax)
+ assert raises(lambda: c1.at_ymax).startswith("only implemented for")
+
+ assert not raises(lambda: c0.at_boundary)
+ assert raises(lambda: c1.at_boundary).startswith("only implemented for")
+
+ # todo
+
+ assert not raises(c0.xyfromp_f)
+ assert raises(c1.xyfromp_f).startswith("only implemented for")
+
+ assert not raises(c0.dxdyfromp_f)
+ assert raises(c1.dxdyfromp_f).startswith("only implemented for")
+
+ # #### Implemented functions
+
+ assert not raises(lambda: c0.y)
+ assert not raises(lambda: c1.y)
+
+ assert not raises(lambda: c0.p)
+ assert not raises(lambda: c1.p)
+
+ assert not raises(lambda: c0.kbar)
+ assert not raises(lambda: c1.kbar)
+
+ assert not raises(c0.tvl)
+ assert not raises(c1.tvl)
+
+ assert not raises(c0.yfromx_f, 110)
+ assert not raises(c1.yfromx_f, 110, ignorebounds=True)
+ assert raises(c1.yfromx_f, 110, ignorebounds=False)
+
+ assert not raises(c0.xfromy_f, 210)
+ assert not raises(c1.xfromy_f, 110, ignorebounds=True)
+ assert raises(c1.xfromy_f, 110, ignorebounds=False)
+
+ assert not raises(c0.dyfromdx_f, 1)
+ assert not raises(c1.dyfromdx_f, 1, ignorebounds=True)
+ assert raises(c1.dyfromdx_f, 1, ignorebounds=False)
+
+ assert not raises(c0.dxfromdy_f, 1)
+ assert not raises(c1.dxfromdy_f, 1, ignorebounds=True)
+ assert raises(c1.dxfromdy_f, 1, ignorebounds=False)
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment Simple Tests
+# ------------------------------------------------------------
+def test_simple_tests():
+# ------------------------------------------------------------
+
+ c0 = CPC.from_xyal(100, 200)
+ c1 = CPC.from_xyal(100, 200, eta=2)
+ c2 = CPC.from_xyal(100, 200, eta=0.5)
+
+ assert iseq(c0.alpha, 1/2)
+ assert iseq(c1.alpha, 2/3)
+ assert iseq(c2.alpha, 1/3)
+
+ # #### Current token balance $y$
+ #
+ # $$
+ # y = \left( \frac k x \right)^\eta
+ # $$
+
+ assert iseq(c0.y, 200)
+ assert iseq(c1.y, 200)
+ assert iseq(c2.y, 200)
+
+ # #### Current price $p$
+ #
+ # $$
+ # p = \eta\, \frac y x
+ # $$
+
+ assert iseq(c0.p, 2 * c0.eta)
+ assert iseq(c1.p, 2 * c1.eta)
+ assert iseq(c2.p, 2 * c2.eta)
+
+ # #### TVL
+ #
+ # $$
+ # \mathrm{TVL} = x_a*p + y_a
+ # $$
+
+ assert c0.x == c0.x_act
+ assert c0.y == c0.y_act
+ assert c1.x == c1.x_act
+ assert c1.y == c1.y_act
+ assert c2.x == c2.x_act
+ assert c2.y == c2.y_act
+
+ assert iseq(c0.tvl(), 100 * c0.p + 200)
+ assert iseq(c1.tvl(), 100 * c1.p + 200)
+ assert iseq(c2.tvl(), 100 * c2.p + 200)
+
+ # #### Pool constant $k$
+ #
+ # $$
+ # k^\alpha = x^\alpha\, y^{1-\alpha}
+ # $$
+ #
+ # $$
+ # k = x\,y^\frac{1-\alpha}{\alpha} = x\,y^{\frac 1 \eta}
+ # $$
+ #
+
+ assert iseq(c0.k**(1/2), c0.x**(1/2) * c0.y**(1/2))
+ assert iseq(c1.k**(2/3), c1.x**(2/3) * c1.y**(1/3))
+ assert iseq(c2.k**(1/3), c1.x**(1/3) * c1.y**(2/3))
+
+ # #### Pool constant $\bar k$
+ #
+ # $$
+ # x^\alpha\, y^{1-\alpha} = \bar k = k^\alpha
+ # $$
+
+ assert iseq(c0.kbar, c0.x**(1/2) * c0.y**(1/2))
+ assert iseq(c1.kbar, c1.x**(2/3) * c1.y**(1/3))
+ assert iseq(c2.kbar, c1.x**(1/3) * c1.y**(2/3))
+
+ assert iseq(c0.kbar, c0.k**c0.alpha)
+ assert iseq(c1.kbar, c1.k**c1.alpha)
+ assert iseq(c2.kbar, c2.k**c2.alpha)
+
+ # #### Token balance function $y(x)$
+ #
+ # $$
+ # y(x) = \left( \frac k x \right)^\eta
+ # $$
+
+ assert c0.eta == 1
+ assert iseq(c0.yfromx_f(100, ignorebounds=True), 200)
+ assert iseq(c0.yfromx_f( 50, ignorebounds=True), 400)
+ assert iseq(c0.yfromx_f(200, ignorebounds=True), 100)
+
+ assert iseq(c1.eta, 2)
+ assert iseq(c1.yfromx_f(100, ignorebounds=True), 200)
+ assert iseq(c1.yfromx_f( 50, ignorebounds=True), 200*2**2)
+ assert iseq(c1.yfromx_f(200, ignorebounds=True), 200/2**2)
+
+ assert iseq(c2.eta, 1/2)
+ assert iseq(c2.yfromx_f(100, ignorebounds=True), 200)
+ assert iseq(c2.yfromx_f( 50, ignorebounds=True), 200*sqrt(2))
+ assert iseq(c2.yfromx_f(200, ignorebounds=True), 200/sqrt(2))
+
+ # #### Token balance function $x(y)$
+ #
+ # $$
+ # x(y)
+ # = \frac{k}{ y^{\frac{1-\alpha}{\alpha}} }
+ # = \frac{k}{ y^{\frac{1}{\eta}} }
+ # $$
+
+ assert c0.eta == 1
+ assert iseq(c0.xfromy_f(200, ignorebounds=True), 100)
+ assert iseq(c0.xfromy_f(100, ignorebounds=True), 200)
+ assert iseq(c0.xfromy_f(400, ignorebounds=True), 50)
+
+ assert iseq(c1.eta, 2)
+ assert iseq(c1.xfromy_f(200, ignorebounds=True), 100)
+ assert iseq(c1.xfromy_f(100, ignorebounds=True), 100*2**0.5)
+ assert iseq(c1.xfromy_f(400, ignorebounds=True), 100/2**0.5)
+
+ assert iseq(c2.eta, 1/2)
+ assert iseq(c2.xfromy_f(200, ignorebounds=True), 100)
+ assert iseq(c2.xfromy_f(100, ignorebounds=True), 100*2**2)
+ assert iseq(c2.xfromy_f(400, ignorebounds=True), 100/2**2)
+
+ # #### Price response function $(x(p), y(p))$
+ #
+ # $$
+ # x(p)
+ # =
+ # \left(\frac \eta p\right)^{1-\alpha} k^\alpha
+ # $$
+ #
+ # $$
+ # y(p) = \left( \frac{kp}{\eta} \right)^\alpha
+ # $$
+
+ assert iseq(c0.xyfromp_f(c0.p, ignorebounds=True)[0], c0.x)
+ assert iseq(c1.xyfromp_f(c1.p, ignorebounds=True)[0], c1.x)
+ assert iseq(c2.xyfromp_f(c2.p, ignorebounds=True)[0], c2.x)
+
+ assert iseq(c0.xyfromp_f(c0.p, ignorebounds=True)[1], c0.y)
+ assert iseq(c1.xyfromp_f(c1.p, ignorebounds=True)[1], c1.y)
+ assert iseq(c2.xyfromp_f(c2.p, ignorebounds=True)[1], c2.y)
+
+ for ci in [c0, c1, c2]:
+ for p in [2, 1, 4]:
+ eta_over_p = ci.eta / p
+ x = eta_over_p ** (1-ci.alpha) * ci.kbar
+ y = 1/eta_over_p**ci.alpha * ci.kbar
+ xx, yy, pp = ci.xyfromp_f (p, ignorebounds=True)
+ dx, dy, _ = ci.dxdyfromp_f(p, ignorebounds=True)
+ assert iseq(x, xx)
+ assert iseq(y, yy)
+ assert iseq(p, pp)
+ assert iseq(dx, xx-ci.x)
+ assert iseq(dy, yy-ci.y)
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment Consistency tests
+# ------------------------------------------------------------
+def test_consistency_tests():
+# ------------------------------------------------------------
+
+ c0 = CPC.from_xyal(100, 200)
+ c1 = CPC.from_xyal(100, 200, eta=2)
+ c2 = CPC.from_xyal(100, 200, eta=0.5)
+ cc = [c0, c1, c2]
+
+ assert iseq(c0.alpha, 1/2)
+ assert iseq(c1.alpha, 2/3)
+ assert iseq(c2.alpha, 1/3)
+
+ # ### Assert inversions
+ #
+ # $$
+ # y(x(y)) = y
+ # $$
+ #
+ # and vice versa
+
+ for xy in np.logspace(1, 3, 100):
+ for ci in cc:
+ #print(f"xy={xy}, eta={ci.eta}")
+ assert iseq(ci.yfromx_f(ci.xfromy_f(xy, ignorebounds=True), ignorebounds=True), xy)
+ assert iseq(ci.xfromy_f(ci.yfromx_f(xy, ignorebounds=True), ignorebounds=True), xy)
+
+ # ### Assert that prices are correct
+ #
+ # $$
+ # p \simeq -\frac{\Delta y}{\Delta x}
+ # $$
+
+ for alpha in np.linspace(0.01, 0.99, 100):
+ ci = CPC.from_xyal(100, 200, alpha=alpha)
+ dy = ci.yfromx_f(ci.x+0.1, ignorebounds=True)-ci.yfromx_f(ci.x-0.1, ignorebounds=True)
+ assert iseq(dy/0.2, -ci.p, eps=1e-2), f"error: {dy/0.2/ci.p+1}"
+
+ # ### Check `dyfromdx_f` against `yfromx_f`
+
+ for dxy in np.linspace(0.1, 99, 100):
+ for ci in cc:
+ assert iseq(ci.dyfromdx_f(dxy, ignorebounds=True),
+ (ci.yfromx_f(ci.x+dxy, ignorebounds=True)-ci.y))
+ assert iseq(ci.dxfromdy_f(dxy, ignorebounds=True),
+ (ci.xfromy_f(ci.y+dxy, ignorebounds=True)-ci.x))
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CPCBalancer.py
+# Segment Charts [NOTEST]
+# ------------------------------------------------------------
+def notest_charts():
+# ------------------------------------------------------------
+
+ plt.style.use('seaborn-v0_8-dark')
+ plt.rcParams['figure.figsize'] = [12,6] # only picked up at second run (?!?)
+
+ c0 = CPC.from_xyal(100, 200)
+ c1 = CPC.from_xyal(100, 200, eta=2)
+ c2 = CPC.from_xyal(100, 200, eta=0.5)
+ cc = [c0, c1, c2]
+ xvals = np.linspace(50,200)
+ pvals = np.linspace(1,4)
+
+ for ci in cc:
+ plt.plot(xvals, [ci.yfromx_f(x, ignorebounds=True) for x in xvals], label=f"eta={ci.eta:0.2f}")
+ plt.grid()
+ plt.legend()
+ plt.title("Indifference curve token balance y vs token balance x at different weights")
+ plt.xlabel("Token balance x [native units]")
+ plt.ylabel("Token balance y [native units]")
+ plt.show()
+
+ for ci in cc:
+ plt.plot(
+ xvals,
+ [
+ -(ci.yfromx_f(x+0.1, ignorebounds=True) - ci.yfromx_f(x-0.1, ignorebounds=True))/0.2
+ for x in xvals
+
+ ],
+ label=f"eta={ci.eta:0.2f}")
+ plt.grid()
+ plt.legend()
+ plt.title("Price vs token balance x at different weights")
+ plt.xlabel("Token balance x [native units]")
+ plt.ylabel("Price [dy/dx]")
+ plt.show()
+
+ for ci in cc:
+ plt.plot(
+ pvals,
+ [
+ ci.xyfromp_f(p, ignorebounds=True)[1]
+ for p in pvals
+
+ ],
+ label=f"eta={ci.eta:0.2f}")
+ plt.grid()
+ plt.legend()
+ plt.title("Token balance y vs price at different weights")
+ plt.xlabel("Price [dy/dx]")
+ plt.ylabel("Token balance y [native units]")
+ plt.show()
+
+
+
+
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_049_CustomTradingFees.py b/fastlane_bot/tests/nbtest/test_049_CustomTradingFees.py
new file mode 100644
index 000000000..6c7db1998
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_049_CustomTradingFees.py
@@ -0,0 +1,150 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_049_CustomTradingFees.py`
+# ------------------------------------------------------------
+# source file = NBTest_049_CustomTradingFees.py
+# test id = 049
+# test comment = CustomTradingFees
+# ------------------------------------------------------------
+
+
+
+from unittest.mock import Mock, patch, call
+
+import brownie
+import pytest
+from unittest.mock import MagicMock
+from brownie import multicall as brownie_multicall
+
+from fastlane_bot import Bot, Config
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+from fastlane_bot.events.managers.manager import Manager
+Base = None
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+
+#plt.style.use('seaborn-dark')
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+#
+
+import json
+
+with open("fastlane_bot/data/event_test_data.json", "r") as f:
+ event_data = json.load(f)
+
+with open("fastlane_bot/data/test_pool_data.json", "r") as f:
+ pool_data = json.load(f)
+
+
+cfg = Config.new(config=Config.CONFIG_MAINNET)
+
+manager = Manager(cfg.w3, cfg, pool_data, 20, SUPPORTED_EXCHANGES=['bancor_v3', 'carbon_v1', 'uniswap_v2', 'uniswap_v3'])
+
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CustomTradingFees.py
+# Segment test_update_from_event_carbon_v1_pair_create
+# ------------------------------------------------------------
+def test_test_update_from_event_carbon_v1_pair_create():
+# ------------------------------------------------------------
+
+ # +
+ event = event_data['carbon_v1_event_pair_created']
+ assert (event['args']['token0'], event['args']['token1']) not in manager.fee_pairs
+
+ manager.update_from_event(event)
+
+ assert (event['args']['token0'], event['args']['token1']) in manager.fee_pairs
+
+ # -
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CustomTradingFees.py
+# Segment test_update_from_event_carbon_v1_trading_fee_updated
+# ------------------------------------------------------------
+def test_test_update_from_event_carbon_v1_trading_fee_updated():
+# ------------------------------------------------------------
+ #
+
+ # +
+ event = event_data['carbon_v1_trading_fee_updated']
+ prevFeePPM = event['args']['prevFeePPM']
+ newFeePPM = event['args']['newFeePPM']
+
+ mocked_contract = Mock()
+ mocked_contract.functions.tradingFeePPM.return_value.call.return_value = prevFeePPM
+ assert int(manager.exchanges['carbon_v1'].get_fee('', mocked_contract)[0]) == prevFeePPM
+
+ # find all pools with fee==prevFeePPM
+ prev_default_pools = [idx for idx, pool in enumerate(manager.pool_data) if pool['fee'] == prevFeePPM]
+
+ manager.update_from_event(event)
+
+ for idx in prev_default_pools:
+ assert manager.pool_data[idx]['fee'] == newFeePPM
+
+ mocked_contract.functions.tradingFeePPM.return_value.call.return_value = newFeePPM
+
+ assert int(manager.exchanges['carbon_v1'].get_fee('', mocked_contract)[0]) == newFeePPM
+ # -
+
+
+# ------------------------------------------------------------
+# Test 049
+# File test_049_CustomTradingFees.py
+# Segment test_update_from_event_carbon_v1_pair_trading_fee_updated
+# ------------------------------------------------------------
+def test_test_update_from_event_carbon_v1_pair_trading_fee_updated():
+# ------------------------------------------------------------
+
+ # +
+ event = event_data['carbon_v1_pair_trading_fee_updated']
+ prevFeePPM = event['args']['prevFeePPM']
+ newFeePPM = event['args']['newFeePPM']
+ token0 = event['args']['token0']
+ token1 = event['args']['token1']
+
+ # set the fee for the pair to prevFeePPM
+ idxs = [idx for idx, pool in enumerate(manager.pool_data) if pool['tkn0_address'] == token0 and pool['tkn1_address'] == token1 and pool['exchange_name'] == 'carbon_v1']
+ for idx in idxs:
+ manager.pool_data[idx]['fee'] = f"{prevFeePPM}"
+ manager.pool_data[idx]['fee_float'] = prevFeePPM / 1e6
+
+ # set all other pools with a different fee than prevFeePPM
+ others = [i for i, pool in enumerate(manager.pool_data) if i not in idxs and pool['exchange_name'] == 'carbon_v1']
+ for i in others:
+ manager.pool_data[i]['fee'] = f"{prevFeePPM-1}"
+ manager.pool_data[i]['fee_float'] = (prevFeePPM-1) / 1e6
+
+ manager.update_from_event(event)
+
+ # check that the fee for the pair is now newFeePPM
+ for idx in idxs:
+ assert manager.pool_data[idx]['fee'] == f"{newFeePPM}"
+ assert manager.pool_data[idx]['fee_float'] == newFeePPM / 1e6
+
+ # check that all other pools have not been changed
+ for i in others:
+ assert manager.pool_data[i]['fee'] == f"{prevFeePPM-1}"
+ assert manager.pool_data[i]['fee_float'] == (prevFeePPM-1) / 1e6
+
+ # -
+
+ #
+
+ #
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_900_OptimizerDetailedSlow.py b/fastlane_bot/tests/nbtest/test_900_OptimizerDetailedSlow.py
index 7a4f1d147..10072420b 100644
--- a/fastlane_bot/tests/nbtest/test_900_OptimizerDetailedSlow.py
+++ b/fastlane_bot/tests/nbtest/test_900_OptimizerDetailedSlow.py
@@ -499,7 +499,7 @@ def test_general_and_specific_tests():
assert type(r) == ConvexOptimizer.NofeesOptimizerResult
# assert round(r.result,-5) <= -1500000.0
# assert round(r.result,-5) >= -2500000.0
- assert r.time < 5
+ # assert r.time < 8
assert r.method == "convex"
assert set(r.token_table.keys()) == set(['USDT-1ec7', 'WETH-6Cc2', 'LINK-86CA', 'DAI-1d0F', 'HEX-eb39'])
assert len(r.token_table[T.USDT].x)==0
diff --git a/fastlane_bot/tests/nbtest/test_902_ValidatorSlow.py b/fastlane_bot/tests/nbtest/test_902_ValidatorSlow.py
deleted file mode 100644
index 0b5ac3fd1..000000000
--- a/fastlane_bot/tests/nbtest/test_902_ValidatorSlow.py
+++ /dev/null
@@ -1,283 +0,0 @@
-# ------------------------------------------------------------
-# Auto generated test file `test_902_ValidatorSlow.py`
-# ------------------------------------------------------------
-# source file = NBTest_902_ValidatorSlow.py
-# test id = 902
-# test comment = ValidatorSlow
-# ------------------------------------------------------------
-
-
-
-"""
-This module contains the tests for the exchanges classes
-"""
-from fastlane_bot import Bot, Config
-from fastlane_bot.bot import CarbonBot
-from fastlane_bot.tools.cpc import ConstantProductCurve
-from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
-from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
-from fastlane_bot.events.interface import QueryInterface
-from fastlane_bot.helpers.poolandtokens import PoolAndTokens
-from fastlane_bot.helpers import TradeInstruction, TxReceiptHandler, TxRouteHandler, TxSubmitHandler, TxHelpers, TxHelper
-from fastlane_bot.events.managers.manager import Manager
-from fastlane_bot.events.interface import QueryInterface
-from joblib import Parallel, delayed
-import pytest
-import math
-import json
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
-print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
-from fastlane_bot.testing import *
-from fastlane_bot.modes import triangle_single_bancor3
-#plt.style.use('seaborn-dark')
-plt.rcParams['figure.figsize'] = [12,6]
-from fastlane_bot import __VERSION__
-require("3.0", __VERSION__)
-
-
-
-C = cfg = Config.new(config=Config.CONFIG_MAINNET)
-C.DEFAULT_MIN_PROFIT_BNT = 0.02
-C.DEFAULT_MIN_PROFIT = 0.02
-cfg.DEFAULT_MIN_PROFIT_BNT = 0.02
-cfg.DEFAULT_MIN_PROFIT = 0.02
-assert (C.NETWORK == C.NETWORK_MAINNET)
-assert (C.PROVIDER == C.PROVIDER_ALCHEMY)
-setup_bot = CarbonBot(ConfigObj=C)
-pools = None
-with open('fastlane_bot/data/tests/latest_pool_data_testing.json') as f:
- pools = json.load(f)
-pools = [pool for pool in pools]
-pools[0]
-static_pools = pools
-state = pools
-exchanges = list({ex['exchange_name'] for ex in state})
-db = QueryInterface(state=state, ConfigObj=C, exchanges=exchanges)
-setup_bot.db = db
-
-static_pool_data_filename = "static_pool_data"
-
-static_pool_data = pd.read_csv(f"fastlane_bot/data/{static_pool_data_filename}.csv", low_memory=False)
-
-uniswap_v2_event_mappings = pd.read_csv("fastlane_bot/data/uniswap_v2_event_mappings.csv", low_memory=False)
-
-tokens = pd.read_csv("fastlane_bot/data/tokens.csv", low_memory=False)
-
-exchanges = "carbon_v1,bancor_v3,uniswap_v3,uniswap_v2,sushiswap_v2"
-
-exchanges = exchanges.split(",")
-
-
-alchemy_max_block_fetch = 20
-static_pool_data["cid"] = [
- cfg.w3.keccak(text=f"{row['descr']}").hex()
- for index, row in static_pool_data.iterrows()
- ]
-static_pool_data = [
- row for index, row in static_pool_data.iterrows()
- if row["exchange_name"] in exchanges
-]
-
-static_pool_data = pd.DataFrame(static_pool_data)
-static_pool_data['exchange_name'].unique()
-mgr = Manager(
- web3=cfg.w3,
- cfg=cfg,
- pool_data=static_pool_data.to_dict(orient="records"),
- SUPPORTED_EXCHANGES=exchanges,
- alchemy_max_block_fetch=alchemy_max_block_fetch,
- uniswap_v2_event_mappings=uniswap_v2_event_mappings,
- tokens=tokens.to_dict(orient="records"),
-)
-
-start_time = time.time()
-Parallel(n_jobs=-1, backend="threading")(
- delayed(mgr.add_pool_to_exchange)(row) for row in mgr.pool_data
-)
-cfg.logger.info(f"Time taken to add initial pools: {time.time() - start_time}")
-
-mgr.deduplicate_pool_data()
-cids = [pool["cid"] for pool in mgr.pool_data]
-assert len(cids) == len(set(cids)), "duplicate cid's exist in the pool data"
-def init_bot(mgr: Manager) -> CarbonBot:
- """
- Initializes the bot.
-
- Parameters
- ----------
- mgr : Manager
- The manager object.
-
- Returns
- -------
- CarbonBot
- The bot object.
- """
- mgr.cfg.logger.info("Initializing the bot...")
- bot = CarbonBot(ConfigObj=mgr.cfg)
- bot.db = db
- bot.db.mgr = mgr
- assert isinstance(
- bot.db, QueryInterface
- ), "QueryInterface not initialized correctly"
- return bot
-bot = init_bot(mgr)
-bot.db.handle_token_key_cleanup()
-bot.db.remove_unmapped_uniswap_v2_pools()
-bot.db.remove_zero_liquidity_pools()
-bot.db.remove_unsupported_exchanges()
-tokens = bot.db.get_tokens()
-ADDRDEC = {t.key: (t.address, int(t.decimals)) for t in tokens if not math.isnan(t.decimals)}
-flashloan_tokens = bot.setup_flashloan_tokens(None)
-CCm = bot.setup_CCm(None)
-pools = db.get_pool_data_with_tokens()
-
-arb_mode = "multi"
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_MIN_PROFIT
-# ------------------------------------------------------------
-def test_test_min_profit():
-# ------------------------------------------------------------
-
- assert(cfg.DEFAULT_MIN_PROFIT_BNT <= 0.02), f"[TestMultiMode], DEFAULT_MIN_PROFIT_BNT must be <= 0.02 for this Notebook to run, currently set to {cfg.DEFAULT_MIN_PROFIT_BNT}"
- assert(C.DEFAULT_MIN_PROFIT_BNT <= 0.02), f"[TestMultiMode], DEFAULT_MIN_PROFIT_BNT must be <= 0.02 for this Notebook to run, currently set to {cfg.DEFAULT_MIN_PROFIT_BNT}"
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_validator_in_out
-# ------------------------------------------------------------
-def test_test_validator_in_out():
-# ------------------------------------------------------------
-
- arb_finder = bot._get_arb_finder("multi")
- assert arb_finder.__name__ == "FindArbitrageMultiPairwise", f"[TestMultiMode] Expected arb_finder class name name = FindArbitrageMultiPairwise, found {arb_finder.__name__}"
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_validator_multi
-# ------------------------------------------------------------
-def test_test_validator_multi():
-# ------------------------------------------------------------
-
- # +
- arb_finder = bot._get_arb_finder("multi")
- finder = arb_finder(
- flashloan_tokens=flashloan_tokens,
- CCm=CCm,
- mode="bothin",
- result=bot.AO_CANDIDATES,
- ConfigObj=bot.ConfigObj,
- )
- r = finder.find_arbitrage()
-
- arb_opp = r[0]
-
- validated = bot.validate_optimizer_trades(arb_opp=arb_opp, arb_mode="multi", arb_finder=finder)
-
-
-
- assert arb_opp == validated
-
- # -
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_validator_single
-# ------------------------------------------------------------
-def test_test_validator_single():
-# ------------------------------------------------------------
-
- # +
- arb_mode="single"
- arb_finder = bot._get_arb_finder(arb_mode)
- finder = arb_finder(
- flashloan_tokens=flashloan_tokens,
- CCm=CCm,
- mode="bothin",
- result=bot.AO_CANDIDATES,
- ConfigObj=bot.ConfigObj,
- )
- r = finder.find_arbitrage()
-
- arb_opp = r[0]
-
- validated = bot.validate_optimizer_trades(arb_opp=arb_opp, arb_mode=arb_mode, arb_finder=finder)
-
-
- assert arb_opp == validated
- # -
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_validator_bancor_v3
-# ------------------------------------------------------------
-def test_test_validator_bancor_v3():
-# ------------------------------------------------------------
-
- # +
- arb_mode="bancor_v3"
-
- arb_finder = bot._get_arb_finder(arb_mode)
- finder = arb_finder(
- flashloan_tokens=flashloan_tokens,
- CCm=CCm,
- mode="bothin",
- result=bot.AO_CANDIDATES,
- ConfigObj=bot.ConfigObj,
- )
- r = finder.find_arbitrage()
-
- arb_opp = r[0]
-
- validated = bot.validate_optimizer_trades(arb_opp=arb_opp, arb_mode=arb_mode, arb_finder=finder)
-
-
-
- assert arb_opp != validated
- # -
-
-
-# ------------------------------------------------------------
-# Test 902
-# File test_902_ValidatorSlow.py
-# Segment Test_validator_multi_triangle
-# ------------------------------------------------------------
-def test_test_validator_multi_triangle():
-# ------------------------------------------------------------
-
- # +
- arb_mode="multi_triangle"
- arb_finder = bot._get_arb_finder(arb_mode)
- finder = arb_finder(
- flashloan_tokens=flashloan_tokens,
- CCm=CCm,
- mode="bothin",
- result=bot.AO_CANDIDATES,
- ConfigObj=bot.ConfigObj,
- )
- r = finder.find_arbitrage()
-
- arb_opp = r[0]
-
- validated = bot.validate_optimizer_trades(arb_opp=arb_opp, arb_mode=arb_mode, arb_finder=finder)
-
-
-
- assert arb_opp == validated
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_903_FlashloanTokens.py b/fastlane_bot/tests/nbtest/test_903_FlashloanTokens.py
new file mode 100644
index 000000000..827e60b5d
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_903_FlashloanTokens.py
@@ -0,0 +1,100 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_903_FlashloanTokens.py`
+# ------------------------------------------------------------
+# source file = NBTest_903_FlashloanTokens.py
+# test id = 903
+# test comment = FlashloanTokens
+# ------------------------------------------------------------
+
+
+
+"""
+This module contains the tests which ensure the the flashloan_tokens parameter is respected when using the b3_two_hop and bancor_v3 arb modes.
+"""
+from fastlane_bot import Bot
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+import subprocess, os, sys
+import pytest
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+
+
+def find_main_py():
+ # Start at the directory of the current script
+ cwd = os.path.abspath(os.path.join(os.getcwd()))
+
+ with open("log.txt", "w") as f:
+ f.write(f"Searching for main.py in {cwd}")
+
+ print(f"Searching for main.py in {cwd}")
+ while True:
+ # Check if main.py exists in the current directory
+ if "main.py" in os.listdir(cwd):
+ return cwd # Found the directory containing main.py
+ else:
+ # If not, go up one directory
+ new_cwd = os.path.dirname(cwd)
+
+ # If we're already at the root directory, stop searching
+ if new_cwd == cwd:
+ raise FileNotFoundError("Could not find main.py in any parent directory")
+
+ cwd = new_cwd
+
+
+def run_command(mode):
+
+ # Find the correct path to main.py
+ main_script_path = find_main_py()
+ print(f"Found main.py in {main_script_path}")
+ main_script_path = main_script_path + "/main.py"
+
+ # Run the command
+ cmd = [
+ "python",
+ main_script_path,
+ f"--arb_mode={mode}",
+ "--default_min_profit_bnt=60",
+ "--limit_bancor3_flashloan_tokens=True",
+ "--use_cached_events=True",
+ "--logging_path=fastlane_bot/data/",
+ "--timeout=45"
+ ]
+ subprocess.Popen(cmd)
+
+ # Wait for the expected log line to appear
+ expected_log_line = "limiting flashloan_tokens to ["
+ found = False
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
+
+ # Check if the expected log line is in the output
+ if expected_log_line in result.stderr:
+ found = True
+
+ if not found:
+ pytest.fail("Expected log line was not found within 1 minute") # If we reach this point, the test has failed
+
+
+
+
+# ------------------------------------------------------------
+# Test 903
+# File test_903_FlashloanTokens.py
+# Segment Test Flashloan Tokens b3_two_hop
+# ------------------------------------------------------------
+def test_test_flashloan_tokens_b3_two_hop():
+# ------------------------------------------------------------
+
+ run_command("b3_two_hop")
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_904_Bancor3DataValidation.py b/fastlane_bot/tests/nbtest/test_904_Bancor3DataValidation.py
new file mode 100644
index 000000000..4e6c2901b
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_904_Bancor3DataValidation.py
@@ -0,0 +1,98 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_904_Bancor3DataValidation.py`
+# ------------------------------------------------------------
+# source file = NBTest_904_Bancor3DataValidation.py
+# test id = 904
+# test comment = Bancor3DataValidation
+# ------------------------------------------------------------
+
+
+
+"""
+This module contains the tests which ensure that data validation checks always occur when running a bancor3-related arb_mode.
+"""
+from fastlane_bot import Bot
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+import subprocess, os, sys
+import pytest
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+
+
+def find_main_py():
+ # Start at the directory of the current script
+ cwd = os.path.abspath(os.path.join(os.getcwd()))
+
+ print(f"Searching for main.py in {cwd}")
+ while True:
+ # Check if main.py exists in the current directory
+ if "main.py" in os.listdir(cwd):
+ return cwd # Found the directory containing main.py
+ else:
+ # If not, go up one directory
+ new_cwd = os.path.dirname(cwd)
+
+ # If we're already at the root directory, stop searching
+ if new_cwd == cwd:
+ raise FileNotFoundError("Could not find main.py in any parent directory")
+
+ cwd = new_cwd
+
+
+def run_command(arb_mode, expected_log_line):
+
+ # Find the correct path to main.py
+ main_script_path = find_main_py()
+ print(f"Found main.py in {main_script_path}")
+ main_script_path = main_script_path + "/main.py"
+
+ # Run the command
+ cmd = [
+ "python",
+ main_script_path,
+ f"--arb_mode={arb_mode}",
+ "--default_min_profit_bnt=60",
+ "--limit_bancor3_flashloan_tokens=False",
+ "--use_cached_events=True",
+ "--logging_path=fastlane_bot/data/",
+ "--timeout=45"
+ ]
+ subprocess.Popen(cmd)
+
+ # Wait for the expected log line to appear
+ found = False
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
+
+ # Check if the expected log line is in the output
+ if expected_log_line in result.stderr or expected_log_line in result.stdout:
+ found = True
+
+ if not found:
+ pytest.fail("Expected log line was not found within 1 minute") # If we reach this point, the test has failed
+
+
+
+
+# ------------------------------------------------------------
+# Test 904
+# File test_904_Bancor3DataValidation.py
+# Segment Test Data Validation For b3_two_hop
+# ------------------------------------------------------------
+def test_test_data_validation_for_b3_two_hop():
+# ------------------------------------------------------------
+
+ expected_log_line = "Transactions will be required to pass data validation for"
+ arb_mode = "b3_two_hop"
+ run_command(arb_mode=arb_mode, expected_log_line=expected_log_line)
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_905_RespectMinProfitClickParam.py b/fastlane_bot/tests/nbtest/test_905_RespectMinProfitClickParam.py
new file mode 100644
index 000000000..f878b3974
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_905_RespectMinProfitClickParam.py
@@ -0,0 +1,99 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_905_RespectMinProfitClickParam.py`
+# ------------------------------------------------------------
+# source file = NBTest_905_RespectMinProfitClickParam.py
+# test id = 905
+# test comment = RespectMinProfitClickParam
+# ------------------------------------------------------------
+
+
+
+"""
+This module contains the tests which ensure that the minimum profit BNT parameter is respected.
+"""
+from fastlane_bot import Bot
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+import subprocess, os, sys
+import pytest
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+
+
+def find_main_py():
+ # Start at the directory of the current script
+ cwd = os.path.abspath(os.path.join(os.getcwd()))
+
+ print(f"Searching for main.py in {cwd}")
+ while True:
+ # Check if main.py exists in the current directory
+ if "main.py" in os.listdir(cwd):
+ return cwd # Found the directory containing main.py
+ else:
+ # If not, go up one directory
+ new_cwd = os.path.dirname(cwd)
+
+ # If we're already at the root directory, stop searching
+ if new_cwd == cwd:
+ raise FileNotFoundError("Could not find main.py in any parent directory")
+
+ cwd = new_cwd
+
+
+def run_command(arb_mode, expected_log_line):
+
+ # Find the correct path to main.py
+ main_script_path = find_main_py()
+ print(f"Found main.py in {main_script_path}")
+ main_script_path = main_script_path + "/main.py"
+
+ # Run the command
+ cmd = [
+ "python",
+ main_script_path,
+ f"--arb_mode={arb_mode}",
+ "--default_min_profit_bnt=60",
+ "--limit_bancor3_flashloan_tokens=False",
+ "--use_cached_events=True",
+ "--logging_path=fastlane_bot/data/",
+ "--timeout=45",
+ "--loglevel=DEBUG",
+ ]
+ subprocess.Popen(cmd)
+
+ # Wait for the expected log line to appear
+ found = False
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
+
+ # Check if the expected log line is in the output
+ if expected_log_line in result.stderr or expected_log_line in result.stdout:
+ found = True
+
+ if not found:
+ pytest.fail("Expected log line was not found within 1 minute") # If we reach this point, the test has failed
+
+
+
+
+# ------------------------------------------------------------
+# Test 905
+# File test_905_RespectMinProfitClickParam.py
+# Segment Test Minimum Profit BNT Is Respected
+# ------------------------------------------------------------
+def test_test_minimum_profit_bnt_is_respected():
+# ------------------------------------------------------------
+
+ expected_log_line = "Bot successfully updated min profit"
+ arb_mode = "multi"
+ run_command(arb_mode=arb_mode, expected_log_line=expected_log_line)
\ No newline at end of file
diff --git a/fastlane_bot/tests/nbtest/test_906_TargetTokens.py b/fastlane_bot/tests/nbtest/test_906_TargetTokens.py
new file mode 100644
index 000000000..e7852d1a9
--- /dev/null
+++ b/fastlane_bot/tests/nbtest/test_906_TargetTokens.py
@@ -0,0 +1,101 @@
+# ------------------------------------------------------------
+# Auto generated test file `test_906_TargetTokens.py`
+# ------------------------------------------------------------
+# source file = NBTest_906_TargetTokens.py
+# test id = 906
+# test comment = TargetTokens
+# ------------------------------------------------------------
+
+
+
+"""
+This module contains the tests which ensure the target_tokens parameter is respected.
+"""
+from fastlane_bot import Bot
+from fastlane_bot.tools.cpc import ConstantProductCurve as CPC
+from fastlane_bot.events.exchanges import UniswapV2, UniswapV3, SushiswapV2, CarbonV1, BancorV3
+import subprocess, os, sys
+import pytest
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CPC))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(Bot))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(UniswapV3))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(SushiswapV2))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(CarbonV1))
+print("{0.__name__} v{0.__VERSION__} ({0.__DATE__})".format(BancorV3))
+from fastlane_bot.testing import *
+plt.rcParams['figure.figsize'] = [12,6]
+from fastlane_bot import __VERSION__
+require("3.0", __VERSION__)
+
+
+
+from fastlane_bot.tools.cpc import T
+
+
+def find_main_py():
+ # Start at the directory of the current script
+ cwd = os.path.abspath(os.path.join(os.getcwd()))
+
+ with open("log.txt", "w") as f:
+ f.write(f"Searching for main.py in {cwd}")
+
+ print(f"Searching for main.py in {cwd}")
+ while True:
+ # Check if main.py exists in the current directory
+ if "main.py" in os.listdir(cwd):
+ return cwd # Found the directory containing main.py
+ else:
+ # If not, go up one directory
+ new_cwd = os.path.dirname(cwd)
+
+ # If we're already at the root directory, stop searching
+ if new_cwd == cwd:
+ raise FileNotFoundError("Could not find main.py in any parent directory")
+
+ cwd = new_cwd
+
+
+def run_command(mode):
+
+ # Find the correct path to main.py
+ main_script_path = find_main_py()
+ print(f"Found main.py in {main_script_path}")
+ main_script_path = main_script_path + "/main.py"
+
+ # Run the command
+ cmd = [
+ "python",
+ main_script_path,
+ f"--arb_mode={mode}",
+ "--use_cached_events=True",
+ "--logging_path=fastlane_bot/data/",
+ "--timeout=45",
+ f"--target_tokens={T.WETH},{T.DAI}"
+ ]
+ subprocess.Popen(cmd)
+
+ # Wait for the expected log line to appear
+ expected_log_line = "Limiting pools by target_tokens. Removed "
+ found = False
+ result = subprocess.run(cmd, text=True, capture_output=True, check=True, timeout=120)
+
+ # Check if the expected log line is in the output
+ if expected_log_line in result.stderr:
+ found = True
+
+ if not found:
+ pytest.fail("Expected log line was not found within 1 minute") # If we reach this point, the test has failed
+
+
+
+
+# ------------------------------------------------------------
+# Test 906
+# File test_906_TargetTokens.py
+# Segment Test Flashloan Tokens b3_two_hop
+# ------------------------------------------------------------
+def test_test_flashloan_tokens_b3_two_hop():
+# ------------------------------------------------------------
+
+ run_command("single")
\ No newline at end of file
diff --git a/fastlane_bot/tools/cpc.py b/fastlane_bot/tools/cpc.py
index 116163537..e00cd5c3e 100644
--- a/fastlane_bot/tools/cpc.py
+++ b/fastlane_bot/tools/cpc.py
@@ -7,8 +7,8 @@
NOTE: this class is not part of the API of the Carbon protocol, and you must expect breaking
changes even in minor version updates. Use at your own risk.
"""
-__VERSION__ = "2.14"
-__DATE__ = "23/May/2023"
+__VERSION__ = "3.0"
+__DATE__ = "22/Aug/2023"
from dataclasses import dataclass, field, asdict, InitVar
from .simplepair import SimplePair as Pair
@@ -351,10 +351,12 @@ class ConstantProductCurve:
"""
represents a, potentially levered, constant product curve
- :k: pool constant k = xy [x=k/y, y=k/x]
+ :k: pool invariant k (see NOTE2 below)
:x: (virtual) pool state x (virtual number of base tokens for sale)
:x_act: actual pool state x (actual number of base tokens for sale)
:y_act: actual pool state y (actual number of quote tokens for sale)
+ :alpha: weight factor alpha of token x (default = 0.5; see NOTE3 below)
+ :eta: portfolio weight factor eta (default = 1; see NOTE3 below)
:pair: token pair in slash notation ("TKNB/TKNQ"); TKNB is on the x-axis, TKNQ on the y-axis
:cid: unique id (optional)
:fee: fee (optional); eg 0.01 for 1%
@@ -362,7 +364,20 @@ class ConstantProductCurve:
:constr: which (alternative) constructor was used (optional; user should not set)
:params: additional parameters (optional)
- NOTE: use the alternative constructors `from_xx` rather then the canonical one
+ NOTE1: always use the alternative constructors `from_xx` rather then the
+ canonical one; if you insist on using the canonical one then keep in mind
+ that the order of the parameters may change in future versions, so you
+ MUST use keyword arguments
+
+ NOTE2: This class implements two distinct types of constant product curves:
+ (1) the standard constant product curve xy=k
+ (2) the weighted constant product curve x^al y^1-al = k^al
+ Note that the case alpha=0.5 is equivalent to the standard constant product curve
+ xy=k, including the value of k
+
+ NOTE3: There are two different ways of specifying the weights of the tokens
+ (1) alpha: the weight of the x token (equal weight = 0.5), such that x^al y^1-al = k^al
+ (2) eta = alpha / (1-alpha): the relative weight (equal weight = 1; x overweight > 1)
"""
__VERSION__ = __VERSION__
@@ -372,6 +387,7 @@ class ConstantProductCurve:
x: float
x_act: float = None
y_act: float = None
+ alpha: float = None
pair: str = None
cid: str = None
fee: float = None
@@ -380,6 +396,16 @@ class ConstantProductCurve:
params: AttrDict = field(default=None, repr=True, compare=False, hash=False)
def __post_init__(self):
+
+ if self.alpha is None:
+ super().__setattr__("_is_constant_product", True)
+ super().__setattr__("alpha", 0.5)
+ else:
+ super().__setattr__("_is_constant_product", self.alpha == 0.5)
+ #print(f"[ConstantProductCurve] _is_constant_product = {self._is_constant_product}")
+ assert self.alpha > 0, f"alpha must be > 0 [{self.alpha}]"
+ assert self.alpha < 1, f"alpha must be < 1 [{self.alpha}]"
+
if self.constr is None:
super().__setattr__("constr", "default")
@@ -440,6 +466,15 @@ def cid0(self):
"short cid [last 8 characters]"
return self.cid[-8:]
+ @property
+ def eta(self):
+ "portfolio weight factor eta = alpha / (1-alpha)"
+ return self.alpha / (1 - self.alpha)
+
+ def is_constant_product(self):
+ "True iff alpha == 0.5"
+ return self._is_constant_product
+
TOKENSCALE = ts.TokenScale1Data
# default token scale object is the trivial scale (everything one)
# change this to a different scale object be creating a derived class
@@ -469,9 +504,11 @@ def asdict(self):
return asdict(self)
@classmethod
- def from_dict(cls, d):
+ def fromdict(cls, d):
"returns a curve from a dict representation"
return cls(**d)
+
+ from_dict = fromdict # DEPRECATED (use fromdict)
def setcid(self, cid):
"""sets the curve id [can only be done once]"""
@@ -562,6 +599,50 @@ def from_xy(
params=params,
)
+ @classmethod
+ def from_xyal(
+ cls,
+ x,
+ y,
+ *,
+ alpha=None,
+ eta=None,
+ x_act=None,
+ y_act=None,
+ pair=None,
+ cid=None,
+ fee=None,
+ descr=None,
+ params=None,
+ ):
+ "constructor: from x,y,alpha/eta (and x_act, y_act)"
+ if not alpha is None and not eta is None:
+ raise ValueError(f"at most one of alpha and eta must be given [{alpha}, {eta}]")
+ if not eta is None:
+ alpha = eta / (eta + 1)
+ if alpha is None:
+ alpha = 0.5
+ assert alpha > 0, f"alpha must be > 0 [{alpha}]"
+ eta_inv = (1-alpha) / alpha
+ k = x * (y**eta_inv)
+ #print(f"[from_xyal] eta_inv = {eta_inv}")
+ #print(f"[from_xyal] x={x}, y={y}, k = {k}")
+ return cls(
+ #k=(x**alpha * y**(1-alpha))**(1/alpha),
+ k=k,
+ x=x,
+ alpha=alpha,
+ x_act=x_act,
+ y_act=y_act,
+ pair=pair,
+ cid=cid,
+ fee=fee,
+ descr=descr,
+ constr="xyal",
+ params=params,
+ )
+
+
@classmethod
def from_pk(
cls,
@@ -915,6 +996,8 @@ def execute(self, dx=None, dy=None, *, ignorebounds=False, verbose=False):
*at least one of dx, dy must be None
"""
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if not dx is None and not dy is None:
raise ValueError(f"either dx or dy must be None dx={dx} dy={dy}")
@@ -995,6 +1078,8 @@ def pairp(self):
def description(self):
"description of the pool"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
s = ""
s += f"cid = {self.cid0} [{self.cid}]\n"
s += f"primary = {Pair.n(self.pairo.primary)} [{self.pairo.primary}]\n"
@@ -1010,15 +1095,21 @@ def description(self):
@property
def y(self):
"(virtual) pool state x (virtual number of base tokens for sale)"
+
if self.k == 0:
return 0
- return self.k / self.x
-
+ if self.is_constant_product():
+ return self.k / self.x
+ return (self.k / self.x)**(self.eta)
+
@property
def p(self):
"pool price (in dy/dx)"
- return self.y / self.x
-
+ if self.is_constant_product():
+ return self.y / self.x
+
+ return self.eta * self.y / self.x
+
def buysell(self, *, verbose=False, withprice=False):
"""
returns b (buy primary tknb), s (sells primary tknb) or bs (buys and sells)
@@ -1081,6 +1172,8 @@ def itm(self, other, *, thresholdpc=None, aggr=True):
:thresholdpc: in-the-money threshold in percent (default: ITM_THRESHOLD)
:aggr: if True, and an iterable is passed, True iff one is in the money
"""
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
try:
itm_t = tuple(self.itm(o) for o in other)
if not aggr:
@@ -1103,7 +1196,6 @@ def tvl(self, tkn=None, *, mult=1.0, incltkn=False, raiseonerror=True):
:raiseonerror: if True, raises ValueError if tkn is not tknb or tknq
:returns: tvl (in tkn) or (tvl, tkn, mult) if incltkn is True
"""
-
if tkn is None:
tkn = self.tknq
if not tkn in {self.tknb, self.tknq}:
@@ -1145,12 +1237,21 @@ def pp(self):
@property
def kbar(self):
- "kbar = sqrt(k); kbar scales linearly with the pool size"
- return sqrt(self.k)
+ """
+ kbar is pool invariant the scales linearly with the pool size
+
+ kbar = sqrt(k) for constant product
+ kbar = k^alpha for general curves
+ """
+ if self.is_constant_product():
+ return sqrt(self.k)
+ return self.k**self.alpha
@property
def x_min(self):
"minimum (virtual) x value"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
return self.x - self.x_act
@property
@@ -1179,11 +1280,15 @@ def at_boundary(self):
@property
def y_min(self):
"minimum (virtual) y value"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
return self.y - self.y_act
@property
def x_max(self):
"maximum (virtual) x value"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if self.y_min > 0:
return self.k / self.y_min
else:
@@ -1192,6 +1297,8 @@ def x_max(self):
@property
def y_max(self):
"maximum (virtual) y value"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if self.x_min > 0:
return self.k / self.x_min
else:
@@ -1200,6 +1307,8 @@ def y_max(self):
@property
def p_max(self):
"maximum pool price (in dy/dx; None if unlimited) = y_max/x_min"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if not self.x_min is None and self.x_min > 0:
return self.y_max / self.x_min
else:
@@ -1214,6 +1323,8 @@ def p_max_primary(self, swap=True):
@property
def p_min(self):
"minimum pool price (in dy/dx; None if unlimited) = y_min/x_max"
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if not self.x_max is None and self.x_max > 0:
return self.y_min / self.x_max
else:
@@ -1227,6 +1338,8 @@ def p_min_primary(self, swap=True):
def format(self, *, heading=False, formatid=None):
"""returns info about the curve as a formatted string"""
+ assert self.is_constant_product(), "only implemented for constant product curves"
+
if formatid is None:
formatid = 0
assert formatid in [0], "only formatid in [0] is supported"
@@ -1244,20 +1357,34 @@ def format(self, *, heading=False, formatid=None):
return s
def xyfromp_f(self, p=None, *, ignorebounds=False, withunits=False):
- """
- returns x,y for a given marginal price p (stuck at the boundaries if ignorebounds=False)
+ r"""
+ returns x,y,p for a given marginal price p (stuck at the boundaries if ignorebounds=False)
:p: marginal price (in dy/dx)
:ignorebounds: if True, ignore x_act and y_act; if False, return the x,y values where
x_act and y_act are at zero (i.e. the pool is empty in this direction)
:withunits: if False, return x,y,p; if True, also return tknx, tkny, pair
+
+
+ $$
+ x(p) = \left( \frac{\eta}{p} \right) ^ {1-\alpha} k^\alpha
+ y(p) = \left( \frac{p}{\eta} \right) ^ \alpha k^\alpha
+ $$
"""
if p is None:
p = self.p
- sqrt_p = sqrt(p)
- sqrt_k = self.kbar
- x = sqrt_k / sqrt_p
- y = sqrt_k * sqrt_p
+
+ if self.is_constant_product():
+ sqrt_p = sqrt(p)
+ sqrt_k = self.kbar
+ x = sqrt_k / sqrt_p
+ y = sqrt_k * sqrt_p
+ else:
+ eta = self.eta
+ alpha = self.alpha
+ x = (eta/p)**(1-alpha) * self.kbar
+ y = (p/eta)**alpha * self.kbar
+
if not ignorebounds:
if not self.x_min is None:
if x < self.x_min:
@@ -1278,7 +1405,7 @@ def xyfromp_f(self, p=None, *, ignorebounds=False, withunits=False):
return x, y, p
def dxdyfromp_f(self, p=None, *, ignorebounds=False, withunits=False):
- """like xyfromp_f, but returns dx,dy instead of x,y"""
+ """like xyfromp_f, but returns dx,dy,p instead of x,y,p"""
x, y, p = self.xyfromp_f(p, ignorebounds=ignorebounds)
dx = x - self.x
dy = y - self.y
@@ -1288,7 +1415,11 @@ def dxdyfromp_f(self, p=None, *, ignorebounds=False, withunits=False):
def yfromx_f(self, x, *, ignorebounds=False):
"y value for given x value (if in range; None otherwise)"
- y = self.k / x
+ if self.is_constant_product():
+ y = self.k / x
+ else:
+ y = (self.k / x) ** self.eta
+
if ignorebounds:
return y
if not self.inrange(y, self.y_min, self.y_max):
@@ -1297,7 +1428,10 @@ def yfromx_f(self, x, *, ignorebounds=False):
def xfromy_f(self, y, *, ignorebounds=False):
"x value for given y value (if in range; None otherwise)"
- x = self.k / y
+ if self.is_constant_product():
+ x = self.k / y
+ else:
+ x = self.k / (y ** (1/self.eta))
if ignorebounds:
return x
if not self.inrange(x, self.x_min, self.x_max):
diff --git a/fastlane_bot/tools/optimizer/margpoptimizer.py b/fastlane_bot/tools/optimizer/margpoptimizer.py
index 6b384a1b2..68834d99c 100644
--- a/fastlane_bot/tools/optimizer/margpoptimizer.py
+++ b/fastlane_bot/tools/optimizer/margpoptimizer.py
@@ -214,7 +214,11 @@ def dtknfromp_f(p, *, islog10=True, asdct=False, quiet=False):
sum_by_tkn = {t: 0 for t in alltokens_s}
for pair, (tknb, tknq) in zip(pairs, pairs_t):
- price = get(p, tokens_ix.get(tknb)) / get(p, tokens_ix.get(tknq))
+ if get(p, tokens_ix.get(tknq)) > 0:
+ price = get(p, tokens_ix.get(tknb)) / get(p, tokens_ix.get(tknq))
+ else:
+ #print(f"[dtknfromp_f] warning: price for {pair} is unknown, using 1 instead")
+ price = 1
curves = curves_by_pair[pair]
c0 = curves[0]
dxdy = tuple(dxdy_f(c.dxdyfromp_f(price)) for c in curves)
diff --git a/resources/NBTest/NBTest_003_Serialization.ipynb b/resources/NBTest/NBTest_003_Serialization.ipynb
index 62f857786..0788a5f6a 100644
--- a/resources/NBTest/NBTest_003_Serialization.ipynb
+++ b/resources/NBTest/NBTest_003_Serialization.ipynb
@@ -10,8 +10,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "ConstantProductCurve v2.14 (23/May/2023)\n",
- "CPCArbOptimizer v4.0 (10/May/2023)\n",
+ "ConstantProductCurve v3.0 (22/Aug/2023)\n",
+ "CPCArbOptimizer v5.0 (26/Jul/2023)\n",
"imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n",
"Version = 3-b2.2 [requirements >= 2.0 is met]\n"
]
@@ -50,324 +50,61 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "8cb4f9bc-2f31-4eae-b77f-533aa188e49b",
+ "id": "4030cea3-3e03-4e0f-8d80-7a2bcca05fcf",
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "
\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " k | \n",
- " x | \n",
- " x_act | \n",
- " y_act | \n",
- " pair | \n",
- " fee | \n",
- " descr | \n",
- " constr | \n",
- " params | \n",
- "
\n",
- " \n",
- " cid | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " None | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2200 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2200.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2400 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2400.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2200 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2200.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2400 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2400.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2200 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2200.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2400 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2400.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2200 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2200.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2400 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2400.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2200 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2200.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- " None | \n",
- " 2400 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2400.0 | \n",
- " ETH/USDC | \n",
- " None | \n",
- " None | \n",
- " xy | \n",
- " {} | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " k x x_act y_act pair fee descr constr params\n",
- "cid \n",
- "None 2000 1 1 2000.0 ETH/USDC None None xy {}\n",
- "None 2200 1 1 2200.0 ETH/USDC None None xy {}\n",
- "None 2400 1 1 2400.0 ETH/USDC None None xy {}\n",
- "None 2000 1 1 2000.0 ETH/USDC None None xy {}\n",
- "None 2200 1 1 2200.0 ETH/USDC None None xy {}\n",
- "None 2400 1 1 2400.0 ETH/USDC None None xy {}\n",
- "None 2000 1 1 2000.0 ETH/USDC None None xy {}\n",
- "None 2200 1 1 2200.0 ETH/USDC None None xy {}\n",
- "None 2400 1 1 2400.0 ETH/USDC None None xy {}\n",
- "None 2000 1 1 2000.0 ETH/USDC None None xy {}\n",
- "None 2200 1 1 2200.0 ETH/USDC None None xy {}\n",
- "None 2400 1 1 2400.0 ETH/USDC None None xy {}\n",
- "None 2000 1 1 2000.0 ETH/USDC None None xy {}\n",
- "None 2200 1 1 2200.0 ETH/USDC None None xy {}\n",
- "None 2400 1 1 2400.0 ETH/USDC None None xy {}"
- ]
- },
- "execution_count": 2,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
- "N=5\n",
- "curves = [\n",
- " CPC.from_xy(x=1, y=2000, pair=\"ETH/USDC\"),\n",
- " CPC.from_xy(x=1, y=2200, pair=\"ETH/USDC\"),\n",
- " CPC.from_xy(x=1, y=2400, pair=\"ETH/USDC\"),\n",
- "]\n",
- "# note: the below is a bit icky as the same curve objects are added multiple times\n",
- "CC = CPCContainer(curves*N)\n",
- "O = CPCArbOptimizer(CC)\n",
- "O.CC.asdf()"
+ "pass"
]
},
{
"cell_type": "code",
"execution_count": 3,
- "id": "a5ed0075-5ee5-4592-a192-e06d2b5af454",
+ "id": "8cb4f9bc-2f31-4eae-b77f-533aa188e49b",
"metadata": {},
"outputs": [],
"source": [
- "O.pickle(\"delme\")\n",
- "O.pickle(\"delme\", addts=False)"
+ "# N=5\n",
+ "# curves = [\n",
+ "# CPC.from_xy(x=1, y=2000, pair=\"ETH/USDC\"),\n",
+ "# CPC.from_xy(x=1, y=2200, pair=\"ETH/USDC\"),\n",
+ "# CPC.from_xy(x=1, y=2400, pair=\"ETH/USDC\"),\n",
+ "# ]\n",
+ "# # note: the below is a bit icky as the same curve objects are added multiple times\n",
+ "# CC = CPCContainer(curves*N)\n",
+ "# O = CPCArbOptimizer(CC)\n",
+ "# O.CC.asdf()"
]
},
{
"cell_type": "code",
"execution_count": 4,
- "id": "1bf13d91-2bc0-4819-96b9-2712ef89b6f1",
+ "id": "a5ed0075-5ee5-4592-a192-e06d2b5af454",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "delme.169028648950.optimizer.pickle delme.optimizer.pickle\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "!ls *.pickle"
+ "# O.pickle(\"delme\")\n",
+ "# O.pickle(\"delme\", addts=False)"
]
},
{
"cell_type": "code",
"execution_count": 5,
+ "id": "1bf13d91-2bc0-4819-96b9-2712ef89b6f1",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# !ls *.pickle"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
"id": "ce05c578-5060-498e-b4eb-f55617d10cdd",
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
- ]
- },
- "execution_count": 5,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
- "O.unpickle(\"delme\")"
+ "# O.unpickle(\"delme\")"
]
},
{
@@ -397,17 +134,17 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 7,
"id": "41a5cdfe-fb7b-4c8b-a270-1a52f0765e94",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "ConstantProductCurve(k=10000, x=100, x_act=100, y_act=100, pair='TKNB/TKNQ', cid='1', fee=0, descr='UniV2', constr='uv2', params={})"
+ "ConstantProductCurve(k=10000, x=100, x_act=100, y_act=100, alpha=0.5, pair='TKNB/TKNQ', cid='1', fee=0, descr='UniV2', constr='uv2', params={})"
]
},
- "execution_count": 6,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -431,7 +168,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 8,
"id": "ea3cdfbc-8edd-41f1-9703-0ae0d72fdb9a",
"metadata": {},
"outputs": [
@@ -442,6 +179,7 @@
" 'x': 100,\n",
" 'x_act': 100,\n",
" 'y_act': 100,\n",
+ " 'alpha': 0.5,\n",
" 'pair': 'TKNB/TKNQ',\n",
" 'cid': '1',\n",
" 'fee': 0,\n",
@@ -450,7 +188,7 @@
" 'params': {}}"
]
},
- "execution_count": 7,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -461,7 +199,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 9,
"id": "595de023-5c66-40fc-928f-eca5fe6a50c9",
"metadata": {},
"outputs": [],
@@ -471,6 +209,7 @@
" 'x': 100,\n",
" 'x_act': 100,\n",
" 'y_act': 100,\n",
+ " 'alpha': 0.5,\n",
" 'pair': 'TKNB/TKNQ',\n",
" 'cid': \"1\",\n",
" 'fee': 0,\n",
@@ -482,7 +221,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 10,
"id": "215b5105-08d9-4077-a51a-7658cafcffa9",
"metadata": {},
"outputs": [],
@@ -516,7 +255,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 11,
"id": "0963034a-b36c-4cfb-84da-ccb3c88c4389",
"metadata": {},
"outputs": [],
@@ -534,7 +273,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 12,
"id": "eb5dd380-dd90-4a3b-b88a-5a697bdbc3a0",
"metadata": {},
"outputs": [],
@@ -565,7 +304,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 13,
"id": "624b80f1-c811-483b-ba24-b76c72fe3e0c",
"metadata": {},
"outputs": [],
@@ -580,7 +319,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 14,
"id": "34d52402-18d6-4485-8e5c-6cb4f8af2ab2",
"metadata": {},
"outputs": [
@@ -604,7 +343,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 15,
"id": "85175836-0fa9-4f64-a42f-b5b787e622f0",
"metadata": {},
"outputs": [],
@@ -619,7 +358,7 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 16,
"id": "9753798a-b154-4865-a845-a1f5f1eb8e4b",
"metadata": {},
"outputs": [
@@ -643,17 +382,17 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 17,
"id": "5f683913-1799-4f3a-9473-a663d803448a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "ConstantProductCurve(k=0.01, x=0.0015438708879488485, x_act=0, y_act=1, pair='ETH/USDC', cid='4', fee=0, descr='Carbon', constr='carb', params={'y': 1, 'yint': 1, 'A': 10, 'B': 54.772255750516614, 'pa': 4195.445115010333, 'pb': 3000.0000000000005})"
+ "ConstantProductCurve(k=0.01, x=0.0015438708879488485, x_act=0, y_act=1, alpha=0.5, pair='ETH/USDC', cid='4', fee=0, descr='Carbon', constr='carb', params={'y': 1, 'yint': 1, 'A': 10, 'B': 54.772255750516614, 'pa': 4195.445115010333, 'pb': 3000.0000000000005})"
]
},
- "execution_count": 16,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -667,7 +406,7 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 18,
"id": "cffdcaa4-f221-4bd7-bf2d-5418a33e3592",
"metadata": {},
"outputs": [],
@@ -691,7 +430,7 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 19,
"id": "f66fc490-97e0-4c5e-958d-1e9014934d5c",
"metadata": {},
"outputs": [],
@@ -705,7 +444,7 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 20,
"id": "465ff937-2382-4215-8e11-ec8096e1ea3d",
"metadata": {},
"outputs": [],
@@ -724,7 +463,7 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 21,
"id": "c5c8d6c3-0d15-4c3d-8852-b2870a7b4caa",
"metadata": {},
"outputs": [],
@@ -740,7 +479,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 22,
"id": "8296d087-d5a5-4b77-825a-dd53ed60d4bd",
"metadata": {},
"outputs": [],
@@ -758,7 +497,7 @@
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 23,
"id": "e72d0162-dd59-489c-8efb-dbb8327ff553",
"metadata": {},
"outputs": [
@@ -826,7 +565,7 @@
},
{
"cell_type": "code",
- "execution_count": 23,
+ "execution_count": 24,
"id": "c2d5dc97-05e8-4eca-abc7-66eee6e7d706",
"metadata": {},
"outputs": [],
@@ -840,7 +579,7 @@
},
{
"cell_type": "code",
- "execution_count": 24,
+ "execution_count": 25,
"id": "9f467a32-370b-4634-bec8-3c28be84a0a0",
"metadata": {},
"outputs": [],
@@ -852,17 +591,17 @@
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 26,
"id": "d7563934-5381-476d-b9cb-99b909691049",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "CPCContainer(curves=[ConstantProductCurve(k=2000, x=1, x_act=1, y_act=2000, pair='ETH/USDC', cid='1', fee=0.001, descr='UniV2', constr='uv2', params={'meh': 1}), ConstantProductCurve(k=8040, x=2, x_act=2, y_act=4020, pair='ETH/USDC', cid='2', fee=0.001, descr='UniV2', constr='uv2', params={}), ConstantProductCurve(k=1970, x=1, x_act=1, y_act=1970, pair='ETH/USDC', cid='3', fee=0.001, descr='UniV2', constr='uv2', params={})])"
+ "CPCContainer(curves=[ConstantProductCurve(k=2000, x=1, x_act=1, y_act=2000, alpha=0.5, pair='ETH/USDC', cid='1', fee=0.001, descr='UniV2', constr='uv2', params={'meh': 1}), ConstantProductCurve(k=8040, x=2, x_act=2, y_act=4020, alpha=0.5, pair='ETH/USDC', cid='2', fee=0.001, descr='UniV2', constr='uv2', params={}), ConstantProductCurve(k=1970, x=1, x_act=1, y_act=1970, alpha=0.5, pair='ETH/USDC', cid='3', fee=0.001, descr='UniV2', constr='uv2', params={})])"
]
},
- "execution_count": 25,
+ "execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
@@ -880,112 +619,14 @@
},
{
"cell_type": "code",
- "execution_count": 26,
+ "execution_count": null,
"id": "131928b8-f927-4799-97c6-ec50631c7959",
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " k | \n",
- " x | \n",
- " x_act | \n",
- " y_act | \n",
- " pair | \n",
- " fee | \n",
- " descr | \n",
- " constr | \n",
- " params | \n",
- "
\n",
- " \n",
- " cid | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " 1 | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {'meh': 1} | \n",
- "
\n",
- " \n",
- " 2 | \n",
- " 8040 | \n",
- " 2 | \n",
- " 2 | \n",
- " 4020 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- " 3 | \n",
- " 1970 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1970 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " k x x_act y_act pair fee descr constr params\n",
- "cid \n",
- "1 2000 1 1 2000 ETH/USDC 0.001 UniV2 uv2 {'meh': 1}\n",
- "2 8040 2 2 4020 ETH/USDC 0.001 UniV2 uv2 {}\n",
- "3 1970 1 1 1970 ETH/USDC 0.001 UniV2 uv2 {}"
- ]
- },
- "execution_count": 26,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"df = CC.asdf()\n",
"assert len(df) == 3\n",
- "assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act', \n",
+ "assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act', 'alpha',\n",
" 'pair', 'fee', 'descr', 'constr', 'params')\n",
"assert tuple(df[\"k\"]) == (2000, 8040, 1970)\n",
"assert CPCContainer.from_df(df) == CC\n",
@@ -1004,7 +645,7 @@
},
{
"cell_type": "code",
- "execution_count": 27,
+ "execution_count": null,
"id": "6cd062ae-c465-4102-a57c-587874023de5",
"metadata": {},
"outputs": [],
@@ -1033,19 +674,10 @@
},
{
"cell_type": "code",
- "execution_count": 28,
+ "execution_count": null,
"id": "8c046e70-ef8a-4de8-bd17-726afb617ea1",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "len 2145000\n",
- "elapsed time: 0.53s\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"start_time = time.time()\n",
"cc_json = json.dumps(CC.asdicts())\n",
@@ -1068,106 +700,10 @@
},
{
"cell_type": "code",
- "execution_count": 29,
+ "execution_count": null,
"id": "e892dc06-329d-477f-adcb-40a87eb7a009",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "elapsed time: 0.30s\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " cid | \n",
- " k | \n",
- " x | \n",
- " x_act | \n",
- " y_act | \n",
- " pair | \n",
- " fee | \n",
- " descr | \n",
- " constr | \n",
- " params | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " 0 | \n",
- " 1 | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- " 1 | \n",
- " 2 | \n",
- " 8040 | \n",
- " 2 | \n",
- " 2 | \n",
- " 4020 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- " 2 | \n",
- " 3 | \n",
- " 1970 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1970 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " cid k x x_act y_act pair fee descr constr params\n",
- "0 1 2000 1 1 2000 ETH/USDC 0.001 UniV2 uv2 {}\n",
- "1 2 8040 2 2 4020 ETH/USDC 0.001 UniV2 uv2 {}\n",
- "2 3 1970 1 1 1970 ETH/USDC 0.001 UniV2 uv2 {}"
- ]
- },
- "execution_count": 29,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"start_time = time.time()\n",
"df.to_csv(\".curves.csv\")\n",
@@ -1189,18 +725,10 @@
},
{
"cell_type": "code",
- "execution_count": 30,
+ "execution_count": null,
"id": "a2976017-2a84-4fba-885d-7680d9f61c3a",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "elapsed time: 0.38s\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"start_time = time.time()\n",
"df.to_csv(\".curves.tsv\", sep=\"\\t\")\n",
@@ -1221,20 +749,12 @@
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": null,
"id": "ed5aaa2c-2f5a-4863-87cf-a77240826a85",
"metadata": {
"lines_to_next_cell": 2
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "elapsed time: 0.37s\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"start_time = time.time()\n",
"df.to_csv(\".curves.csv.gz\", compression = \"gzip\")\n",
@@ -1255,7 +775,7 @@
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": null,
"id": "f1507cc7-96ba-4342-bf1e-955b248bd8b4",
"metadata": {},
"outputs": [],
@@ -1280,115 +800,10 @@
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": null,
"id": "a1c75dfe-ce14-4840-9c62-39a8d5cfc3ad",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "elapsed time: 0.32s\n"
- ]
- },
- {
- "data": {
- "text/html": [
- "\n",
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " k | \n",
- " x | \n",
- " x_act | \n",
- " y_act | \n",
- " pair | \n",
- " fee | \n",
- " descr | \n",
- " constr | \n",
- " params | \n",
- "
\n",
- " \n",
- " cid | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- " | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " 1 | \n",
- " 2000 | \n",
- " 1 | \n",
- " 1 | \n",
- " 2000 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- " 2 | \n",
- " 8040 | \n",
- " 2 | \n",
- " 2 | \n",
- " 4020 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- " 3 | \n",
- " 1970 | \n",
- " 1 | \n",
- " 1 | \n",
- " 1970 | \n",
- " ETH/USDC | \n",
- " 0.001 | \n",
- " UniV2 | \n",
- " uv2 | \n",
- " {} | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " k x x_act y_act pair fee descr constr params\n",
- "cid \n",
- "1 2000 1 1 2000 ETH/USDC 0.001 UniV2 uv2 {}\n",
- "2 8040 2 2 4020 ETH/USDC 0.001 UniV2 uv2 {}\n",
- "3 1970 1 1 1970 ETH/USDC 0.001 UniV2 uv2 {}"
- ]
- },
- "execution_count": 33,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"start_time = time.time()\n",
"df.to_pickle(\".curves.pkl\")\n",
@@ -1419,23 +834,10 @@
},
{
"cell_type": "code",
- "execution_count": 34,
+ "execution_count": null,
"id": "c43b9431-603d-49af-b5fd-1975e9f59e2f",
"metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " 2145000 .curves.json\n",
- "-rw-r--r-- 1 skl staff 660049 25 Jul 14:01 .curves.csv\n",
- "-rw-r--r-- 1 skl staff 2725 25 Jul 14:01 .curves.csv.gz\n",
- "-rw-r--r-- 1 skl staff 841163 25 Jul 14:01 .curves.pkl\n",
- "-rw-r--r-- 1 skl staff 660049 25 Jul 14:01 .curves.tsv\n",
- "-rw-r--r-- 1 skl staff 470552 1 May 12:43 .curves.xlsx\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"#print(f\"{len(df_xlsx)} curves\")\n",
"print(f\" {len(cc_json)} .curves.json\", )\n",
@@ -1465,6 +867,14 @@
"metadata": {},
"outputs": [],
"source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "076619c0-8c0d-4555-9e3e-62266225942b",
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
diff --git a/resources/NBTest/NBTest_003_Serialization.py b/resources/NBTest/NBTest_003_Serialization.py
index b9825d760..e71875926 100644
--- a/resources/NBTest/NBTest_003_Serialization.py
+++ b/resources/NBTest/NBTest_003_Serialization.py
@@ -32,23 +32,30 @@
# ## Optimizer pickling [NOTEST]
-N=5
-curves = [
- CPC.from_xy(x=1, y=2000, pair="ETH/USDC"),
- CPC.from_xy(x=1, y=2200, pair="ETH/USDC"),
- CPC.from_xy(x=1, y=2400, pair="ETH/USDC"),
-]
-# note: the below is a bit icky as the same curve objects are added multiple times
-CC = CPCContainer(curves*N)
-O = CPCArbOptimizer(CC)
-O.CC.asdf()
+pass
-O.pickle("delme")
-O.pickle("delme", addts=False)
+# +
+# N=5
+# curves = [
+# CPC.from_xy(x=1, y=2000, pair="ETH/USDC"),
+# CPC.from_xy(x=1, y=2200, pair="ETH/USDC"),
+# CPC.from_xy(x=1, y=2400, pair="ETH/USDC"),
+# ]
+# # note: the below is a bit icky as the same curve objects are added multiple times
+# CC = CPCContainer(curves*N)
+# O = CPCArbOptimizer(CC)
+# O.CC.asdf()
-# !ls *.pickle
+# +
+# O.pickle("delme")
+# O.pickle("delme", addts=False)
-O.unpickle("delme")
+# +
+# # !ls *.pickle
+
+# +
+# O.unpickle("delme")
+# -
# ## Creating curves
#
@@ -86,6 +93,7 @@
'x': 100,
'x_act': 100,
'y_act': 100,
+ 'alpha': 0.5,
'pair': 'TKNB/TKNQ',
'cid': "1",
'fee': 0,
@@ -258,7 +266,7 @@
df = CC.asdf()
assert len(df) == 3
-assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act',
+assert tuple(df.reset_index().columns) == ('cid', 'k', 'x', 'x_act', 'y_act', 'alpha',
'pair', 'fee', 'descr', 'constr', 'params')
assert tuple(df["k"]) == (2000, 8040, 1970)
assert CPCContainer.from_df(df) == CC
@@ -369,3 +377,5 @@
+
+
diff --git a/resources/NBTest/NBTest_037_Exchanges.py b/resources/NBTest/NBTest_037_Exchanges.py
index d2f888ec6..18b78ab97 100644
--- a/resources/NBTest/NBTest_037_Exchanges.py
+++ b/resources/NBTest/NBTest_037_Exchanges.py
@@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
-# jupytext_version: 1.14.7
+# jupytext_version: 1.13.1
# kernelspec:
# display_name: Python 3
# language: python
diff --git a/resources/NBTest/NBTest_038_TestBancorV3Mode.py b/resources/NBTest/NBTest_038_TestBancorV3Mode.py
index 3cba4fd91..580c86256 100644
--- a/resources/NBTest/NBTest_038_TestBancorV3Mode.py
+++ b/resources/NBTest/NBTest_038_TestBancorV3Mode.py
@@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
-# jupytext_version: 1.14.7
+# jupytext_version: 1.13.1
# kernelspec:
# display_name: Python 3
# language: python
diff --git a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py
index 53329eff1..b06fc9230 100644
--- a/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py
+++ b/resources/NBTest/NBTest_048_RespectFlashloanTokensClickParam.py
@@ -5,7 +5,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
-# jupytext_version: 1.14.7
+# jupytext_version: 1.13.1
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
diff --git a/resources/NBTest/NBTest_049_CPCBalancer.ipynb b/resources/NBTest/NBTest_049_CPCBalancer.ipynb
new file mode 100644
index 000000000..314618b02
--- /dev/null
+++ b/resources/NBTest/NBTest_049_CPCBalancer.ipynb
@@ -0,0 +1,1465 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "id": "a448e212",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ConstantProductCurve v3.0-beta3 (22/Aug/2023)\n"
+ ]
+ }
+ ],
+ "source": [
+ "from fastlane_bot.tools.cpc import ConstantProductCurve as CPC\n",
+ "#from flbtools.cpc import ConstantProductCurve as CPC\n",
+ "print(\"{0.__name__} v{0.__VERSION__} ({0.__DATE__})\".format(CPC))\n",
+ "\n",
+ "from fastlane_bot.testing import *\n",
+ "#from flbtesting import *\n",
+ "from math import sqrt\n",
+ "# from fastlane_bot import __VERSION__\n",
+ "# require(\"3.0\", __VERSION__)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d9917997",
+ "metadata": {},
+ "source": [
+ "# CPC for Balancer [NBTest049]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "521e4bc5-f003-4062-8978-18506ecff248",
+ "metadata": {},
+ "source": [
+ "## Constant product constructor"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "id": "c5cf94f7-77df-412c-9988-7085184bdd1f",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xy', params={})"
+ ]
+ },
+ "execution_count": 75,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c0 = CPC.from_xy(100, 200)\n",
+ "assert c0.x == 100\n",
+ "assert c0.y == 200\n",
+ "assert c0.k == 20000\n",
+ "assert c0.x == c0.x_act\n",
+ "assert c0.y == c0.y_act\n",
+ "assert c0.alpha == 0.5\n",
+ "assert c0.eta == 1\n",
+ "assert c0.constr == \"xy\"\n",
+ "assert c0.is_constant_product() == True\n",
+ "c0"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "id": "9eb7484e-a09a-4184-bd59-073a7b399b8a",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert c0.asdict() == {\n",
+ " 'k': 20000,\n",
+ " 'x': 100,\n",
+ " 'x_act': 100,\n",
+ " 'y_act': 200.0,\n",
+ " 'alpha': 0.5,\n",
+ " 'pair': 'TKNB/TKNQ',\n",
+ " 'cid': 'None',\n",
+ " 'fee': None,\n",
+ " 'descr': None,\n",
+ " 'constr': 'xy',\n",
+ " 'params': {}\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "id": "2b12d88d-6d7d-4d39-b9bc-def990500df7",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000.0, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 77,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c1 = CPC.from_xyal(100, 200)\n",
+ "assert c1.constr == \"xyal\"\n",
+ "assert c1.is_constant_product() == True\n",
+ "assert c1==c0\n",
+ "c1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 78,
+ "id": "fc98b1e0-0771-4cd6-877c-b70e74b548b8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert c1.asdict() == {\n",
+ " 'k': 20000,\n",
+ " 'x': 100,\n",
+ " 'x_act': 100,\n",
+ " 'y_act': 200.0,\n",
+ " 'alpha': 0.5,\n",
+ " 'pair': 'TKNB/TKNQ',\n",
+ " 'cid': 'None',\n",
+ " 'fee': None,\n",
+ " 'descr': None,\n",
+ " 'constr': 'xyal',\n",
+ " 'params': {}\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 79,
+ "id": "f6ededab-423a-489e-8d1b-295162fda59b",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000.0, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 79,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c2 = CPC.from_xyal(100, 200, alpha=0.5)\n",
+ "assert c2.constr == \"xyal\"\n",
+ "assert c2.is_constant_product() == True\n",
+ "assert c2==c0\n",
+ "assert c2.asdict() == c1.asdict()\n",
+ "c2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "id": "203e5e7b-1cde-4154-a75c-35068f018a21",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000.0, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 80,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c3 = CPC.from_xyal(100, 200, eta=1)\n",
+ "assert c3.constr == \"xyal\"\n",
+ "assert c3.is_constant_product() == True\n",
+ "assert c3==c0\n",
+ "assert c3.asdict() == c1.asdict()\n",
+ "c3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 81,
+ "id": "ee693b31-3278-46d2-a578-ba6e0b2c6333",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert raises(CPC.from_xyal, 100, 200, \n",
+ " alpha=0.5, eta=1) == 'at most one of alpha and eta must be given [0.5, 1]'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "9f8986b6-0d20-4a26-9dbe-19c20eb40034",
+ "metadata": {},
+ "source": [
+ "## Weighted constructor"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 82,
+ "id": "2331941a-3aeb-4fa3-887a-6ed45c37307b",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xy', params={})"
+ ]
+ },
+ "execution_count": 82,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c0 = CPC.from_xy(100, 200)\n",
+ "assert c0.x == 100\n",
+ "assert c0.y == 200\n",
+ "assert c0.k == 20000\n",
+ "assert c0.x == c0.x_act\n",
+ "assert c0.y == c0.y_act\n",
+ "assert c0.alpha == 0.5\n",
+ "assert c0.eta == 1\n",
+ "assert c0.constr == \"xy\"\n",
+ "assert c0.is_constant_product() == True\n",
+ "c0"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 83,
+ "id": "db5f6d9a-87c3-4bba-9bbc-32993d2c09a7",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000.0, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 83,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c1 = CPC.from_xyal(100, 200)\n",
+ "assert c1.constr == \"xyal\"\n",
+ "assert c1.is_constant_product() == True\n",
+ "assert c1 == c0\n",
+ "assert c1.asdict()[\"alpha\"] == 0.5\n",
+ "c1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 84,
+ "id": "02dc9cc9-d30e-4daf-9f7d-11f9bd60ad04",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=800000000.0, x=100, x_act=100, y_act=199.99999999999994, alpha=0.25, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 84,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c2 = CPC.from_xyal(100, 200, alpha=0.25)\n",
+ "assert c2.constr == \"xyal\"\n",
+ "assert c2.is_constant_product() == False\n",
+ "assert c2.alpha == 0.25\n",
+ "assert c2.asdict()[\"alpha\"] == 0.25\n",
+ "assert iseq(c2.eta, 0.25/0.75)\n",
+ "assert c2 != c0\n",
+ "assert c2 != c1\n",
+ "c2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 85,
+ "id": "f48bec87-6674-4a5c-8a15-562c5caff154",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=800000000.0, x=100, x_act=100, y_act=199.99999999999994, alpha=0.25, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 85,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c3 = CPC.from_xyal(100, 200, alpha=0.8)\n",
+ "assert c3.constr == \"xyal\"\n",
+ "assert c3.is_constant_product() == False\n",
+ "assert iseq(c3.alpha, 0.8)\n",
+ "assert c3.asdict()[\"alpha\"] == 0.8\n",
+ "assert iseq(c3.eta, 0.8/0.2)\n",
+ "assert c3 != c0\n",
+ "assert c3 != c1\n",
+ "assert c3 != c2\n",
+ "c2"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 86,
+ "id": "4dc4a1f6-1d71-4f1d-b0a0-616f83fb58e8",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=376.06030930863926, x=100, x_act=100, y_act=200.0, alpha=0.8, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 86,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c3b = CPC.fromdict(c3.asdict())\n",
+ "assert c3b == c3\n",
+ "c3b"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 87,
+ "id": "8caba1ff-65e7-496e-adcf-aea4cddcee4b",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert raises(CPC.from_xyal,100, 200, alpha=0) == 'alpha must be > 0 [0]'\n",
+ "assert raises(CPC.from_xyal,100, 200, alpha=-1) == 'alpha must be > 0 [-1]'\n",
+ "assert raises(CPC.from_xyal,100, 200, alpha=1) == 'alpha must be < 1 [1]'\n",
+ "assert raises(CPC.from_xyal,100, 200, alpha=2) == 'alpha must be < 1 [2]'"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 88,
+ "id": "b54669fb-a128-41ae-a3ac-b9eff553f897",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'alpha must be > 0 [0]'"
+ ]
+ },
+ "execution_count": 88,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "raises(CPC.from_xyal,100, 200, alpha=0)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 89,
+ "id": "c4630e2a-b577-410b-8251-1c327866c9f1",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(CPC.from_xyal,100, 200, alpha=1-1e-10)\n",
+ "assert not raises(CPC.from_xyal,100, 200, alpha=0.01)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 90,
+ "id": "c8c740c3-3ffb-4694-95dc-2932b7d39c6c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\"(34, 'Result too large')\""
+ ]
+ },
+ "execution_count": 90,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "raises(CPC.from_xyal,100, 200, alpha=0.001)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "448e83dd-7f7d-4233-a129-729b31168667",
+ "metadata": {},
+ "source": [
+ "## High level testing of all functions\n",
+ "\n",
+ "(including not YET implemented)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 91,
+ "id": "fd739374-c01b-432e-ab80-98e35fda3674",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=20000.0, x=100, x_act=100, y_act=200.0, alpha=0.5, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 91,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c0 = CPC.from_xyal(100, 200)\n",
+ "assert c0.is_constant_product() == True\n",
+ "c0"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 92,
+ "id": "927269a5-0c16-4336-8fcf-3e22392c8847",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "ConstantProductCurve(k=800000000.0, x=100, x_act=100, y_act=199.99999999999994, alpha=0.25, pair='TKNB/TKNQ', cid='None', fee=None, descr=None, constr='xyal', params={})"
+ ]
+ },
+ "execution_count": 92,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "c1 = CPC.from_xyal(100, 200, alpha=0.25)\n",
+ "assert c1.is_constant_product() == False\n",
+ "c1"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "dfa26d63-4a6b-4dbc-ac1a-f1f3ad1d2a0c",
+ "metadata": {},
+ "source": [
+ "#### Not (yet) implemented functions\n",
+ "\n",
+ "Those function groups are not currently planned to be implemented at all\n",
+ "\n",
+ "- `execute` as there is no need to simulate those curves for the time being; that was a Carbon thing\n",
+ "\n",
+ "The functions we may implement at a later stage are\n",
+ "\n",
+ "- `description` should probably be updated, but it is tedious; `format` ditto\n",
+ "- `x_max`, `x_min`, `p_max`, `p_min` and the other leverage functions once we consider it important and safe"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f02b6b1f-e11c-46c7-8ce4-a320b1200432",
+ "metadata": {},
+ "source": [
+ "execute"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 93,
+ "id": "30239c29-9c2d-4a35-b24e-593e27d23013",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.execute)\n",
+ "assert raises(c1.execute).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ce3aa2c2-13e3-43a4-ae06-0815781f1dc1",
+ "metadata": {},
+ "source": [
+ "description and format"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 94,
+ "id": "31973a9d-f6fc-4ba6-8660-3ca6b3b31238",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.description)\n",
+ "assert raises(c1.description).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 95,
+ "id": "6da717da-0e96-4af5-a011-74c54c5a8033",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.format)\n",
+ "assert raises(c1.format).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "85e0d16e-e9f6-4474-b334-19276c5c596a",
+ "metadata": {},
+ "source": [
+ "leverage related functions (primary)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 96,
+ "id": "22c10615-7636-4ec9-ba02-01e9c58ad20d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.p_max)\n",
+ "assert raises(lambda: c1.p_max).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 97,
+ "id": "b63b25fa-8f4a-415d-b0c5-8d10be06f91b",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.p_min)\n",
+ "assert raises(lambda: c1.p_min).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 98,
+ "id": "1e2a97a5-240b-49b4-abdc-f30b3b1e2788",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.x_min)\n",
+ "assert raises(lambda: c1.x_min).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 99,
+ "id": "98262a43-8c8e-4eb2-af03-6c7f082a9a5e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.x_max)\n",
+ "assert raises(lambda: c1.x_max).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 100,
+ "id": "b3049924-bc62-44c3-b7fc-0c5513544b87",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.y_min)\n",
+ "assert raises(lambda: c1.y_min).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 101,
+ "id": "9809fe75-81eb-4117-b06f-ea80e8e5d1af",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.y_max)\n",
+ "assert raises(lambda: c1.y_max).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "162d55a7-94b2-4470-809a-5cf59c6fc6de",
+ "metadata": {},
+ "source": [
+ "leverage related functions (secondary, ie calling primary ones)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 102,
+ "id": "d53b7a88-b1b2-488f-b33e-cf85af69dad2",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.p_max_primary)\n",
+ "assert raises(c1.p_max_primary).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 103,
+ "id": "47628578-dfab-4a28-a46f-b83b12af7745",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.p_min_primary)\n",
+ "assert raises(c1.p_min_primary).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 104,
+ "id": "818af0e4",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.at_xmin)\n",
+ "assert raises(lambda: c1.at_xmin).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 105,
+ "id": "bac20004",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.at_xmax)\n",
+ "assert raises(lambda: c1.at_xmax).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 106,
+ "id": "490db431",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.at_ymin)\n",
+ "assert raises(lambda: c1.at_ymin).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 107,
+ "id": "bc7fda17",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.at_ymax)\n",
+ "assert raises(lambda: c1.at_ymax).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 108,
+ "id": "d1637e16-ae56-45f6-bb90-b10cd5e83194",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.at_boundary)\n",
+ "assert raises(lambda: c1.at_boundary).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "faeae9de-470f-4a8d-82a5-0edf1558ba09",
+ "metadata": {},
+ "source": [
+ "todo"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 109,
+ "id": "4a70d47e-3a89-452d-80f3-d69028433648",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.xyfromp_f)\n",
+ "assert raises(c1.xyfromp_f).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 110,
+ "id": "a1bbada5-9cd2-4dd0-a226-fb7422614b53",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.dxdyfromp_f)\n",
+ "assert raises(c1.dxdyfromp_f).startswith(\"only implemented for\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1d79b5fb-32b4-47f6-a852-f10e508d3fc4",
+ "metadata": {},
+ "source": [
+ "#### Implemented functions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 111,
+ "id": "d90a02d0-21c9-47dc-894c-82ea93b01779",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.y)\n",
+ "assert not raises(lambda: c1.y)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 112,
+ "id": "052b8feb-038e-457a-a3f1-8ff25b030a0e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.p)\n",
+ "assert not raises(lambda: c1.p)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 113,
+ "id": "8872ba9c-2186-4176-add5-4a36b66162a4",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(lambda: c0.kbar)\n",
+ "assert not raises(lambda: c1.kbar)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 114,
+ "id": "795eac9c-fe49-447f-b3fe-c0268cdd20de",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.tvl)\n",
+ "assert not raises(c1.tvl)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 115,
+ "id": "13b1f308-3062-4872-a91e-e89bccf17cf8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.yfromx_f, 110)\n",
+ "assert not raises(c1.yfromx_f, 110, ignorebounds=True)\n",
+ "assert raises(c1.yfromx_f, 110, ignorebounds=False)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 116,
+ "id": "b90b56dd-bc10-4087-a3f4-5c0b8bcc681a",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.xfromy_f, 210)\n",
+ "assert not raises(c1.xfromy_f, 110, ignorebounds=True)\n",
+ "assert raises(c1.xfromy_f, 110, ignorebounds=False)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 117,
+ "id": "9b797a1f-2d04-42ae-a03f-4b9675a65ed3",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.dyfromdx_f, 1)\n",
+ "assert not raises(c1.dyfromdx_f, 1, ignorebounds=True)\n",
+ "assert raises(c1.dyfromdx_f, 1, ignorebounds=False)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 118,
+ "id": "ee7cd754-fe9c-4fb8-848d-46dc2850c0cd",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert not raises(c0.dxfromdy_f, 1)\n",
+ "assert not raises(c1.dxfromdy_f, 1, ignorebounds=True)\n",
+ "assert raises(c1.dxfromdy_f, 1, ignorebounds=False)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "30cea356-d1ff-4f34-ad31-f4fbb89c69b3",
+ "metadata": {},
+ "source": [
+ "## Simple Tests"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 119,
+ "id": "6373dfe5-6d20-4c55-9f0b-80a8ac6e1e05",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "c0 = CPC.from_xyal(100, 200)\n",
+ "c1 = CPC.from_xyal(100, 200, eta=2)\n",
+ "c2 = CPC.from_xyal(100, 200, eta=0.5)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 120,
+ "id": "81cb94ae-1fd1-4d63-9f59-e79274737d4d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.alpha, 1/2)\n",
+ "assert iseq(c1.alpha, 2/3)\n",
+ "assert iseq(c2.alpha, 1/3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "88b1ae49-2c71-4468-bb83-743cadb96b93",
+ "metadata": {},
+ "source": [
+ "#### Current token balance $y$\n",
+ "\n",
+ "$$\n",
+ "y = \\left( \\frac k x \\right)^\\eta\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 121,
+ "id": "0eac45f7-ef6d-419d-8254-098858e7a529",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.y, 200)\n",
+ "assert iseq(c1.y, 200)\n",
+ "assert iseq(c2.y, 200)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f08b3230-20b9-4b72-bd58-4f810a92991c",
+ "metadata": {},
+ "source": [
+ "#### Current price $p$\n",
+ "\n",
+ "$$\n",
+ "p = \\eta\\, \\frac y x\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 122,
+ "id": "cc39342b-1304-4e7d-8594-950df18ffb6e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.p, 2 * c0.eta)\n",
+ "assert iseq(c1.p, 2 * c1.eta)\n",
+ "assert iseq(c2.p, 2 * c2.eta)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bddf7d0d-bbc5-427b-8b01-e4c069ff4e47",
+ "metadata": {},
+ "source": [
+ "#### TVL\n",
+ "\n",
+ "$$\n",
+ "\\mathrm{TVL} = x_a*p + y_a\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 123,
+ "id": "80e3f97b-41b0-4263-b2e0-b02da963c60f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert c0.x == c0.x_act\n",
+ "assert c0.y == c0.y_act\n",
+ "assert c1.x == c1.x_act\n",
+ "assert c1.y == c1.y_act\n",
+ "assert c2.x == c2.x_act\n",
+ "assert c2.y == c2.y_act"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 124,
+ "id": "593fb93f-5d95-4796-9da6-abd79206ff3d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.tvl(), 100 * c0.p + 200)\n",
+ "assert iseq(c1.tvl(), 100 * c1.p + 200)\n",
+ "assert iseq(c2.tvl(), 100 * c2.p + 200)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "98664ea1-c17d-4b42-854b-7b3db79c2b33",
+ "metadata": {},
+ "source": [
+ "#### Pool constant $k$\n",
+ "\n",
+ "$$\n",
+ "k^\\alpha = x^\\alpha\\, y^{1-\\alpha}\n",
+ "$$\n",
+ "\n",
+ "$$\n",
+ "k = x\\,y^\\frac{1-\\alpha}{\\alpha} = x\\,y^{\\frac 1 \\eta}\n",
+ "$$\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 125,
+ "id": "171b56b5-f270-4f51-8fd8-a185b3c0e91f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.k**(1/2), c0.x**(1/2) * c0.y**(1/2))\n",
+ "assert iseq(c1.k**(2/3), c1.x**(2/3) * c1.y**(1/3))\n",
+ "assert iseq(c2.k**(1/3), c1.x**(1/3) * c1.y**(2/3))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0b290a50-f765-4b62-8be6-19542281022b",
+ "metadata": {},
+ "source": [
+ "#### Pool constant $\\bar k$\n",
+ "\n",
+ "$$\n",
+ "x^\\alpha\\, y^{1-\\alpha} = \\bar k = k^\\alpha\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 126,
+ "id": "01d3e5e2-aba4-434d-a118-15bd63e854db",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.kbar, c0.x**(1/2) * c0.y**(1/2))\n",
+ "assert iseq(c1.kbar, c1.x**(2/3) * c1.y**(1/3))\n",
+ "assert iseq(c2.kbar, c1.x**(1/3) * c1.y**(2/3))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 127,
+ "id": "0ae9f182-0f46-4fdd-9879-619cf3f6ecd2",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.kbar, c0.k**c0.alpha)\n",
+ "assert iseq(c1.kbar, c1.k**c1.alpha)\n",
+ "assert iseq(c2.kbar, c2.k**c2.alpha)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d76dbd19-be45-4078-8896-35ba65d9d181",
+ "metadata": {},
+ "source": [
+ "#### Token balance function $y(x)$\n",
+ "\n",
+ "$$\n",
+ "y(x) = \\left( \\frac k x \\right)^\\eta\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 128,
+ "id": "9ff8935e-1898-40b9-802f-09a7b2cc608c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert c0.eta == 1\n",
+ "assert iseq(c0.yfromx_f(100, ignorebounds=True), 200)\n",
+ "assert iseq(c0.yfromx_f( 50, ignorebounds=True), 400)\n",
+ "assert iseq(c0.yfromx_f(200, ignorebounds=True), 100)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 129,
+ "id": "081ec8c2-768c-45a5-a478-1df3a55590ab",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c1.eta, 2)\n",
+ "assert iseq(c1.yfromx_f(100, ignorebounds=True), 200)\n",
+ "assert iseq(c1.yfromx_f( 50, ignorebounds=True), 200*2**2)\n",
+ "assert iseq(c1.yfromx_f(200, ignorebounds=True), 200/2**2)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 130,
+ "id": "5f556205-299f-4f5c-b717-076a64137784",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c2.eta, 1/2)\n",
+ "assert iseq(c2.yfromx_f(100, ignorebounds=True), 200)\n",
+ "assert iseq(c2.yfromx_f( 50, ignorebounds=True), 200*sqrt(2))\n",
+ "assert iseq(c2.yfromx_f(200, ignorebounds=True), 200/sqrt(2))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0aabe321-cb4b-4c65-b84a-73493a95b740",
+ "metadata": {},
+ "source": [
+ "#### Token balance function $x(y)$\n",
+ "\n",
+ "$$\n",
+ "x(y) \n",
+ "= \\frac{k}{ y^{\\frac{1-\\alpha}{\\alpha}} }\n",
+ "= \\frac{k}{ y^{\\frac{1}{\\eta}} }\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 131,
+ "id": "bfbc589d-2124-4c51-9ac9-a7a3034ebd67",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert c0.eta == 1\n",
+ "assert iseq(c0.xfromy_f(200, ignorebounds=True), 100)\n",
+ "assert iseq(c0.xfromy_f(100, ignorebounds=True), 200)\n",
+ "assert iseq(c0.xfromy_f(400, ignorebounds=True), 50)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 132,
+ "id": "fb276d33-72b0-406d-9f3d-9ce16354098b",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c1.eta, 2)\n",
+ "assert iseq(c1.xfromy_f(200, ignorebounds=True), 100)\n",
+ "assert iseq(c1.xfromy_f(100, ignorebounds=True), 100*2**0.5)\n",
+ "assert iseq(c1.xfromy_f(400, ignorebounds=True), 100/2**0.5)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 133,
+ "id": "d55dd588-8a49-43c5-bf23-22fa207876fd",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c2.eta, 1/2)\n",
+ "assert iseq(c2.xfromy_f(200, ignorebounds=True), 100)\n",
+ "assert iseq(c2.xfromy_f(100, ignorebounds=True), 100*2**2)\n",
+ "assert iseq(c2.xfromy_f(400, ignorebounds=True), 100/2**2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ea30dd5f-ae86-469c-8f9b-f7c43f9ed5a6",
+ "metadata": {},
+ "source": [
+ "#### Price response function $(x(p), y(p))$\n",
+ "\n",
+ "$$\n",
+ "x(p) \n",
+ "= \n",
+ "\\left(\\frac \\eta p\\right)^{1-\\alpha} k^\\alpha\n",
+ "$$\n",
+ "\n",
+ "$$\n",
+ "y(p) = \\left( \\frac{kp}{\\eta} \\right)^\\alpha\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 134,
+ "id": "eb60778c-edd0-42c5-8681-a259e02c1e91",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.xyfromp_f(c0.p, ignorebounds=True)[0], c0.x)\n",
+ "assert iseq(c1.xyfromp_f(c1.p, ignorebounds=True)[0], c1.x)\n",
+ "assert iseq(c2.xyfromp_f(c2.p, ignorebounds=True)[0], c2.x)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 135,
+ "id": "c242f036-c366-4c25-ab1d-9b13ff283d60",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.xyfromp_f(c0.p, ignorebounds=True)[1], c0.y)\n",
+ "assert iseq(c1.xyfromp_f(c1.p, ignorebounds=True)[1], c1.y)\n",
+ "assert iseq(c2.xyfromp_f(c2.p, ignorebounds=True)[1], c2.y)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 136,
+ "id": "1e39b3b6-ac20-4a7d-ab4a-f764cc949ee9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "for ci in [c0, c1, c2]:\n",
+ " for p in [2, 1, 4]:\n",
+ " eta_over_p = ci.eta / p\n",
+ " x = eta_over_p ** (1-ci.alpha) * ci.kbar\n",
+ " y = 1/eta_over_p**ci.alpha * ci.kbar\n",
+ " xx, yy, pp = ci.xyfromp_f (p, ignorebounds=True)\n",
+ " dx, dy, _ = ci.dxdyfromp_f(p, ignorebounds=True)\n",
+ " assert iseq(x, xx)\n",
+ " assert iseq(y, yy)\n",
+ " assert iseq(p, pp)\n",
+ " assert iseq(dx, xx-ci.x)\n",
+ " assert iseq(dy, yy-ci.y)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "2105f1e3-cb98-4e4d-9c58-c144bc49c33e",
+ "metadata": {},
+ "source": [
+ "## Consistency tests"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 137,
+ "id": "8fd1d683-195a-414b-bfa2-2155462efcc1",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "c0 = CPC.from_xyal(100, 200)\n",
+ "c1 = CPC.from_xyal(100, 200, eta=2)\n",
+ "c2 = CPC.from_xyal(100, 200, eta=0.5)\n",
+ "cc = [c0, c1, c2]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 138,
+ "id": "c2a77208-d1d6-4d99-8fab-d8b9f988dac9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "assert iseq(c0.alpha, 1/2)\n",
+ "assert iseq(c1.alpha, 2/3)\n",
+ "assert iseq(c2.alpha, 1/3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "902c8cd4-d13b-4b40-96cd-86bfe8a089e7",
+ "metadata": {},
+ "source": [
+ "### Assert inversions\n",
+ "\n",
+ "$$\n",
+ "y(x(y)) = y\n",
+ "$$\n",
+ "\n",
+ "and vice versa"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 139,
+ "id": "30a07eda-449f-471e-a609-f979d894d09a",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "for xy in np.logspace(1, 3, 100):\n",
+ " for ci in cc:\n",
+ " #print(f\"xy={xy}, eta={ci.eta}\")\n",
+ " assert iseq(ci.yfromx_f(ci.xfromy_f(xy, ignorebounds=True), ignorebounds=True), xy)\n",
+ " assert iseq(ci.xfromy_f(ci.yfromx_f(xy, ignorebounds=True), ignorebounds=True), xy)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6c20dda7-f50f-4d35-86b1-80a303d90a59",
+ "metadata": {},
+ "source": [
+ "### Assert that prices are correct\n",
+ "\n",
+ "$$\n",
+ "p \\simeq -\\frac{\\Delta y}{\\Delta x}\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 140,
+ "id": "8826b280-00f7-4771-9bc6-2d5d344b197e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "for alpha in np.linspace(0.01, 0.99, 100):\n",
+ " ci = CPC.from_xyal(100, 200, alpha=alpha)\n",
+ " dy = ci.yfromx_f(ci.x+0.1, ignorebounds=True)-ci.yfromx_f(ci.x-0.1, ignorebounds=True)\n",
+ " assert iseq(dy/0.2, -ci.p, eps=1e-2), f\"error: {dy/0.2/ci.p+1}\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b2944261-9291-496c-98f8-726b0ff26850",
+ "metadata": {},
+ "source": [
+ "### Check `dyfromdx_f` against `yfromx_f`"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 141,
+ "id": "853233ca-22bd-4d0e-a6d1-3dee13341b99",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "for dxy in np.linspace(0.1, 99, 100):\n",
+ " for ci in cc:\n",
+ " assert iseq(ci.dyfromdx_f(dxy, ignorebounds=True),\n",
+ " (ci.yfromx_f(ci.x+dxy, ignorebounds=True)-ci.y))\n",
+ " assert iseq(ci.dxfromdy_f(dxy, ignorebounds=True),\n",
+ " (ci.xfromy_f(ci.y+dxy, ignorebounds=True)-ci.x))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "957ed182-572a-440c-bee2-1a1b33b4d06b",
+ "metadata": {},
+ "source": [
+ "## Charts [NOTEST]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 142,
+ "id": "73dfd68b-56ba-4154-a1f8-79c8bddf4169",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "plt.style.use('seaborn-v0_8-dark')\n",
+ "plt.rcParams['figure.figsize'] = [12,6] # only picked up at second run (?!?)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 143,
+ "id": "bf52087a-ffb7-4dad-bffa-753983249b51",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "c0 = CPC.from_xyal(100, 200)\n",
+ "c1 = CPC.from_xyal(100, 200, eta=2)\n",
+ "c2 = CPC.from_xyal(100, 200, eta=0.5)\n",
+ "cc = [c0, c1, c2]\n",
+ "xvals = np.linspace(50,200)\n",
+ "pvals = np.linspace(1,4)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 144,
+ "id": "c3e74ed7-83cb-497d-82a8-4a8d38bf312d",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAs0AAAF8CAYAAAA0MYbMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAAsTAAALEwEAmpwYAACO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57HHHqNbt26lan7rrbf47LPPeP3110lJSSn3tY4ZM4bu3buzbt06jhw5wgUXXMDzzz+PVnvyOMAPP/zAvHnz8Hq9DB06lHvuuQeAuXPn8uOPP+Lz+fB4PEycOJHLL7+81LaLFy/mtddew+/3k5OTw7Bhw5gwYQKrV6/mH//4B82bN2fnzp34/X6mTJlC7969cblcTJ8+nXXr1qHT6bjssst48MEHCQQCFfZNURSGDBnC5MmT6d+/PxAZSWvXrh233nprdL1Zs2bhdDqZMmUKAEuXLmX27Nm89957PP3006xbtw6DwUCzZs149tlnsdls0W03btzI+++/TygUIi4ujgcffJB//etffPXVV+h0Olq3bs3kyZOj33eAYDDIww8/jF6v5/nnn8fj8TBjxgx27NhBIBCgT58+/O1vf0Ov15e7z5XlpZde4vfffyccDjNhwgQGDhyI2+3mySefZN++feTn52Oz2Zg5cyZpaWmlti3v+zd79mzS09M5duwY6enpJCUl8Y9//IOGDRuyd+9epkyZQk5ODlqtlnvuuYcrr7ySjIyMMvfRkrxeL9dffz0333wzo0eP5uOPP+btt9/mww8/xGKxRNcrr/7CwsKT+l7S999/zz/+8Q8sFgtdunSJLi/eR6+66iree+89QqEQS5cuRafTUVhYyJgxY5g/fz4//fQTr776KoFAALPZzMSJEznvvPOYPXs2GzZsIDMzkw4dOjBz5szT3q9efvllMjMzeeSRR/j73//OueeeC0T28379+vHBBx/QsmVL5s2bx3vvvcfixYsBuO222xg3bhznn39+ue+XDh06sHLlShISEvj73//OTz/9RFxcHN26dWP37t3Mnz8fiPzB8Prrr5OdnU2fPn2YPn36SXVlZGTw6quvotFo0Ol0/O1vf+PCCy8s870nxBlRhKhnBg4cqGzatElRFEVp3769Mn/+fEVRFOX3339XunTponi9XuWtt95Sxo4dq/h8PsXlcinXXXedMnHiREVRFOWWW25Rvvnmm5Meq+Ty2bNnK88995wSDocVRVGUF198UZk6dWp0mzlz5kTrGTNmjLJo0SJFURTF6/UqY8aMUb766ivl4MGDSvv27ZWffvpJURRF+fbbb5VLLrlEURRFefvtt5XRo0crHo9HCYVCyl//+lfls88+Uz777DNlwoQJSiAQUBRFUd5//33lz3/+80k9+PHHH5U//elPSl5enqIoivLMM88or7zyivLJJ58od911V3S9krcnTpyo3HrrrdH7/va3vymvv/66oiiKsmvXLuWSSy5RQqHQKV97SatWrVKuuuqq6PZ9+/ZVDhw4oCiKoqxYsULp16+fUlhYqPzzn/9Upk2bpsybN08ZOXKkkp+fryiKcsrXessttygPPPCAEgqFlMLCQqV///7KypUrT6rhlltuUe6++24lEAgohYWFypAhQ5QlS5Yohw4dUsaMGaN4PB5FURTlyy+/VK6++mpFUZRoPeFwWLnllluUvXv3KoqiKEePHlU6duyoZGdnK6tWrVI6duyo/PHHH4qiKMobb7yhjB49OtrrBx98UAkGg4rP51NGjx6trFq1qtJ9+89//qM88MADiqIoSmFhodK7d+9oT4odOHBA6dWrl+Lz+RRFUZS//vWvyocffqisXbtWGTJkSPQ5/v73vyu//fbbSc9R/BoVRVE+/vhjZeTIkYrL5Yred/vtt0f7t3DhQuXee++N9kRRFOXRRx9V/vvf/yqKoijBYFB55JFHlHnz5imKUv4+d6L27dsrr732mqIoirJ9+3alZ8+eSnZ2tvLNN98oTz/9dHS9yZMnK0899VS0nm+++abC79+gQYOUwsJCRVEU5e6771ZefvllRVEUZdiwYco777yjKIqiHD58OLpeefvoibZt26b07NlTWbJkidK3b19l9+7dJ61zqvpL9r2kY8eOKRdccIGyc+dORVEUZe7cuUr79u0VRSm9j5bcvuTyvXv3KldffbWSk5OjKIqi7NixQ+nXr5/icrmUf/7zn8rgwYOj+9GZ7lclfxaW9Oijj0a/37fccovSr18/Zc+ePUpBQUH0PVrR+yU7O1t57733lNGjRyter1fx+XzK7bffrtxyyy3Rx73nnnuUYDCouN1upV+/fsratWtPqmvQoEHK+vXrFUVRlF9++UWZPXv2SfUKoYaMNIt6b9CgQQB07twZv9+P2+1m5cqVXH311RiNRoxGI0OHDmX79u2VfswlS5ZQWFgYnfscCARITk6O3t+jRw8gMuq0du1a8v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