-
Notifications
You must be signed in to change notification settings - Fork 84
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
L-01 Duplicate Strategy Assets Can Be Passed to _withdraw #1913
L-01 Duplicate Strategy Assets Can Be Passed to _withdraw #1913
Conversation
@@ -157,6 +158,14 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy { | |||
strategyAmount | |||
); | |||
|
|||
/* This check is triggered when the _deposit is unexpectedly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't need the word "unexpectedly" here.
@@ -300,6 +309,14 @@ contract BalancerMetaPoolStrategy is BaseAuraStrategy { | |||
if (poolAssetAmount > 0) { | |||
strategyAssetsToPoolAssetsAmounts[i] = poolAssetAmount; | |||
|
|||
/* This check is triggered when the _withdrawal is unexpectedly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, don't need "unexpectedly"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can merge, will verify when integrated.
…/L-01-duplicate-assets
e0005ec
into
sparrowDom/balancer-composable-st-pool
This PR adds a check so withdrawal with duplicate assets can not be called. Currently, the deposit with duplicate assets can not be called (contract API doesn't support it) but a future proof check is still added (with a test) to validate duplicate asset deposit calls can also not be made.
Audit comments:
The array arguments passed to
_withdraw
are not validated to ensure that they containunique assets. If, in a future extension, it becomes possible to pass duplicates (either due to
user or strategist input), the following impacts may occur:
Consider enforcing that poolAssetsAmountsOut[..] is 0 before setting its value.