Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

JOY Arb Hummingbot #5181

Open ignazio-bovo opened 1 month ago

ignazio-bovo commented 1 month ago

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

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.