The update_config function in the epoch manager contract allows updating the entire epoch configuration without proper validation of the genesis epoch:
/contracts/epoch-manager/src/commands.rs#L19-L23
While the duration is validated, there are no checks on the new genesis epoch value. This contrasts with the instantiation where genesis epoch is properly validated:
Protocol Invariant Violation: From the protocol documentation:
The current implementation violates this core invariant.
Also, since farm rewards are calculated based on epochs, changing the genesis epoch can manipulate reward distributions:
Changing genesis epoch after farms are active disrupts the continuous epoch sequence.
Add proper validation:
