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

High-volume fuzz testing #253

Closed
Tracked by #539
jalextowle opened this issue May 24, 2023 · 4 comments
Closed
Tracked by #539

High-volume fuzz testing #253

jalextowle opened this issue May 24, 2023 · 4 comments
Assignees

Comments

@jalextowle
Copy link
Contributor

Getting from 95% confidence to 99.99% confidence in Hyperdrive's accounting logic is a group effort among the protocol team, auditors, and formal verification experts. One of the best ways for us to contribute to this effort is building a fuzzing system that will run significant volume through an internal Hyperdrive testnet, so that we can simulate mainnet-like volumes and monitor the testnet for failures.

This initial task should involve writing MVP fuzzing bots, adding them to our infrastructure (most likely in the form of a docker-compose file), and testing them on an isolated internal testnet. We probably want an environment that is dedicated to these fuzz-bots to ensure that they don't interfere with testing of the trading bots or the Hyperdrive UI.

@jalextowle jalextowle self-assigned this May 24, 2023
@jalextowle jalextowle added this to the Testing milestone May 24, 2023
@jalextowle
Copy link
Contributor Author

jalextowle commented Aug 16, 2023

Some invariants that we should fuzz include:

  • total shares = share reserves + shorts outstanding/c + _governanceFeesAccrued + _withdrawalPool.proceeds + epsilon
  • the system should always be solvent
  • trades are never executed with negative interest rates
  • longs and shorts should always be closed at maturity for the correct amounts (this is easy to check)

@jalextowle
Copy link
Contributor Author

Another invariant to include is that "negative interest mode" should never be switched on if the variable rate is non-negative. This will ensure that we're using a safe tolerance.

@jrhea
Copy link
Contributor

jrhea commented Nov 27, 2023

Now tracking all system invariants in #534

@jalextowle
Copy link
Contributor Author

Closing this since this is covered by other issues in the agent0 repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants