Omniscia KlimaDAO Audit

ExercisepKLIMA Static Analysis Findings

ExercisepKLIMA Static Analysis Findings

EKL-01S: Inexistent Event Emission

TypeSeverityLocation
Language SpecificInformationalExercisepKLIMA.sol:L704-L716

Description:

The linked functions adjust sensitive contract variables.

Example:

contracts/pKLIMA/regular/ExercisepKLIMA.sol
704function pushOwnership( address _newOwner ) external returns ( bool ) {
705 require( msg.sender == owner, "Sender is not owner" );
706 require( _newOwner != address(0) );
707 newOwner = _newOwner;
708 return true;
709}
710
711function pullOwnership() external returns ( bool ) {
712 require( msg.sender == newOwner );
713 owner = newOwner;
714 newOwner = address(0);
715 return true;
716}

Recommendation:

We advise events to be emitted for them to ensure off-chain processes can properly detect this change.

Alleviation:

Proper events were introduced for both actions.

EKL-02S: Redundant Contract Variable

TypeSeverityLocation
Code StyleInformationalExercisepKLIMA.sol:L630

Description:

The linked variable is not utilized within the codebase.

Example:

contracts/pKLIMA/regular/ExercisepKLIMA.sol
630bool hasMigrated;

Recommendation:

We advise it to be omitted from it.

Alleviation:

The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.