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

Rejected transaction with successful preview #1593

Closed
slundqui opened this issue Jul 3, 2024 · 1 comment · Fixed by #1595
Closed

Rejected transaction with successful preview #1593

slundqui opened this issue Jul 3, 2024 · 1 comment · Fixed by #1595
Assignees

Comments

@slundqui
Copy link
Contributor

slundqui commented Jul 3, 2024

There seems to be an issue with openLong on steth pools where a preview is successful, but the transaction itself is rejected with status == 0. To reproduce, run python scripts/local_fuzz_bots.py --steth --rng-seed 2405590. On this seed, here is the series of events that happened:

  • On block 36, we preview a call for openLong. The preview is successful and returns a bondProceeds amount.
  • We submit the transaction on block 36. The transaction gets rejected with status == 0. The submitted transaction advances the block to block 37.
  • We try previewing the call again on block 37, and the preview is rejected with InsufficientLiquidity.

We expect the preview on block 36 to fail.

Note that while this was tested with an explicit seed, this issue persists in fuzz testing regardless of seed.

@slundqui
Copy link
Contributor Author

slundqui commented Jul 3, 2024

Solved, the issue is that the preview on block 36 should be a preview to the pending block, as the preview technically is lagging behind a block.

@slundqui slundqui self-assigned this Jul 3, 2024
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

Successfully merging a pull request may close this issue.

1 participant