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 distribute_excess_idle #17

Merged
merged 6 commits into from
Jun 3, 2024
Merged

Conversation

sentilesdal
Copy link
Contributor

@sentilesdal sentilesdal commented May 1, 2024

Resolved Issues

Description

Adds distribute_excess_idle and all the helpers needed for it. Here's the full list:

  • calculate_distribute_excess_idle
  • calculate_distribute_excess_idle_share_proceeds
  • calculate_distribute_express_idle_withdrawal_shares_redeemed
  • should_short_circuit_distribute_excess_idle_share_proceeds
  • calculate_distribute_excess_idle_share_proceeds_net_long_edge_case
  • calculate_max_share_reserves_delta

explicit tests were added:

  • fuzz_test_calculate_distribute_excess_idle
  • fuzz_test_calculate_distribute_excess_idle_withdrawal_shares_redeemed
  • fuzz_test_should_short_circuit_distribute_excess_idle_share_proceeds
  • fuzz_test_calculate_distribute_excess_idle_share_proceeds_net_long_edge_case

Everything should be covered by the first test, but the others helped me debug along the way.

Review Checklists

Please check each item before approving the pull request. While going
through the checklist, it is recommended to leave comments on items that are
referenced in the checklist to make sure that they are reviewed.

  • Testing
    • Are there new or updated unit or integration tests?
    • Do the tests cover the happy paths?
    • Do the tests cover the unhappy paths?
    • Are there an adequate number of fuzz tests to ensure that we are
      covering the full input space?
    • If matching Solidity behavior, are there differential fuzz tests that
      ensure that Rust matches Solidity?

@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from 48e666b to f4dcf79 Compare May 3, 2024 14:25
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch 3 times, most recently from 85ad5d5 to 6782e2b Compare May 13, 2024 12:51
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from 3c7b7ef to 756b866 Compare May 14, 2024 17:49
@sentilesdal sentilesdal changed the title Add helpers for distribute_excess_idle Add distribute_excess_idle May 14, 2024
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch 2 times, most recently from dd933bd to 72a0da7 Compare May 14, 2024 18:55
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch 2 times, most recently from 49c5b07 to 20a2601 Compare May 22, 2024 18:58
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from 20a2601 to 5b8467c Compare May 22, 2024 20:59
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good. Just a few more comments.

@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from 6ec8427 to 4c0535f Compare May 24, 2024 21:59
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from 4c0535f to ae9d765 Compare June 3, 2024 15:10
@sentilesdal sentilesdal force-pushed the matt/distribute-excess-idle-helpers branch from ae9d765 to a52be1a Compare June 3, 2024 15:47
@dpaiton dpaiton merged commit 6e241a0 into main Jun 3, 2024
8 checks passed
@dpaiton dpaiton deleted the matt/distribute-excess-idle-helpers branch June 3, 2024 16:19
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.

3 participants