Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max short cleanup #193

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
2 changes: 1 addition & 1 deletion crates/hyperdrive-math/src/long/close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ mod tests {
use super::*;

#[tokio::test]
async fn fuzz_calculate_close_long_flat_plus_curve() -> Result<()> {
async fn fuzz_sol_calculate_close_long_flat_plus_curve() -> Result<()> {
let chain = TestChain::new().await?;

// Fuzz the rust and solidity implementations against each other.
Expand Down
2 changes: 1 addition & 1 deletion crates/hyperdrive-math/src/short/close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl State {
// calculate the proceeds as the sum of the trading proceeds, the
// interest proceeds, and the margin released.
if total_value > share_amount {
// proceeds = (c1 / c0 * c) * dy - dz
// proceeds = (c1 / c0 + phi_f) * dy/c - dz
total_value - share_amount
} else {
fixed!(0)
Expand Down
Loading
Loading