TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: medium
Invalid

Invalid Solidity Syntax in `startAuction()`

Summary

DaiGoldAuction.sol: 116

The syntax in the function provided is not valid Solidity. In Solidity, you cannot assign multiple values in a single statement like that. If you try to use this:uint256 epochId = _currentEpochId = _currentEpochId + 1;, the code will not compile.

Vulnerability Details

The reverting of this function will lead to failure to start auction. Functions that depend on the epoch ID might behave unpredictably, causing logic errors that could be exploited.

Impact

If the epoch ID is not updated correctly, it could lead to the wrong epoch being referenced throughout the contract.

Tools Used

Manual Review

Recommendations

uint256 epochId = _currentEpochId + 1;

_currentEpochId = epochId;

Updates

Lead Judging Commences

inallhonesty Lead Judge
12 months ago
inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.