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

fix: Audit fixes for Staking pool and batch nxm withdrawals #1213

Conversation

rackstar
Copy link
Contributor

@rackstar rackstar commented Aug 19, 2024

Context

Closes #1209

Audit doc

There are 2 informational comments that we decided not to address, these are both on temporary functions that will be deprecated shortly after executing:

  • Index out of bounds - adding validation here merely transforms "index out of bounds" error to a nicer message. Moreover, we would have fork tests to ensure that we pass the correct parameters so this error should not happen when we invoke it on main-net
  • Custom Errors - it should be inconsequential if we keep it as requires specially since it will be deprecated shortly after.

Changes proposed in this pull request

Test plan

Add unit tests on all fixes

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

@rackstar rackstar force-pushed the audit/fix-staking-pool-batch-nxm-withdrawals branch from 5e4901d to 2f01849 Compare August 19, 2024 10:02
@rackstar rackstar self-assigned this Aug 19, 2024
@rackstar rackstar added the audit label Aug 19, 2024
@rackstar rackstar force-pushed the audit/fix-staking-pool-batch-nxm-withdrawals branch from 2f01849 to 7a120f5 Compare August 19, 2024 10:38
@rackstar rackstar changed the title Audit/fix staking pool batch nxm withdrawals fix: Audit fixes for Staking pool and batch nxm withdrawals Aug 19, 2024
@rackstar rackstar force-pushed the audit/fix-staking-pool-batch-nxm-withdrawals branch from 59cf75d to e62eed0 Compare August 19, 2024 13:03
@roxdanila roxdanila linked an issue Aug 20, 2024 that may be closed by this pull request
@rackstar rackstar changed the base branch from fix/reward-shares to audit/staking-pool-fixes-and-batch-withdrawal August 20, 2024 09:00
@rackstar rackstar merged commit e62eed0 into audit/staking-pool-fixes-and-batch-withdrawal Aug 20, 2024
6 checks passed
@rackstar rackstar deleted the audit/fix-staking-pool-batch-nxm-withdrawals branch August 20, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit review - Staking Pool fixes + batch NXM withdrawals
1 participant