Tools for Arbitrage in Bostrom, Space-Pussy, Osmosis and Crescent Networks
MIT License
TVL on DefiLlama
Tendermint Liquidity Module Light Paper
formulas without orderbook matching (Liquidity Pool Model only)
Price = \frac{Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + 2 \times Source Coin Amount}
Target Coin Amount = \frac{Source Coin Amount \times Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + 2 \times Source Coin Amount}
where Pool Fee = 0.003 as most common value
Price = \frac{Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + (1 - Pool Fee) \times Source Coin Amount} \times \frac{Source Coin Pool Weight}{Target Coin Pool Weight}
Target Coin Amount = \frac{Source Coin Amount \times Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + (1 - Pool Fee) \times Source Coin Amount} \times \frac{Source Coin Pool Weight}{Target Coin Pool Weight}
it's usually more convenient to use the cyb.ai
from src.data_extractors import get_pools, get_prices, get_price_enriched
pools_df = get_pools(networks=['bostrom', 'space-pussy', 'osmosis', 'crescent'], bostrom_related_osmo_pools=None)
price_df = get_prices(pools_df=pools_df)
price_df = get_price_enriched(price_df=price_df, base_coin_denom='uosmo')
you should have python version 3.9, 3.10 or 3.11, check it
python --version
clone repo
git clone https://github.com/Snedashkovsky/cyber-arbitrage && \
cd cyber-arbitrage
install jupyter notebook
pip install notebook
install python requirements
pip install -r requirements.txt
run jupyter notebook
jupyter notebook