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

BathPair requires absolute trust in strategist with no safeguards #74

Closed
code423n4 opened this issue May 26, 2022 · 2 comments
Closed
Labels
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 duplicate This issue or pull request already exists 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.com/code-423n4/2022-05-rubicon/blob/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/rubiconPools/BathPair.sol#L535-L563

Vulnerability details

Submitting as medium risk bug because it would have to be a whitelisted strategist

Impact

Malicious strategist can steal all user funds

Proof of Concept

TailOff allows strategist to specify both the minimum out and the contract responsible for swapping tokens. Malicious/compromised strategist can easily steal all user funds in contract by referencing malicious _stratUtil and 0 for the hurdle amount or by sandwich attack on legitimate _stratUtil and hurdle of 0

Tools Used

Recommended Mitigation Steps

Limit _stratUtil to whitelisted contract and implement a slippage limit

@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 26, 2022
code423n4 added a commit that referenced this issue May 26, 2022
@bghughes bghughes added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Jun 3, 2022
@bghughes
Copy link
Collaborator

bghughes commented Jun 3, 2022

Strategists are assumed trusted in the current centralized system

@HickupHH3
Copy link
Collaborator

duplicate of #211

@HickupHH3 HickupHH3 added the duplicate This issue or pull request already exists label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 duplicate This issue or pull request already exists 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