Defi Made Here
First of all, oracle-based perp DEXes/lending are always a subject to market manipulations.
They need to use a number of risk parameters set by the DAO or risk management service providers to reduce the risks but most of the time "we live, we learn".
@dYdX
decided to increase the initial margin for long-tail assets which is not the most optimal solution. There are a few other ways to mitigate similar issues to $YFI used by other perp DEXes.
The most obvious one is the Max OI per trading pair. This would have prevented the attacker from building a big short position on an illiquid coin.
Perps like @GMX_IO
v2 @synthetix_io
@perenniallabs
@Aark_Digital
and others are trying to keep LPs DN by incentivizing (funding fee, positive slippage, etc) the same long and short exposure for every token. This way LPs have exposure only to the imbalance between long and short OIs.
@GainsNetwork_io
has the maximum profit on a trade set to 900% PnL. I would say it is less efficient but combined with Max OI it also protects the LPs.
To avoid insolvency risks and forced liquidations, @chromatic_perp
decided to integrate predetermined TP/SL. It allows the protocol to remove an insurance fund and thereby save costs.
Trades on @symm_io
are always matched against each other so there is no risk of the protocol going bankrupt. Risk parameters are set by each market maker individually.
Exchanges like @GearboxProtocol
and @Contango_xyz
are not exactly perp trading DEXes but margin trading. This means that there is no risk of insolvency since traders are using spot DEX liquidity. They can only open as big a position as there is on-chain liquidity available.
The above examples are not LOB perp DEXes so they have more flexibility in managing the risks but simple Max OI could have saved dYdX millions.