Description
In MToken._startEarning the StartedEarning event will be emitted even if the calling account is already earning:
function _startEarning(address account_) internal {
emit StartedEarning(account_);
MBalance storage mBalance_ = _balances[account_];
if (mBalance_.isEarning) return;
// ... }The same happens in the MToken._stopEarning. The StoppedEarning event will be emitted even if the user isn't an earner.
Recommendation
Move the line that emits the event to the end of the function so that it will only fire when a new user starts/stops being an earner.
Status
Addressed in #5b68e4e.