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

[Reentrancy patch] Weighted Pool V3 #2205

Merged
merged 13 commits into from
Feb 7, 2023
Merged

Conversation

jubeira
Copy link
Contributor

@jubeira jubeira commented Feb 7, 2023

Description

This PR protects weighted pool functions from read-only reentrancy, and improves docs.
Based on weighted-pool-v3 branch. Note that the base commit of this branch should generate the build info for weighted-pool-v2: 72f3682.

Not to be merged to master. This patch should be enough to generate the build info for weighted-pool-v3.

See https://forum.balancer.fi/t/reentrancy-vulnerability-scope-expanded/4345/1 for reference.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • N/A Tests are included for all code paths
  • The base branch is either master, or there's a description of how to merge

Issue Resolution

N/A

Copy link
Collaborator

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

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

Just shortened some of the comments for clarity.

pkg/pool-weighted/contracts/BaseWeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/WeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/WeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/WeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/BaseWeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/WeightedPool.sol Outdated Show resolved Hide resolved
@EndymionJkb
Copy link
Collaborator

EndymionJkb commented Feb 7, 2023

You can also add manageUserBalance to the MockVault, if that's easier. I did that in the initial patch tests.

Copy link
Collaborator

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

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

Just nits at this point

pkg/pool-utils/contracts/RecoveryMode.sol Show resolved Hide resolved
pkg/pool-weighted/contracts/BaseWeightedPool.sol Outdated Show resolved Hide resolved
pkg/pool-weighted/contracts/WeightedPool.sol Outdated Show resolved Hide resolved
@jubeira jubeira merged commit d9c1c83 into weighted-pool-v3 Feb 7, 2023
@jubeira jubeira deleted the patch/weighted-pool-v3 branch February 7, 2023 18:04
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