delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
26 stars 3 forks source link

Bump tolerance for `fuzz_calculate_spot_price_after_short` #939

Closed ryangoree closed 4 months ago

ryangoree commented 4 months ago

Description

The fuzz_calculate_spot_price_after_short test was intermittently failing with it's current tolerance of fixed!(1e10). This PR bumps it to fixed!(1e11).

[[Reviewer Name]]

Rust

mcclurejt commented 4 months ago

any idea as to why this started happening?

dpaiton commented 4 months ago

any idea as to why this started happening?

I think 1e11 (aka correct up to the 8th decimal) is pretty reasonable given that the spot price itself is an approximation of the realized price for a non-infinitesimal trade size.

That being said, AFAIK this was not failing before the latest flurry of activity in the rust part of the repo. I'm going to approve to unblock other PRs from landing with this failing, but I think we should keep it in mind in case we start seeing more failures.

ryangoree commented 4 months ago

That being said, AFAIK this was not failing before the latest flurry of activity in the rust part of the repo.

Because the test added in the flurry #919

dpaiton commented 4 months ago

I absorbed this PR into https://github.com/delvtech/hyperdrive/pull/938 so that we could have both fixes in one PR and CI would pass. Closing this PR.