Skip to main content

Customizable Strategy Parameters

Strategy customization is a crucial aspect of Market Maker Pool management, serving as the cornerstone of effective market making. Understanding different market conditions and outlooks allows us to classify strategies into three broad categories: bullish, bearish, and neutral. Furthermore, considering fee tiers, price spreads, and other parameters, strategies can be broadly categorized as radical, conservative, or neutral. To facilitate strategy selection, Jungle Exchange offers nine customizable templates for pool creators during the pool creation process.


Price Spread

Price spread, also known as the bid-ask spread, represents the difference between bid and ask prices for the same asset. In Jungle Exchange, where market prices are derived from blockchain oracles, spreads are not inherently present. However, to incentivize market making, we introduce price spread as a configurable parameter within the pool strategy. Pool owners can adjust bid and ask spreads dynamically based on market conditions.

For a trader opening a long BTC position, all Market Maker pools offer their ask price (pap_a). Similarly, for a short BTC position, pools provide bid price (pbp_b). With oracle price (pop_o) and bid-ask spread (sas_a and sbs_b), we have:


pa=po+sapb=po+sbp_a = p_o + s_a p_b = p_o + s_b

Alternatively, spreads can be represented as percentages (sa%s_a\% and sb%s_b\%), yielding:


pa=po×(1+sa%)pb=po×(1+sb%)p_a = p_o \times (1 + s_a\%) p_b = p_o \times (1 + s_b\%)

The order matching engine of Jungle Exchange then determines the best price for each trade based on these parameters.


Trading Fee Tier

Trading fees play a pivotal role for both traders and market makers. Jungle Exchange adjusts trading fee tiers according to market conditions and volatility. Market makers select appropriate fee rates within a certain range based on their pool strategy. Higher trading fees may be desirable for low-risk strategies, as they result in less competitive prices and lower frequency of order matching.

The trading fee (ftf_t) is calculated as follows:


TradingFee=PositionSize×Price×ft\text{TradingFee} = \text{PositionSize} \times \text{Price} \times f_t

Fee rates are categorized into OPEN/CLOSE and MAKER/TAKER, resulting in four trading fee tiers: OPEN MAKER, OPEN TAKER, CLOSE MAKER, and CLOSE TAKER.


Close Position Condition

Close position conditions enable market makers to manage their positions autonomously. Initially, Jungle Exchange provides two parameters: Take-Profit (TP) and Stop-Loss (SL). Setting a take-profit parameter of 0.1% for a liquidity pool, for instance, triggers position closure when profits reach this threshold. Similarly, stop-loss conditions mitigate loss risks by closing positions under predefined circumstances. Notably, position closure requires confirmation from a matching order and is only available to pool owners.


Other Parameters

In addition to fundamental parameters like price range, order direction, leverage, and position mode, Jungle Exchange allows pool creators to define trading strategies comprehensively. Transparency is ensured as all configured strategies are publicly accessible, subject to scrutiny from all participants. To address security concerns inherent in decentralized finance (DeFi), Jungle Exchange implements rigorous security measures including audits, multi-signature functionality, bug bounties, and comprehensive API documentation for real-time strategy adjustments and automated trading.