Open DonDuala opened 1 year ago
When we exercise, the amount of options in the risk manager will reduce. It will just do the opposite of a deposit with at least the delta. Do we need to prevent that from happening and deposit SOL instead?
Exercise triggers 2 things:
We need to explicitly add 2 to the delta calculation when exercise happens
Delta Calc now accounts for spot positions across wallets and on mango.
Manually selling spot tokens on mango will force unwinds of perp positions after a rerun, but we want to poll for balance changes to these accounts as well so it happens immediately.
Auto deposit exercised spot tokens to mango will ensure no liquidation. Cap mango spot positions by notional. We will eventually need spot tokens for downside exercises however
When we exercise DIPs we will not close out our perp position. This overtime can lead to the need to re-balance spot vs perp positions. Example: Upside 100 SOL DIP exercised, we're short 100 SOL-PERP on Mango, now we have 100 SOL to deposit in mango to support the short perp position so the position don't get liquidated. We'll want to sell spot, buy perp with minimal market impact making markets on the less liquid market, taking immediately upon receiving a fill on the other. Requires serum integration via mango