You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "State" variables not explicitly initialized, in Loan.sol and Pool.sol.
This could be tricky if states are added to the, especially in the beginning.
It's also not clear for the casual reviewer what the initial state is.
Proof of Concept
Loan.sol: enum State { Ready, Active, Matured, Expired, Liquidated }
Loan.sol: State public loanState; // The current state of this loan, as defined in the State enum below
Pool.sol: enum State { Initialized, Finalized, Deactivated }
Pool.sol: State public poolState;
Tools Used
Review of the code
Recommended Mitigation Steps
Explicitly initialize enum type variables or add a comment indicating the initial state.
The text was updated successfully, but these errors were encountered:
Handle
gpersoon
Vulnerability details
Impact
The "State" variables not explicitly initialized, in Loan.sol and Pool.sol.
This could be tricky if states are added to the, especially in the beginning.
It's also not clear for the casual reviewer what the initial state is.
Proof of Concept
Loan.sol: enum State { Ready, Active, Matured, Expired, Liquidated }
Loan.sol: State public loanState; // The current state of this loan, as defined in the State enum below
Pool.sol: enum State { Initialized, Finalized, Deactivated }
Pool.sol: State public poolState;
Tools Used
Review of the code
Recommended Mitigation Steps
Explicitly initialize enum type variables or add a comment indicating the initial state.
The text was updated successfully, but these errors were encountered: