From cf01c6ebe2d1d68fdc0ebaa313e8079f4342fbac Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 16 Dec 2024 14:30:08 -0800 Subject: [PATCH] fixup comment --- crates/hyperdrive-math/src/short/max.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/hyperdrive-math/src/short/max.rs b/crates/hyperdrive-math/src/short/max.rs index b77df22e..36d39fb9 100644 --- a/crates/hyperdrive-math/src/short/max.rs +++ b/crates/hyperdrive-math/src/short/max.rs @@ -55,8 +55,13 @@ impl State { /// Calculate the long exposure minus the checkpoint exposure, in shares. /// - /// This is a useful number when working with shorts because they reduce the - /// total exposure. However, in general this is not the same as the total + /// The long exposure will account for any executed trades. Any new short + /// net previous longs by subtracting from the long exposure. This increases + /// solvency until the checkpoint exposure goes negative. Past that point, + /// shorts will impact solvency by decreasing share reserves. + /// + /// This function is useful when working with shorts because it converts + /// a piece-wise linear calculation into a linear one by computing the net /// exposure. fn long_minus_checkpoint_exposure_shares( &self,