hats-finance / Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf

Circles Protocol contracts
https://aboutcircles.com
GNU Affero General Public License v3.0
0 stars 0 forks source link

Uninitialized Critical State Variable in `Demurrage` Contract #69

Open hats-bug-reporter[bot] opened 1 month ago

hats-bug-reporter[bot] commented 1 month ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0xec96604876d278c274edbd80d5751e3c985bb5d431524071bccdaf16a9da7b06 Severity: medium

Description: Description\ The Demurrage contract contains a critical state variable inflationDayZero that is declared but not initialized within the contract.

This variable is fundamental to the contract's functionality, as it serves as the starting point for calculating inflation and demurrage.

The lack of proper initialization can lead to incorrect calculations throughout the contract.

benjaminbollen commented 1 month ago

Thank you for your report on the potentially uninitialized inflationDayZero variable in the Demurrage Contract. After review, we've determined this is not an issue.

The inflationDayZero variable is properly initialized in the constructor of DiscountedBalances for Hub.sol, or in the setup functions of the ERC20 contracts where it is initialized by reading from the hub.

We appreciate your attention to state variable initialization, as this is indeed a critical aspect of smart contract security. Your thorough examination of our contracts contributes to ensuring the robustness of our system. Thank you for your diligence in this security review.