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

test: pyth updates #9

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

Reinis-FRP
Copy link

This test demonstrates that it is possible to empty honeypot after the second Pyth update even if the last update was not unlocked.

As can be seen from debug console in failing test results, bounded union source adapter backed Oval returns earlier Chainlink price at liquidation that newer Pyth price that was used when creating the position:

Running 1 test for test/HoneyPot.sol:HoneyPotTest
[FAIL. Reason: call did not revert as expected] testCannotEmptyLockedPythUpdate() (gas: 2089182)
Logs:
  Price at honeyPot creation: 183600389683, @1698137447
  Price at honeyPot empty: 181782564043, @1698136763

Signed-off-by: Reinis Martinsons <[email protected]>
Signed-off-by: Reinis Martinsons <[email protected]>
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 this pull request may close these issues.

1 participant