Skip to content

Conversation

@pmckelvy1
Copy link

This pr adds a simple test that (somewhat) fuzzes users depositing to and withdrawing from the comet (cUSDCv3) Wrapper. It does this in 2 steps.

  1. Loop over n users k times depositing or withdrawing random amounts each time.
  2. Withdraw all user balances to 0.

After each step the test will print statistics on the user balances and the wrapper balance of cUSDCv3.

The output at the end can tell us whether or not there are discrepancies in the dust that gets deposited / withdrawn. If the tests fail due to over/underflow errors, this can also be indicative of issues with the internal accounting logic of the wrapper.

More work is needed to integrate mint/redeem functionality, but it would not take long and i think that it would be worth it.

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