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

Possible DoS attack in SingleTokenJoin.sol #132

Closed
code423n4 opened this issue Dec 19, 2021 · 1 comment
Closed

Possible DoS attack in SingleTokenJoin.sol #132

code423n4 opened this issue Dec 19, 2021 · 1 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

Comments

@code423n4
Copy link
Contributor

Handle

p4st13r4

Vulnerability details

Impact

An attacker can perform a DoS attack by sending a small quantity of outputToken on SingleTokenJoin. Affected code is at https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/singleJoinExit/SingleTokenJoin.sol#L134

More details: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities

Tools Used

Editor

Recommended Mitigation Steps

Possible mitigation: Consider renaming outputAmount to minOutputAmount and changing the require to:

require(minOutputAmount >= _joinTokenStruct.outputAmount, "FAILED_OUTPUT_AMOUNT")
@code423n4 code423n4 added 3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working labels Dec 19, 2021
code423n4 added a commit that referenced this issue Dec 19, 2021
@loki-sama loki-sama added the duplicate This issue or pull request already exists label Dec 22, 2021
@loki-sama
Copy link
Collaborator

loki-sama commented Jan 3, 2022

duplicate #81

@ghost ghost closed this as completed Jan 10, 2022
@0xleastwood 0xleastwood added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value and removed 3 (High Risk) Assets can be stolen/lost/compromised directly labels Jan 18, 2022
This issue was closed.
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
Projects
None yet
Development

No branches or pull requests

3 participants