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

SpeedBumpPriceGate.sol has high likelyhood of overcharging buyer during decay phase #144

Closed
code423n4 opened this issue May 8, 2022 · 2 comments
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/SpeedBumpPriceGate.sol#L79

Vulnerability details

Impact

Contract overcharges user

Proof of Concept

L79 passes through the entire ether balance sent. Since price decays each block it is likely that the transaction won't be processed during the same block that it was submitted. In situations like this the price at transaction confirmation will be lower (due to decay) than the amount of ether sent

Tools Used

Recommended Mitigation Steps

passThruGate should only take calculated price and should either return excess or allow excess to be claimed using a separate refund function

@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 8, 2022
code423n4 added a commit that referenced this issue May 8, 2022
@illuzen
Copy link
Collaborator

illuzen commented May 11, 2022

duplicate #48

@illuzen illuzen closed this as completed May 11, 2022
@illuzen illuzen added the duplicate This issue or pull request already exists label May 11, 2022
@gititGoro
Copy link
Collaborator

User funds lost: increasing severity.

@gititGoro gititGoro added 3 (High Risk) Assets can be stolen/lost/compromised directly and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 (High Risk) Assets can be stolen/lost/compromised directly bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants