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

Setting Factory.auctionDecrement to zero causes Denial of Service in Auction.settleAuction() #24

Open
code423n4 opened this issue Oct 9, 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 Warden finding sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Handle

pants

Vulnerability details

The function Factory.setAuctionDecrement() allows the owner to set the state variable Factory.auctionDecrement to zero.

Impact

If Factory.auctionDecrement equals zero then the function Auction.settleAuction() will always revert due to a division by zero:

uint256 b = (bondBlock - auctionStart) * BASE / factory.auctionDecrement();

Tool Used

Manual code review.

Recommended Mitigation Steps

Add an appropriate require statement to the function Factory.setAuctionDecrement() to disallow setting Factory.auctionDecrement to zero.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Warden finding labels Oct 9, 2021
code423n4 added a commit that referenced this issue Oct 9, 2021
@frank-beard frank-beard added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Nov 6, 2021
@GalloDaSballo
Copy link
Collaborator

I agree with the finding, because this shows a way to DOS the protocol, given specific conditions, I will raise the severity to medium

@GalloDaSballo GalloDaSballo added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Dec 19, 2021
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 Warden finding 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