Useless Modifier and Bad Assumptions in Constructor
The report claims a useless modifier in an empty constructor and a bad assumption that the block time remains constant, which could cause functions like readInstantaneousReserves to work incorrectly if the block time changes. The judge increased severity to Medium, but the project acknowledged the first item as a duplicate QA report and the second as a duplicate of another issue.
Submitted by erebus
Useless modifier in consructor here (even the constructor is empty, just why the modifier there, it makes no sense)
Proof of Concept
Bad assumptions to calculate the number of block passed here. BLOCK_TIME is an immutable variable which is passed as a parameter to the constructor. However, with future updates to the Ethereum protocol (IDK, reth or other validation algorithm) which could reduce that number would mean that functions dependant on that to work incorrectly like readInstantaneousReserves or _readCumulativeReserves.
Mitigation Steps
Do not assume the block rate to remain constant in the future or implement some function that modifies the BLOCK_TIME every T seconds/minutes/whatever.
alcueca (Judge) increased severity to Medium
publiuss (Basin) acknowledged and commented
First QA item is acknowledged. The modifier is there to initialize the
ReentrancyGuardcontract. Imo, its cleaner to have an empty constructor than to have no constructor and have the user realize that it uses theReentrancyGuardmodifier by defualt. This item is a duplicate of other QA reports.
Second QA item is a duplicate of: #176. See comment on issue for remediation status.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code assumes a constant block time and includes an unnecessary modifier on an empty constructor.
Impact
If the block time changes, functions like readInstantaneousReserves could work incorrectly, but the report does not specify a concrete exploit.
What the attacker needed
None
The fix
The report suggests not assuming a constant block rate or implementing a function to update BLOCK_TIME periodically, but the project acknowledged the issues as duplicates and did not state a fix.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report points out two things in a smart contract: a modifier (a special function that runs before others) placed on an empty constructor, which seems unnecessary, and an assumption that the time between blocks will never change. If the block time changes, functions that rely on it might give wrong results.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.