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

Add a checkpoint module to hyperdrive-math #23

Open
jalextowle opened this issue Mar 19, 2024 · 2 comments
Open

Add a checkpoint module to hyperdrive-math #23

jalextowle opened this issue Mar 19, 2024 · 2 comments

Comments

@jalextowle
Copy link
Contributor

One of the current limitations of the Rust SDK is that it doesn't simulate checkpoints. This means that when the Rust SDK is used to run a simulation at a checkpoint boundary before a new trade has been made, the result could be very inaccurate. The best version of the Rust SDK would simulate the application of checkpoints by replicating the checkpointing logic and the distribute excess idle calculation.

@jalextowle jalextowle changed the title Consider adding a checkpoint module to hyperdrive-math Add a checkpoint module to hyperdrive-math Apr 19, 2024
@ryangoree ryangoree transferred this issue from delvtech/hyperdrive May 1, 2024
@dpaiton
Copy link
Contributor

dpaiton commented Sep 13, 2024

This ideally would also need to account for auto-closing positions & zombie interest

@jalextowle
Copy link
Contributor Author

Yeah, that was the idea behind this issue. Checkpointing accounts for matured positions (you could call this auto-closing), zombie interest, and it distributes excess idle to the withdrawal pool. Here is the checkpoint function in Solidity for context: https://github.com/delvtech/hyperdrive/blob/main/contracts/src/internal/HyperdriveCheckpoint.sol

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