-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Comments
Using magic numbers (hardcoded values) in the code makes it harder to understand and maintain. When a magic number is used, it is not immediately clear what the value represents or why it is being used. If the value needs to be changed in the future, you would have to search for all instances of the magic number in the code, which can be time-consuming and error-prone.
By using constants, you can avoid these issues and make your code more robust, readable, and maintainable. Additionally, Solidity provides built-in support for constants, which allows you to define them in a way that optimizes gas usage and makes them easier to work with in the context of smart contract development.
Instances
https://github.com/juniormp/audit-2023-04-rubicon/blob/511636d889742296a54392875a35e4c0c4727bb7/contracts/RubiconMarket.sol#L583
https://github.com/juniormp/audit-2023-04-rubicon/blob/511636d889742296a54392875a35e4c0c4727bb7/contracts/RubiconMarket.sol#L586