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

Echidna tests #30

Closed
wants to merge 1 commit into from
Closed

Echidna tests #30

wants to merge 1 commit into from

Conversation

beirao
Copy link
Contributor

@beirao beirao commented Nov 28, 2023

Full invariant testing with Echidna on the Reliquary contract.

@beirao
Copy link
Contributor Author

beirao commented Nov 28, 2023

I tested all these invariants with Echidna:

  • A user should never be able to withdraw more than deposited.
  • No position.entry should be greater than block.timestamp.
    - The sum of all position.amount should never be greater than total deposit.
  • The sum of balances in levels should never be greater than total deposit.
  • All arrays defining pools should be equal in size.
  • The sum of all allocPoint must be equal to totalAllocpoint.
  • The total reward harvested and pending should never be greater than the total emission rate.
  • emergencyWithdraw should burn position rewards.
  • A position amount should never be greater than the level.balance deposited at the position level.

@beirao beirao changed the title echidna tests Echidna tests Nov 28, 2023
@beirao
Copy link
Contributor Author

beirao commented Nov 29, 2023

If anyone has ideas for other invariants, I can implement them quickly. Just send them in English here.

@beirao beirao closed this Mar 28, 2024
@beirao beirao deleted the echidna branch March 28, 2024 09:18
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