6ea7eddcb3
Now the oracle price and a "safe" price go into the health computation and init health uses the min of both for assets and the max for liabs. This has far-reaching consequences for how serum and perp health need to be computed because many intermediate values depend on the prices, which now differ for init and maint health computations. The biggest change is that the serum3 reservation totals need to be done for each health call from scratch. This PR increases the health CU host per serum3 market and perp market significantly, check the test_health_compute tests. |
||
---|---|---|
.. | ||
mango-v4 | ||
margin-trade |