Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snedashkovsky/cyber-arbitrage
Tools for Arbitrage in Bostrom, Space-Pussy, Osmosis and Crescent Networks
https://github.com/snedashkovsky/cyber-arbitrage
arbitrage arbitrage-trading bostrom crescent dex osmosis space-pussy swap
Last synced: 12 days ago
JSON representation
Tools for Arbitrage in Bostrom, Space-Pussy, Osmosis and Crescent Networks
- Host: GitHub
- URL: https://github.com/snedashkovsky/cyber-arbitrage
- Owner: Snedashkovsky
- License: mit
- Created: 2021-12-15T04:22:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-19T07:21:35.000Z (about 2 months ago)
- Last Synced: 2024-10-18T15:55:29.978Z (26 days ago)
- Topics: arbitrage, arbitrage-trading, bostrom, crescent, dex, osmosis, space-pussy, swap
- Language: Jupyter Notebook
- Homepage:
- Size: 17.9 MB
- Stars: 25
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Arbitrage in Bostrom, Space-Pussy, Osmosis and Crescent Networks
### Pools
#### [Bostrom Pools](https://cyb.ai/warp)
TVL on [DefiLlama](https://defillama.com/chain/Bostrom)
#### [Space-Pussy Pools](https://cyb.ai/warp)
#### [Osmosis Pools](https://frontier.osmosis.zone/pools)
- [BOOT-ATOM](https://info.osmosis.zone/pool/596)
- [BOOT-OSMO](https://info.osmosis.zone/pool/597)
- [BOOT-WETH (Gravity)](https://info.osmosis.zone/pool/911)
- [BOOT-WETH (Axelar)](https://info.osmosis.zone/pool/912)
- [BOOT-DOT](https://info.osmosis.zone/pool/919)
#### [Crescent Pools](https://app.crescent.network/farm)### Price Formulas
#### Bostrom and Space-Pussy[Tendermint Liquidity Module Light Paper](https://github.com/tendermint/liquidity/blob/develop/doc/LiquidityModuleLightPaper_EN.pdf)
formulas without orderbook matching (Liquidity Pool Model only)
```math
Price = \frac{Target Coin Pool Amount \times (1 - Pool Fee)}{Source Coin Pool Amount + 2 \times Source Coin Amount}
```
[//]: # ()```math
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
#### Osmosis
[Module Gamm documentation](https://docs.osmosis.zone/osmosis-core/modules/gamm)```math
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}
```
[//]: # ()```math
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}
```
[//]: # ()### Analytics
#### [Bostrom Revenue and Price Model](revenue_model.ipynb)
#### [Liquidity of Pools Related with Bostrom and Space-Pussy](pools_liquidity_in_gh.ipynb)
#### [Search the Best Arbitrage in Bostrom, Osmosis and Space-Pussy Pools](search_arbitrage.ipynb)
#### [Bostrom and Space-Pussy Swap Optimization. Finding the Best Way to Swap Coins](swap_optimization.ipynb)
#### [Bostrom and Space-Pussy Deposit Calculation for a direct transaction](deposit_calculation.ipynb)
it's usually more convenient to use the [cyb.ai](https://cyb.ai/warp/add-liquidity)### Get Data
#### Pools Data
```python
from src.data_extractors import get_pools, get_prices, get_price_enrichedpools_df = get_pools(networks=['bostrom', 'space-pussy', 'osmosis', 'crescent'], bostrom_related_osmo_pools=None)
```
#### Direct Prices
```python
price_df = get_prices(pools_df=pools_df)
```
#### Enriched Prices
```python
price_df = get_price_enriched(price_df=price_df, base_coin_denom='uosmo')
```### How to start
you should have [python](https://www.python.org/downloads/) version 3.9, 3.10 or 3.11, check it
```bash
python --version
```
clone repo
```bash
git clone https://github.com/Snedashkovsky/cyber-arbitrage && \
cd cyber-arbitrage
```
install [jupyter notebook](https://jupyter.org/install)
```bash
pip install notebook
```
install python requirements
```bash
pip install -r requirements.txt
```
run jupyter notebook
```bash
jupyter notebook
```