Joystream / Joystream/joystream

JOY Arb Hummingbot

Open
#5,181 0 comments 0 reactions 1 assignee Claimed by @dobertRowneySr View on GitHub
argo-bridge
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

- [x] Adapt `amm_arb` to accomodate only taker order on Uniswap (first market) ~ 2hrs
- [x] Parameters adjustment ~ 2 hr
- [x] Build Errors ~ 2 hrs
- [x] update parameters
- [x] Deployment consideration

# Parameters

| Property | Description | Type | Default |
|----------|-------------|------|---------|
| strategy | Strategy name | string | "amm_joy_arb" |
| amm_connector | DEX connector | string | Uniswap on Base |
| amm_market | Token trading pair for AMM | string | $JOY/$USDT |
| cex_connector | CEX connector | string | MEXC |
| cex_market | Token trading pair for CEX | string | $JOY/USDT |
| pool_id | Pool ID to interact with on the DEX | string | "" |
| order_amount | Amount of base asset per order | decimal | None |
| min_profitability | Minimum profitability for trade (%) | decimal | 1% |
| amm_slippage_buffer | Buffer for slippage on AMM orders (%) | decimal | 1% |
| debug_price_shim | Enable debug price shim for tests | boolean | False |
| gateway_transaction_cancel_interval | After what time should blockchain transactions be cancelled if they are not included in a block | integer | 600 secs = 10 mins |
| rate_oracle_enabled | Use rate oracle | boolean | True |
| quote_conversion_rate | Fixed rate to convert quote assets | decimal | 1 |

## Notes
- To speed up implementation we deliberately choose MEXC as reference CEX for price data

## Deployment consideration

### Order size
A small order size at the beginning is necessary to mitigate operational risks. This is also what JSG is doing.
We will start the deployment with very low trade size. On uniswap v3 is possible to do an arbitrarely small size. The gas fees (on Base) are very low as well (https://basescan.org/chart/gasprice)
When you submit an order on Uniswap your total size in usd is partly eroded by pool fees and gas fees that have total cost
`total_cost_usd = gas_fee_usd + pool_fee * order_value_usd` and your net profit is `net_profit = order_value_usd - total_cost_usd `. Applying the constraint of `net_profit = min_profitability * order_value_usd`, with `pool_fee = 3%`, `gas_fee_usd = 0.004 USD` and `min_profitability = 1%` you get `order_value_usd = 0.00417 USD` as a minimum baseline

### Trade frequency
At most one trade every 30s, this frequency is copied from JSG deployment rules of thumb.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.