Open code423n4 opened 2 years ago
Duplicate of #21 and #80
There is no computation that currently uses mainnetGas price, if you search all contracts you will find no other reference to use this variable. This is a TODO stub, which will be finished and implemented when the Oracle is complete - at which the BLS threshold signature from the nodes will be required to be verified to set the MainnetGasPrice.
Per the sponsor reply, and the fact that the function isn't used for computation, I will downgrade to non-critical
Creating QA Report for warden as judge downgraded issue. Preserving original title: setGasPrice() Can be Called by Anyone
Lines of code
https://github.com/skalenetwork/ima-c4-audit/blob/main/contracts/schain/CommunityLocker.sol#L209-L231
Vulnerability details
Impact
The
setGasPrice()
function is used to configure themainnetGasPrice
andgasPriceTimestamp
on the relevant Schain. While the function would typically perform proper BLS signature verification, this has been commented out and hence any user can call this function to configure the values to any arbitrary amount.Proof of Concept
Tools Used
Manual code review.
Recommended Mitigation Steps
Consider performing the necessary signature verification on this function.