Illiquid Market TWAP
Price Oracles are only called in case of price disputes, liquidations, and market close after a counterparty stops responding to limit orders.
Oracle delay is not an issue there, so we take advantage of historical prices for a better hedger experience.
For PIO hedgers, the biggest risk is the discontinuity of a trade, while collateral requirements IM and DF are made to cover 99.5% of the cases, leaving some risk of loss.
TWAPs allow the hedger to smooth their exit without the high spread & market impact that would create a sudden market order.
TWAP OTC Price:
A sends tx on-chain from block timestamp TWAP record start and sets an end date.
Proxies record the TWAP over the period on the asset and store it as a TWAP ID.
At the end of the period + a time buffer, A calls the oracle networks who call each proxy and agree on the TWAP result.
TWAP Optimized for Hedging
Applications with the need for instant trade can use a form of repo which is the equivalent of an instant exit of an optimistic rollup, where if B wants an instant exit, A can buy their positions with a haircut at a price defined as profitable to exit on the TWAP.
Variable TWAP: To make sure the hedger can exit without loss on any market, especially illiquid ones, the TWAP proxy has a deterministic oracle, where in case of too much volatility, the TWAP length is made longer, allowing the hedger to exit on each TWAP tick with less collateral.
As the hedger knows in advance the future result of the TWAP, they know the collateral amount to exit on each tick based on (n - t) volatility ticks. A too-large transaction will exhaust all market orders, making it crash, so our goal here is to send regular small transactions to not affect the market.
If there is volatility, this means the hedger or someone else sends too big transactions, and so we make the TWAP longer to allow the hedger to lower their transaction size to only represent a low % of the market volume.
The pricing becomes non-gameable deterministic rules on the hedger exit methods, and the hedger is insured not to lose on exiting even in an extremely low liquid market, solving many cases of illiquid products.
Last updated