[x] Add unit tests and comment legacy tests, closes #3
[x] Fix small bugs from tests
Testing
test_market.py
test_swap.py
test_strategy.py
test_exec_engine.py
pytest tests -v
Should run all the tests and show everything passing except one test Image
A very good place to start is this test which is a replay of the famous image below (with same values):
It's failing due to a difference in tx fees but its fine we'll change that later, the diff is fully understandood / explained
This one is also good too, that's the test for the AMM ArbStrategy:
You are arbing the pool, pool mid_price starts @ 30_000 USD (3_000_000/100) and after arb trade, ends @ 31_000 USD which is the market price so we are happy
This test is good to learn about the various metrics we report
Testing
Should run all the tests and show everything passing except one test Image
A very good place to start is this test which is a replay of the famous image below (with same values):
It's failing due to a difference in tx fees but its fine we'll change that later, the diff is fully understandood / explained
You are arbing the pool, pool mid_price starts @ 30_000 USD (3_000_000/100) and after arb trade, ends @ 31_000 USD which is the market price so we are happy
Test Results (using Docker)