Assessment reports>Lorenzo Protocol>Low findings>No genesis state validation in btcstaking
Category: Coding Mistakes

No genesis state validation in btcstaking

Low Severity
Low Impact
Low Likelihood

Description

The btcstaking module does not validate the genesis state. The function that is supposed to validate the genesis state simply returns nil.

func (gs GenesisState) Validate() error {
	return nil
}

Impact

If a wrong state is ever initialized, the Validate() function will not catch any mistakes and simply report that everything is set up as intended.

Recommendations

Add validation code that verifies all parameters present in the genesis state.

Remediation

This issue was acknowledged by Lorenzo and fixed in commit b2f3d260.

Zellic © 2025Back to top ↑