mango-v4/programs
Christian Kamm 6ea7eddcb3
Compute health based on two prices (#298)
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.
2022-11-21 15:01:10 +01:00
..
mango-v4 Compute health based on two prices (#298) 2022-11-21 15:01:10 +01:00
margin-trade Upgrade to Solana 1.10.35 (#291) 2022-11-16 10:50:40 +00:00