ConfigTimeLockController will put QuantConfig in a stalemate (rendering it unusable)
The timelock controller allowed its minimum delay to be set to an arbitrary value up to the maximum uint256, so a very large delay could be configured. This could leave the QuantConfig contract unable to apply any further changes to its stored values and addresses.
Submitted by 0xmint
The QuantConfig contract has these important setters, setProtocolAddress(), setProtocolUint256, setProtocolBoolean() and setProtocolRole(). This contract is subjected to a timelock before all such processes above are executed. But, the issue arises in the fact that in configTimeLockController, the state variable minimum delay can be set to an arbitrary value, up to type(uint256).max(cannot assume what value will be set) and could potentially render the QuantConfig contract unusable . All the previous values and addresses would not be able to be changed because of a very high delay being set:
ConfigTimelockController.sol#L28
I discussed with one of the devs about the use of this specific mapping :
After discussions with one of the devs(#0xca11.eth) , it was understood that these values are for the rollaOrderFee which is a part of their limit order protocol contract(outside of the scope of the contest) but given the argument above, its configuration will be severely impacted (old percentage fees won’t be able to be changed).Rolla limit order protocol depends on this configuration setting within QuantConfig.
Recommended Mitigation Steps
It is recommended that a constant be declared with a MAXIMUM_DELAY and whatever ‘minimum delay’ that is set thereafter should be below this value since there’s another function setDelay () which can also be of high arbitrary value:
require(minimum delay ≤MAXIMUM_DELAY, “ too high”)
0xca11 (Rolla) confirmed, resolved, and commented:
Both the ConfigTimeLockController and QuantConfig contracts were removed from the protocol.
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
Impact
The QuantConfig contract could become unusable, with existing values and addresses unable to be changed, which would also affect the fee configuration relied on by the limit order protocol.
What the attacker needed
Ability to set the timelock delay
The fix
The report recommends declaring a maximum delay constant and requiring the minimum delay to stay below it; the team said both contracts were removed from the protocol.
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.
A timelock is a contract that makes changes wait a set period before they take effect, giving people time to react. Here the waiting period could be set to an enormous number, so any later change would effectively never happen and the configuration contract would be stuck. The report notes the fee settings used by the related order protocol would then be frozen too.
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.