Spot Hedge Maker
Last updated
Last updated
Liquidity provision is whitelisted until initial beta testing has completed
Spot hedge maker model is based on Hot Tub, vaults developed by Perpetual Protocol during 2022-2023. Spot hedge maker vaults are divided into Base (asset token, e.g. ETH, BTC) and Quote (settlement token, e.g. USDT) vaults.
The basic concept is that all taker trades made via this vault on the perpetual futures DEX are automatically hedged using tokens purchased on spot markets. So if a trader on Perp v3 opens a 1 ETH long, thus creating a 1 ETH short for the maker, the vault will automatically buy 1 ETH on spot markets to hedge the maker's position. The futures trade and the spot hedge occur atomically.
Requests to fill an order (fillOrder()
) should be made via the Order Gateway.
Each vault accepts liquidity deposits in one base asset (e.g. ETH, BTC), so each market has a distinct vault.
Base vault sells an equal amount of base asset to hedge the maker's long.
Base vault buys an equal amount of base asset to hedge the maker's long.
Liquidity providers receive shares (similar to LP tokens) representing their stake in the liquidity pool. Shares must be redeemed to withdraw funds from the vault.
Quote maker vaults are not currently available and will launch at a future date.
Quote vaults work the same way as base vaults, but in reverse. Each vault accepts liquidity deposits in one quote asset (e.g. USDT), so each market has a distinct vault.
Maker will stop filling orders if risk thresholds are reached. When called, fillOrderCallBack()
will check minMarginRatio
to ensure it is above the set threshold.
For details, see Circuit Breaker.
fillOrderCallBack()
In many instances, a maker must withdraw funds from the vault to execute a spot trade. This is managed using the fillOrderCallBack()
function and is currently executable by whitelisted users only.