Erroneous liquidity data could be added to BalLiquidityProvider #90
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
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.
Proof of Concept
The unique check of the assets is:
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]
The text was updated successfully, but these errors were encountered: