We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pub struct JitParams { pub taker_order_id: u32, pub max_position: i64, pub worst_price: u64, pub post_only: Option<PostOnlyParam>, }
jit params could include
max_base_per_fill
spot_market_index
perp_market_index
spot_hedge_factor
for a specific taker_order, you can calculate the maker_base_asset_amount (based on the taker unfilled + position/trade constraints)
maker_base_asset_amount
inspect the current spot token amount and perp position base amount
spot token amount
perp position base amount
on each jit crank:
(spot token amount * spot_hedge_factor)
begin_swap
end_swap
the worst thing that can happen:
example: SOL-PERP maker who hedges with mSOL
spot_hedge_factor=1/1.112
17.8 * 1/1.112
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jit params could include
max_base_per_fill
: as a mitigation for high swap price impactspot_market_index
: spot market legperp_market_index
: perp market legspot_hedge_factor
: multiplier for acceptable fill price on hedge legfor a specific taker_order, you can calculate the
maker_base_asset_amount
(based on the taker unfilled + position/trade constraints)inspect the current
spot token amount
andperp position base amount
on each jit crank:
(spot token amount * spot_hedge_factor)
vsperp position base amount
+maker_base_asset_amount
begin_swap
+end_swap
for "SPOT"/USDC pair (up tomaker_base_asset_amount
s.t. it closes this gap)spot_hedge_factor
maker_base_asset_amount
, otherwise failthe worst thing that can happen:
example: SOL-PERP maker who hedges with mSOL
spot_hedge_factor=1/1.112
) mSOL -> USDC @ $17.817.8 * 1/1.112
, fulfill 1 SOL-PERP longThe text was updated successfully, but these errors were encountered: