Closed artdgn closed 2 years ago
Note: Update SIP-80 once we start implementation on the proportional liquidation fee and margin buffer (for liquidation fee).
Maybe do https://github.com/Synthetixio/issues/issues/363 as part of this.
https://github.com/Synthetixio/synthetix/pull/1594 adds proportional liquidator fee and proportional buffer.
Context: this are the short term tasks that came of a discussion of notion doc on futures liquidations problems and ideas
These improvements should be prioritised to be done before mainnet-OVM launch in order to reduce risk to protocol stakers during periods of high volatility (short term mitigation):
[x] Proportional liquidation fee: Modify the liquidation fee (incentive) to be proportional to position size (instead of current constant fee) in order to incentivize liquidating larger (more risky) position before smaller positions. Should be something like
max(minFee, feePercent * positionSize)
, withfeePercent
being some small percentage (e.g. 1%).[x] Negative margin buffer: Add an additional buffer to liquidation price check to prevent negative margin situation in which protocol stakers pay for the liquidation. Something like
liqPriceBufferPercent
of e.g. 1% that adjusts liquidation price. Another possible alternative is to withold the liquidation fee from margin upon opening, but that would mean that it would need to be updated when price changes - so the percentage calculation may be simpler.[ ]
Multiple past oracle prices check: When checking if position can be liquidated on-chain (e.g. when user is trying to close / update his position) multiple past oracle prices should be checked in order to reduce possibility of closing position that should have been liquidated. Add configurable parameter ofnPastPrices
to check, so that the tradeoff between gas efficiency and risk can be updated with time.