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

Erroneous liquidity data could be added to BalLiquidityProvider #90

Closed
code423n4 opened this issue May 17, 2022 · 3 comments
Closed

Erroneous liquidity data could be added to BalLiquidityProvider #90

code423n4 opened this issue May 17, 2022 · 3 comments
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.dev/code-423n4/2022-05-aura/blob/a8758161373bc9c9ad2aec363b511afa3ed0613f/contracts/BalLiquidityProvider.sol#L52

Vulnerability details

Impact

In the comment of the method provideLiquidity it said, but erroneous data could be added.

Provides liquidity on behalf of the dao, in a non-custodial manner.
Has protections in place to ensure that no erroneous liquidity data gets added.

Proof of Concept

The unique check of the assets is:

require(asset == address(startToken) || asset == address(pairToken), "!asset");

Therefore, the token in the first position is not checked to be the same as the token in the last position, if the tokens are repeated, all constraints will be bypassed.

Looking in the MockBalancerVault logic, it will be added as liquidity, only taking care about the balance of one token.

Source code:

Recommended Mitigation Steps

Check that _request.assets[0] != _request.assets[1]

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels May 17, 2022
code423n4 added a commit that referenced this issue May 17, 2022
@0xMaharishi 0xMaharishi added disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels May 25, 2022
@0xMaharishi
Copy link

This might cause the tx to fail but it wouldn't cause any assets to get locked or for any funds to go missing so would be a 1 severity at most

@0xMaharishi 0xMaharishi added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label May 30, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jun 20, 2022

Agree with sponsor. This is a QA issue.

@dmvt dmvt added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jun 20, 2022
@dmvt
Copy link
Collaborator

dmvt commented Jul 8, 2022

Grouping this with the warden’s QA report, #83

@dmvt dmvt closed this as completed Jul 8, 2022
@dmvt dmvt added the duplicate This issue or pull request already exists label Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants