Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOY Arb Hummingbot #5181

Open
5 tasks done
ignazio-bovo opened this issue Aug 8, 2024 · 0 comments
Open
5 tasks done

JOY Arb Hummingbot #5181

ignazio-bovo opened this issue Aug 8, 2024 · 0 comments
Assignees

Comments

@ignazio-bovo
Copy link
Contributor

ignazio-bovo commented Aug 8, 2024

  • Adapt amm_arb to accomodate only taker order on Uniswap (first market) ~ 2hrs
  • Parameters adjustment ~ 2 hr
  • Build Errors ~ 2 hrs
  • update parameters
  • 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.

@ignazio-bovo ignazio-bovo converted this from a draft issue Aug 8, 2024
@ignazio-bovo ignazio-bovo self-assigned this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant